Chapter 2. Architecture 49
EIS component
The EIS component (which is also exposed as a service, using a services-based
architecture style) gets called from the EIS system process, either directly as a
local EJB binding, or indirectly if it is remote and has an adapter, such as a JMS
adapter that handles the remote EIS component request. (See Table 2-9 on
page 39 for an explanation on local versus remote EIS components.)
The EIS component, which is a facade, has the following main components that
it uses to handle back-end system integration:
Suggestion: Using process modeling development tools, such as
WebSphere Studio Application Developer Integration Edition Business
Process Choreographer, it is possible to invoke a BPEL process directly
without creating an additional service end-point.
If you layer your process using a layered service end-point and a business
delegate, you build defense into your architecture. Remember, there is
defense in layers
Using Web services, you can expose your EIS system process using
SOAP/HTTP (or even SOAP/JMS). This structure opens up quite a few
opportunities. Now, your .NET applications potentially can call your EIS
system process for their back-end system integration requirements!
It makes sense for the service end-point to do request handling and response
handling as close as possible to the service end-point, allowing you to throw a
fault to any consumers that might not have sent valid requests. You do not
want to pass unvalidated requests to your processing layer resulting in
unnecessary round-trips.
By using a business delegate between your service end-point and your
business process, you can change the implementation of your service without
having to re-factor your service interface or potentially the processing layer of
your service end-point.
Using the business delegate also enables you to test your business process
from a J2SE or a J2EE application client, without calling the service end-point.
At the same time, you can test your EIS service end-point without having to
run the EIS system process.
50 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
???? EIS component
The component being called by the EIS system process. The EIS component
gets the following parameters:
Request data object
The request data object is passed to the feature class. The feature class
uses the request data object to create a request byte buffer or to create a
SQL Statement.
Feature class name
Back-end integration style
The EIS system process references its configuration to get the input
parameters for the EIS component. The EIS component uses a business
delegate to handle its processing.
???? EIS business delegate
Uses a factory component to create an EIS integration component.
???? EIS integration factory
Creates an implementation of EISIntegration, using an integration-style
attribute. For example, let’s assume the integration style is JCA-CICS. Then,
the factory returns a JCACICS instance which is an implementation of
EISIntegration.
???? EIS integration components
Use a J2C connector, or a JDBC DataSource to get a connection to a
back-end system or database. The integration component creates an
instance of the feature class that gets passed to it. Let’s assume we need to
integrate with a CICS / COBOL transaction in this example. The JCACICS
component uses a J2C CICS connector (using a CCI ConnectionFactory to
get a Connection and Interaction) to get a connection to the back-end
system. The feature class to create the request byte buffer and to parse the
response from the back-end system.
Before the JCACICS component invokes the connect or call, it first creates an
instance of the feature class, passes the request data object to it, and then
asks the feature class to create the request and response byte buffers.
After the J2C connector call is executed, it passes the CICS / COBOL
transactions response byte buffer to the same instance of the feature class,
and asks the feature class to create a response data object.
Example 2-4 on page 51 is a sample EIS integration component, using a J2C
CICS connector.
Chapter 2. Architecture 51
Example 2-4 Sample EIS integration component using a J2C CICS connector
public class JCACICSBean implements javax.ejb.SessionBean {
....
....
....
public Object process(Object request, String featureClassName) throws EISIntegrationException
{
Object response = null;
Connection connection = null;
Interaction interaction = null;
try {
ConnectionFactory factory =
ServiceLocator.getInstance().getConnectionFactory("java:comp/env/eis/Cics");
// create instance of feature class
EISCICSFeatureI feature =
(EISCICSFeatureI) Class.forName(featureClassName).newInstance();
// set the request domain- / generic data object to feature
feature.setRequest(request);
// get request- and response byte buffers for back-end transaction
Record requestRecord = (Record) feature.createEISRequestRecord();
Record responseRecord = (Record) feature.createEISResponseRecord();
// get connection to CTG server
connection = factory.getConnection();
interaction = connection.createInteraction();
// execute CICS transaction
interaction.execute(feature.getInteractionSpec(), requestRecord, responseRecord);
// map CICS byte[] response to response data object
response = feature.handleEISResponseRecord(responseRecord);
} catch (ServiceLocatorException e) {
throw new EISIntegrationException(e.toString(),
ITSOUtils.getStackTraceFromException(e));
} catch (ResourceException e) {
throw new EISIntegrationException(e.toString(),
ITSOUtils.getStackTraceFromException(e));
52 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
} catch (Exception e) {
throw new EISIntegrationException(e.toString(),
ITSOUtils.getStackTraceFromException(e));
} finally {
if (interaction != null) {
try {
interaction.close();
} catch (Exception e) {
}
interaction = null;
}
if (connection != null) {
try {
connection.close();
} catch (Exception e) {
}
connection = null;
}
}
return response;
}
}
???? EIS feature classes
See “EIS integration feature classes” on page 40 for a detailed description
about the function and purpose of feature classes. The feature class must
create a back-end transaction request object. This can be something like a
byte buffer or an SQL call to a database.
The feature class uses a request data object to create the back-end
transaction request. This data object can be a domain object, or it can be a
generic data object. (See “Domain objects” on page 28 for discussion about
domain and generic data objects.) Using the processes request object, the
feature class can create the back-end transactions request.
The EIS integration component passes the response from the back-end
transaction to the feature class. The feature class must create a response
data object that is returned to the calling business process. The back-end
transaction response is a byte buffer that must be parsed by the feature class
to create a response object to the calling business process.
Chapter 2. Architecture 53
???? J2C connectors
Used by the EIS integration components for connections to a back-end
system, for example to CICS / COBOL or IMS. Refer to the IBM Redbook
Patterns: Self-Service Application Solutions Using WebSphere for z/OS V5,
SG24-7092, or WebSphere for z/OS V5 Connectivity Handbook , SG24-7064,
for details about J2C and CICS / IMS connectors.
???? JDBC DataSource
This EIS integration component uses a javax.sql.DataSource for its
connection pooling to a database. A java.sql.Connection is used for the
connection to the database.
A JDBC integration component delegates processing to a feature class by
passing a java.sql.Connection object to the feature. Using the
java.sql.Connection object, the feature can integrate with the database
performing SQL transactions using java.sql.Statement,
java.sql.PreparedStatement and java.sql.CallableStatement (for stored
procedures) objects.
Tip: Use WebSphere Studio Application Developer Integration Edition tools to
create format beans and format handlers from you C structures or copybooks.
Your feature classes can then use these helper classes to create a byte buffer
for a back-end transaction request and to parse a byte buffer from a back-end
transaction response into a bean.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset