Exposing an EJB session bean as an EJB on the OSB using the JEJB transport
The JEJB transport allows passing POJOs through the OSB. We can use the JEJB transport on proxy service and expose the proxy service as a remote EJB. For the consumer/client, the proxy service looks like a normal stateless session bean. This will add an additional layer between the client and some existing EJB session beans, which provides additional functionality and agility, such as:
Replacing the original EJB by something else, that still provides the same interface to the existing clients
Doing some transformations between the EJB client and the EJB session bean implementation
Implementing logging
Using the capabilities of OSB to monitor SLA's
In this recipe, we will implement the same EJB session bean interface on the OSB and just pass-through the messages:
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 have...