IMS Universal drivers: WebSphere Application Server Liberty type-4 connections
Java applications that run on WebSphere Application Server Liberty can access IMS databases by using the type-4 connectivity provided by IMS Universal Database resource adapters.
The type-4 connectivity of the IMS Universal drivers enables Java application programs to access IMS databases from a wide variety of distributed and mainframe environments, either in stand-alone mode or under an application server, with or without XA support for global transactions.
The following figure provides an overview of an EJB application that uses the type-4 connectivity of an IMS Universal Database resource adapter to connect to an IMS database from WebSphere Application Server for distributed platforms. Database requests are passed to a type-4 IMS Universal Database resource adapter, sent via TCP/IP to IMS Connect, and internally managed by ODBM to access IMS databases.
To enable Enterprise JavaBeans (EJB) applications that run on WebSphere Application Server Liberty, on a distributed platform, the server.xml configuration file must first be configured. It is used to install IMS Universal Database resource adapters, define connection factories that connect to an IMS™ database, and deploy RESTful service applications in WebSphere Application Server Liberty.
Enable Features
<featureManager>
<feature>jca-1.7</feature>
<feature>jndi-1.0</feature>
<feature>jdbc-4.1</feature>
<feature>localConnector-1.0</feature>
</featureManager>
Specify the IMS Universal Drivers Library locations
<library id="global">
<!-- Include imsudb.jar -->
<fileset dir="usr/lpp/…imsjava/" includes="imsudb.jar"/>
</library>
Install IMS Universal Database Resource Adapters
<resourceAdapter id="imsudbJLocal"
location="usr/lpp/…imsjava/rar/imsudbJLocal.rar"/>
<resourceAdapter id="imsudbLocal"
location="usr/lpp/…imsjava/rar/imsudbLocal.rar"/>
<resourceAdapter id="imsudbJXA"
location="usr/lpp/…imsjava/rar/imsudbJXA.rar"/>
<resourceAdapter id="imsudbXA"
location="usr/lpp/…imsjava/rar/imsudbXA.rar"/>
Define Connection Factories
<!-- Associate a connection factory to a resource adapter
through the resource adapter’s id. -->
<connectionFactory jndiName="HOSP_JDBC_T4">
<properties.imsudbJLocal databaseName="MYPSB"
datastoreName="IMS1" datastoreServer="myHostName"
portNumber="1234" driverType="4"
user="myUserID" password="myPassword"/>
</connectionFactory>
<connectionFactory jndiName="HOSP_CCI_T4">
<properties.imsudbLocal databaseName="MYPSB"
datastoreName="IMS1" datastoreServer="myHostName"
portNumber="1234" driverType="4"
user="myUserID" password="myPassword"/>
</connectionFactory>
<connectionFactory jndiName="HOSP_JDBC_T4XA">
<properties.imsudbJXA databaseName="MYPSB"
datastoreName="IMS1" datastoreServer="myHostName"
portNumber="1234" driverType="4"
user="myUserID" password="myPassword"/>
</connectionFactory>
<connectionFactory jndiName="HOSP_CCI_T4XA">
<properties.imsudbXA databaseName="MYPSB"
datastoreName="IMS1" datastoreServer="myHostName"
portNumber="1234" driverType="4"
user="myUserID" password="myPassword"/>
</connectionFactory>
Enable Trace and Logging
Trace and logging are disabled by default. Add the following <logging> element that contains
the traceSpecification attribute with the String argument
com.ibm.ims.db.opendb
as follows to enable IMS Universal drivers trace and logging.
<!-- The log files can be found at: [usr/lpp/…/servers/server_name/logs] -->
<logging traceSpecification="*=info:com.ibm.ims.db.opendb.*=finest"/>