544 IBM WebSphere Host Publisher Version 3.5
Figure 17-40 HelloEJB Input
Once the EJB Access Bean is instantiated, it communicates with the Host
Publisher EJB, which is located by using the JNDI properties for this EJB Access
Bean. The communication is via RMI/IIOP. The response from CICS is illustrated
in Figure 17-41.
Figure 17-41 HelloEJB output
17.4.6 Scenario 6: Host Publisher EJB access with chaining
The EJB support implementation in Host Publisher supports Integration Object
chaining. This scenario shows how to access the EJB Access Bean when using
Integration Object chaining. For information about Integration Object chaining,
see Chapter 12, Integration Object chaining on page 345.
Chapter 17. EJB application support 545
In order to support chained Integration Objects, the Host Publisher EJB is
implemented as a stateful session bean, where the life cycle of a Host Publisher
EJB instance corresponds to the processing of an Integration Object chain.
When EJB Access Beans for an Integration Object chain are processed, two EJB
Access Bean properties are used:
򐂰 hPubAccessHandle
Contains the handle for the Host Publisher EJB instance corresponding to the
Integration Object chain.
򐂰 hPubLinkKey
Contains the key that represents the connection for the Integration Object
chain.
EJB Access Bean chaining in a Web container
When EJB Access Beans are processed in a Web container, the EJB Access
Bean saves the values of the hPubAccessHandle and hPubLinkKey properties in
the HttpSessionObject associated with the client session. The properties are
retrieved by subsequent EJB Access Beans in processing the Integration Object
chain.
The EJB Access Bean for the first Integration Object in a chain creates an
instance of the Host Publisher EJB. That instance is used for all EJB Access
Beans for the subsequent Integration Objects in the chain. After the processing
of the EJB Access Bean for the last Integration Object in a chain, the Host
Publisher EJB instance corresponding to that Integration Object chain is
removed.
EJB Access Bean chaining outside of a Web container
When EJB Access Beans are processed outside of a Web container (for
example, directly from a Java program), the calling program must retrieve the
values of the hPubAccessHandle and hPubLinkKey properties. The properties
can be retrieved after the EJB Access Bean for the first Integration Object in the
chain has been processed. The calling program must set the two properties for
all subsequent EJB Access Beans in the Integration Object chain before they are
processed.
The procedure to create the Integration Objects is exactly the same. However,
you need to always remember to activate the Create EJB Integration Object
Support option, as illustrated in Figure 17-3 on page 510.

Get A Comprehensive Guide to IBM WebSphere Host Publisher Version 3.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.