[Enterprise Extensions only]

CORBA client to WebSphere EJB server

CORBA clients can use the CORBA client programming model to access Enterprise JavaBeans hosted by a WebSphere EJB server, as shown in the following figure:


CORBA client to WebSphere EJB server scenario

CORBA client to WebSphere EJB server scenario. This figure shows a CORBA client accessing Enterprise JavaBeans on a WebSphere EJB server. For more information, see the text following the figure.

The EJB server provides the server implementation objects (Enterprise JavaBeans) that client applications need to access and implements the services that support those objects. The EJB class file is used to generate IDL for the class and its home (this is reverse of the typical CORBA model where IDL is used to generate the object). Serializable objects used in the enterprise JavaBean interface are expressed in IDL as CORBA valuetypes. Implementations for CORBA valuetypes must be provided on the client, so it is important to keep this simple.

In this scenario, when the client wants to call a method on a server object (an Enterprise JavaBean), the following sequence of events occur:

  1. When the client environment is started, the client ORB is initialized and the ORB bootstrap process gets access to the naming service (with CORBA CosNaming bindings).
  2. When a client application needs to access an Enterprise JavaBean, the client environment uses the naming service to find the home for the bean.
  3. The home locates or creates the Enterprise JavaBean then passes the interoperable object reference (IOR) of the bean back to the client.
  4. The client's ORB creates a stub object (local to the client) for the bean and stores the IOR in the stub object.
  5. The client uses the stub object to communicate with the remote bean as though it was in the local address space.

For more information about the elements in this scenario, see An overview of basic CORBA concepts.