Start of change

IMS Universal drivers: WebSphere Application Server Liberty type-2 connections

When WebSphere Application Server Liberty and IMS are on the same logical partition (LPAR), the Java™ applications that run on WebSphere Application Server Liberty can access IMS databases by using the type-2 connectivity that is provided by the IMS Universal drivers.

The type-2 connectivity of the IMS Universal drivers enables Java application programs to access local, non-TCP/IP IMS databases.

With type-2 connections, WebSphere Application Server Liberty can be set up to access IMS databases through ODBM or through ODBA. In either case, Resource Recovery Services (RRS) must be active (RRS=Y) for both IMS and ODBA. To learn more about ODBA and RRS settings, see Accessing IMS databases through the ODBA interface and CSL ODBM administration.

ODBM is the recommended setup option for most use cases because it provides increased failure isolation and reduces the possibility of a U113 abend. In the following figure, an Enterprise JavaBeans (EJB) application running on WebSphere Application Server Liberty accesses an IMS database by passing requests to ODBM through a type-2 IMS Universal Database resource adapter.

Figure 1. A WebSphere Application Server Liberty EJB application using a type-2 IMS Universal Database resource adapter with ODBM
Begin figure description. An EJB application, running on WebSphere Application Server Liberty, passes requests to ODBM through a type-2 IMS Universal Database resource adapter. End figure description.

Using ODBA and DRA is also a valid option. In the following figure, an Enterprise JavaBeans (EJB) application running on WebSphere Application Server Liberty accesses an IMS database by passing requests to a type-2 IMS Universal Database resource adapter. The requests are converted to DL/I calls and passed to ODBA. ODBA uses the IMS DRA interface to access the DL/I region in IMS.

Figure 2. A WebSphere Application Server Liberty EJB application using a type-2 IMS Universal Database resource adapter with ODBA and DRA
Begin figure description. An EJB application, running on WebSphere Application Server Liberty, uses a type-2 IMS Universal Database resource adapter along with ODBA and DRA layers to access DL/I on IMS DB. End figure description.

To enable EJB applications that run on WebSphere Application Server Liberty on a z/OS 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

Within the <featureManager> element, add the <features> listed in the following sample to enable JCA and JDBC support for Liberty. The zosTransaction-1.0 feature is required for RRS Type-2 connectivity.
<featureManager>
	<feature>jca-1.7</feature>
	<feature>jndi-1.0</feature>
	<feature>jdbc-4.1</feature>
	<feature>localConnector-1.0</feature>
	
	<!-- Required for RRS Type-2 connectivity -->
	<feature>zosTransaction-1.0</feature>
</featureManager>

Specify the IMS Universal Drivers Library locations

Within the <library> element, add the <fileset> subelements that point to the IMS Universal drivers libraries.
<library id="global">
	<!-- Include imsudb.jar -->
	<fileset dir="usr/lpp/…imsjava/" includes="imsudb.jar"/>
		
	<!-- libT2DLI.so or libT2DLI_64.so native code required for Type-2 Connectivity -->
	<fileset dir="usr/lpp/…/" includes="libT2DLI.so"/>
</library>

Enable Native Transaction Manager

Add the following <nativeTransactionManager> element for RRS Type-2 connectivity support.
<resourceAdapter id="imsudbJLocal"
location="usr/lpp/…imsjava/rar/imsudbJLocal.rar"/>
<resourceAdapter id="imsudbLocal"
location="usr/lpp/…imsjava/rar/imsudbLocal.rar"/>

Define Connection Factories

Associate a connection factory to a resource adapter by adding a <connectionFactory> element and selecting the appropriate resource adapter by defining the properties subelement with the appropriate resource adapter id.
<!-- Associate a connection factory to a resource adapter 
through the resource adapter’s id. -->
<connectionFactory jndiName="HOSP_JDBC_T2">
        <properties.imsudbJLocal databaseName="MYPSB"
        datastoreName="IMS1" driverType="2"/>
</connectionFactory>
<connectionFactory jndiName="HOSP_CCI_T2">
        <properties.imsudbLocal databaseName="MYPSB"
        datastoreName="IMS1" driverType="2"/>
</connectionFactory>

Enable Trace / 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"/>
End of change