Chapter 5. Using J2EE Connector Architecture 97
The client uses an interaction to execute functions on the EIS. The interaction
modes involves how the request is handled by the resource adapter and is
specified on the InteractionSpec by stating one of the following:
򐂰 SYNC_SEND
The execution only sends an input to the EIS via the resource adapter. No
output is expected.
򐂰 SYNC_RECEIVE
The execution receives a synchronous output record from the EIS.
򐂰 SYNC_SEND_RECEIVE
The execution sends an input to the EIS, and a synchronous output record is
expected.
The EIS can also make calls into the application component using Enterprise
JavaBeans (EJB) that are deployed on the application server. Inbound
communication is only available when the adapter is running in a J2EE
application server.
5.2 EIS integration using J2C
This section describes how to use a J2C resource adapter in various integration
schemes. EIS-based integration typically involves a J2C resource adapter that is
running in managed mode to take advantage of the application servers quality of
service functionality.
As mentioned earlier, a resource adapter can expose its outbound functionality
through CCI. This functionality can directly interact with the EIS. The EIS
connectivity framework provides a facade into the EIS via the resource adapter,
which provides de-coupling between the service provided by the J2C resource
adapter and application services.
The JCA 1.5 specification stipulates how inbound communication can be
accomplished using EJB. EJB enables the EIS to make calls to the application
component when events occur in the EIS system.
5.2.1 J2C outbound integration pattern
The outbound integration pattern involves an application component that is
running on an application server or stand-alone Java application, which executes
requests on the J2C resource adapter that interacts with the EIS.
98 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
There are two basic patterns when running on an application server, one involves
straight calls and the other involves exposing the resource adapter as a service.
Common Client Interface invocation
The patterns when interacting from within an application server use an EJB to
make calls on the resource adapter through CCI calls. The EJB can then be
exposed as an Enterprise Application Integration framework within the managed
application space, or it can used directly. Developing a framework gains flexibility
and potentially eases integration with other parts of the application.
Example 5-1 is shows the sample code which makes a call on a resource
adapter.
Example 5-1 Sample CCI call to an EIS
ConnectionFactory cicsFactory =ServiceLocator.getConnectionFactory(“eis/CICS”);
Connection conn = cicsFactory.getConnection();
InteractionSpec spec = new ECIInteractionSpec();
spec.setCommareaLength(commAreaLength);
spec.setTPName(“TRDR”);
spec.setFunctionName(“TRADERBL”);
Interaction interaction = conn.createInteraction(spec);
interaction.execute(spec,requestRecord, responseRecord);
Enterprise Application Integration framework
The Enterprise Application Integration (EAI) framework is the implementation of
a system process of the EIS component model that is described in the following
sections:
򐂰 2.2.2, “Architecture options” on page 30
򐂰 2.2.5, “Conceptual architecture” on page 37
򐂰 7 2.2.6, “Logical architecture” on page 47
The EIS system process uses a session bean implementation. The EIS features
are a Java implementation of existing functions in the EIS.
The EAI framework interacts with the EIS through the resource adapter and is
exposed as features that the session bean uses. This interaction creates
flexibility and de-coupling of the EIS features that are used when integrating. It
allows for the quick reuse of existing features (for example, GetCompanyList that
is used to retrieve a list of companies in the system). The EAI framework gives
developers an clearly defined infrastructure on how they should add new
features and extend the EIS access.

Get Managing Information Access to an Enterprise Information System Using J2EE and Services Oriented Architecture 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.