Request processing in the EJB adapter

This section describes how the connector for EJB handles request processing, as illustrated in Figure 1.

The request processing scenario described here assumes that:


Figure 1. Request processing for the connector for EJB

The connector for EJB processes business object requests in the following manner.

  1. The connector receives a business object request from the integration broker. The business object contains information about the corresponding enterprise bean, including its JNDI name and the class name of its home and remote interfaces.
  2. The connector uses its InitialContextFactory and ProviderURL properties to begin the process of locating and accessing the enterprise beans deployed on the application server. InitialContext is part of the larger JNDI API supported by the application server. It is the starting point for any JNDI lookup by a client (such as the connector). The ProviderURL specifies the service provider, which is a JNDI driver on the application server used for locating the enterprise bean's home interface. The home interface provides methods for creating or finding the enterprise bean remote interface.
  3. After locating the home interface, the connector finds the remote interface, which defines the enterprise bean business methods that a client (in this case, the connector) can call.

    For entity beans, the connector uses either a creator or finder type method, depending on which has been implemented by the enterprise bean developer (the connector knows which one to use based on the metadata in the business object definition). These methods are defined in the home interface and invoked by a client to obtain a remote/local interface reference to an enterprise bean instance.

  4. Once the connector has located the remote interface, it can begin to invoke enterprise bean methods. The parent business object sent by the connector contains a child business object for each method defined in the remote interface. The child business object's attributes are mapped to parameters of the remote method of the corresponding enterprise beans. Since enterprise beans are loaded dynamically, its methods are discovered and called through reflection. The details of this step are as follows:
  5. After the methods are executed and values are returned from the EJB application server, the connector loads the EJB object data into the business object.
  6. The connector returns the business object with populated values from the EJB application server to the integration broker.

    The connector also returns a message to the integration broker indicating that the original object request was either successful or unsuccessful (a FAIL status). If the request was successful, the connector also returns the updated business object to the broker.

Copyright IBM Corp. 1997, 2004