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.