414 Patterns: Implementing Self-Service in an SOA Environment
Figure 12-13 Project Explorer showing the data binding bean
Step 2: Create the J2C Java bean
In this step, we create a J2C Java bean that contains the methods to be exposed
for the client from the COBOL program. This bean will also:
򐂰 Contain the connection information for the CICS Transaction Gateway.
򐂰 Use the data binding bean class we just created for the input and output
record structure.
1. On tool menu select File New Other J2C (Figure 12-10 on
page 411).
2. Expand J2C and select J2C Java Bean. Click Next.
3. The next screen, shown in Figure 12-14 on page 415,allows you to select the
resource adapter you will use to connect to the EIS system.
Chapter 12. J2EE Connector Architecture scenario 415
Figure 12-14 Resource adapter selection.
In the View By field, select J2C version. In the resulting list of resource
adapters, expand the 1.5 category and select ECIResourceAdapter (IBM
6.0.0). Click Next.
4. In the next screen, two connection options are available:
a. Managed Connection
These connections are created by a connection factory and are managed
by the application server. The application accesses a connection factory
using JNDI.
For this option, provide the JNDI name of the connection factory.
416 Patterns: Implementing Self-Service in an SOA Environment
b. Non-managed Connection:
These are obtained directly through the resource adapter and are not
managed by the application server.
Select both connection types. The information required for our example is
shown in Figure 12-15 on page 417.
Best practice: Managed connections are recommended as best
practice. The application server’s connection manager works with the
resource adapter to manage connections efficiently, providing JCA
quality of service.
Note: When both types of connection are selected the server will first try to
find the JNDI name. Only if the managed connection cannot be located,
will the non-managed connection be tried.
Chapter 12. J2EE Connector Architecture scenario 417
Figure 12-15 J2C Java bean connection information for our application
The following is the list of input properties for non-managed connections:
Connection class name:
com.ibm.connector2.ECIManagedConnectionFactory.
Connection URL: Provide the server address (URL) of the CICS ECI
server.
Server name: Provide the name of CICS server.
Port Number: Provide the port number to be used to communicate with
CICS TG.
User name: Provide the user name for the connection.
Password: provide the password for the connection
418 Patterns: Implementing Self-Service in an SOA Environment
To access the advanced CICS properties, click Show Advanced,
Client security: Provide the client security class name.
Server security: Provide the server security class name.
Trace Level: Identify the level of information to be traced
Click Next.
5. The next screen (Figure 12-16) allows you to specify the output properties for
the new J2C Java bean.
Figure 12-16 J2C Bean Output properties panel
Project name: JCAWeb
Package name: com.ibm.patterns.jcaService
Interface name: MartJ2CBean
The implementation name will default to the interface name concatenated
with BeanImpl.
Click Next.
6. The next screen (Figure 12-17 on page 419) allows you to select the Java
methods for each function or service you want to access in the EIS. It will use
the COBOL importer to map the data types between the COBOL source and
the data in the Java methods.

Get Patterns: Implementing Self-Service in an SOA Environment 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.