Exposing an EJB session bean as a service on the OSB using the EJB transport
As the version of OSB is 11gR1 we can use an EJB version 3.0 session bean in an OSB business service. Before 11gR1, only EJB version 2.1 was supported.
In this recipe, we will create and test a business service—JB and JEJB transport. The business service calls a session bean that returns the Java object in XML or as a Java object with the JEJB transport.
Getting ready
Make sure that the EJB session bean is deployed to the OSB server as shown in the Introduction section of this chapter.
How to do it...
First we will have to register an EJB client JAR as a resource in Oracle Service Bus. The EJB client JAR contains the necessary interfaces and classes needed by the business service to access the EJB session bean.
In Eclipse OEPE, perform the following steps:
Create a new OSB project and name it
exposing-session-bean-as-webservice
and create ajar
,business
, andproxy
folder within it.Open a file explorer window and navigate...