WebSphere Application Server Liberty type-2 connections sample server.xml configuration file

The sample server.xml file is used to install IMS Universal Database resource adapters, define connection factories which connect to an IMS™ database, and deploy an RESTful service application in WebSphere Application Server Liberty.

<server description="new server">

    <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>

    <!-- To access this server from a remote client add a host
    attribute to the following element, e.g. host="*" -->
    <httpEndpoint host="*" httpPort="1692" httpsPort="9443"
        id="defaultHttpEndpoint"/>

    <!-- Automatically expand WAR files and EAR files -->
    <applicationManager autoExpand="true"/>

    <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"/>

        <!-- (OPTIONAL) Include jars that contain local database
        metadata (dbviews) -->
        <fileset dir="usr/lpp/…/" includes="dbviews.jar"/>
    </library>

    <nativeTransactionManager shutdownTimeout="5s"/>

    <!-- Defining resource adapters -->
    <resourceAdapter id="imsudbJLocal"
        location="usr/lpp/…imsjava/rar/imsudbJLocal.rar"/>
    <resourceAdapter id="imsudbLocal"
        location="usr/lpp/…imsjava/rar/imsudbLocal.rar"/>

    <!-- Defining connection factories -->
    <!-- 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 or Disable (Default) JDBC trace -->
    <!-- The log files can be found at:
        [usr/lpp/…/servers/server_name/logs] -->
    <logging traceSpecification=
    "*=info:com.ibm.ims.db.opendb.*=finest"/>
    
    <webApplication id="myApp" location="myApp.war" name="myApp"/>

</server>