Chapter 17. EJB application support 507
17.2.2 Host Publisher and EJB applications
Host Publisher Version 3.5 provides EJB application support and has the
following main characteristics:
1. It provides the Host Publisher EJB (HPubEJB) capable of running any Host
Publisher Integration Object.
2. A new option has been added to Host Publisher Studio to generate EJB
support files (including the EJB Access Bean) for an Integration Object.
Host Publisher EJB
The Host Publisher EJB is provided by Host Publisher Server (runtime) and has
the following characteristics.
1. It is automatically installed in the Default Container of the Host Publisher
application server.
2. It is capable of running any Database or Host Access Integration Object
(except Express Logon Integration Objects).
3. The lifecycle of an EJB instance corresponds to an Integration Object chain
(stateful EJB).
4. A single EJB is a good choice for resource efficiency:
EJB containers usually run only a small number of unique EJBs, but a large
number of EJB instances.
Host Publisher Studio: EJB support
The following components are generated in addition to the Integration Object
when this option is chosen in Host Publisher Studio:
1. An EJB Access Bean (EJB client code) is generated with the same signature
as the corresponding Integration Object.
2. The Integration Object properties object is used to pass input properties to
the Host Publisher EJB (HPubEJB), and to pass resulting output properties
back to the Access Bean.
3. The Helper object extends the Integration Object (IO), generated for
processing efficiency.
508 IBM WebSphere Host Publisher Version 3.5
Figure 17-2 Executing Host Publisher EJB in a Web container
EJB Access Bean
The main characteristics of the EJB Access Bean are:
򐂰 It is generated when the Host Publisher Studio option is selected for each
Integration Object.
򐂰 The EJB Access Bean is invoked by clients (servlet/jsp/java
application/custom EJB).
򐂰 It has a similar signature to the corresponding Integration Object (IO),
allowing any client to interact with the EJB Access Bean like it would with the
IO itself.
򐂰 Clients call Access Beans setter methods to set IO input properties.
򐂰 Clients calls Access Beans execution method.
do HPTransaction (from jsp/servlet -within Web environment)
processRequest (form application/custom EJB - outside of the Web
environment)
򐂰 If the corresponding IO is non-chained or first in chain, Host Access IO:
EJB Access Bean retrieves parameters from its properties file:
network location of JNDI server.
name of Host Publisher EJB (HPubEJB).
򐂰 The Access Bean does a JNDI lookup to locate deployed Host Publisher EJB
(HPubEJB).
򐂰 The Access Bean (EJB client) remotely creates an instance of HPubEJB.

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.