Configuring a web server for the Trading Partner UI

If you use a database other than the ITXA Derby database, you must configure the web server to point to the non-Derby database.

Remember to place the appropriate JDBC file in the directory C:\IBM\Standards Processing Engine 9.0.0\tpuiserver\usr\servers\defaultServer\apps\spe.war\WEB-INF\lib.

To point to the selected database, update the server.xml file that is included with the Trading Partner UI server (tpuiserver) installation.

In addition to the example <dataSource> and <library> values that are shown in the procedure, see example values for other server.xml fields in "Configuring database connectivity in the Liberty profile" in the WebSphere Application Server, Network Deployment IBM® Knowledge Center .

Edit the /spe_install_dir/tpuiserver/usr/servers/defaultServer/server.xml file to update the <dataSource> and <library> entries with the property values for the database that you are using.
Example <datasource> and <library> values for DB2:
<dataSource id="tenx" jndiName="jdbc/tenx">
     <jdbcDriver libraryRef="DB2JCC4Lib"/>
     <properties.db2.jcc databaseName="mydb2database" serverName="servername" portNumber="50000"  user="db2user" password="password"/>
</dataSource>

<library id="DB2JCC4Lib">
     <fileset dir="${server.config.dir}/apps/spe.war/WEB-INF/lib" includes="db2jcc4.jar db2jcc_license_cisuz.jar"/>
</library>
Example <dataSource> and <library> values for Oracle:
<dataSource id="tenx" jndiName="jdbc/tenx">
   <jdbcDriver libraryRef="OracleLib"/>
  <properties.oracle URL="jdbc:oracle:thin:@myoracledb:1521:ora12" user="oracleuser" password=password/> 
</dataSource>

<library id="OracleLib">
     <fileset dir="${server.config.dir}/apps/spe.war/WEB-INF/lib" includes="ojdbc6.jar"/>
</library>
Example <dataSource> and <library> values for MS SQL:
<dataSource id="tenx" jndiName="jdbc/tenx"> 
    <jdbcDriver libraryRef="MSJDBCLib"/>
    <properties.microsoft.sqlserver databaseName="spe2" serverName="servername" portNumber="1433" user="speuser" password="password"/>
  </dataSource>
<library id="MSJDBCLib">
     <fileset dir="${server.config.dir}/apps/spe.war/WEB-INF/lib" includes="mssql-jdbc-12.2.0.jre8.jar" />
    </library>
Example server.xml file (complete) for MS SQL:
<server description="new server">
<!-- Enable features -->
<featureManager>
   <feature>jsp-2.2</feature>
     <feature>jdbc-4.0</feature>
     <feature>jpa-2.0</feature>
     <feature>localConnector-1.0</feature>
</featureManager>

<httpEndpoint host="localhost" httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>
     <httpSession idReuse="false" cookieName="JSESSIONIDSPE" rewriteId="jsessionidspe" allowOverflow="true" invalidationTimeout="3600"/>
    
<dataSource id="tenx" jndiName="jdbc/tenx">
    <jdbcDriver libraryRef="MSJDBCLib"/>
    <properties.microsoft.sqlserver databaseName="spetest" serverName="servername" portNumber="1433"  user="spetest" password="password"/>
</dataSource>
<library id="MSJDBCLib">
     <fileset dir="${server.config.dir}/apps/spe.war/WEB-INF/lib" includes="mssql-jdbc-12.2.0.jre8.jar"/>
</library> 
    
<applicationMonitor updateTrigger="mbean"/>
<config updateTrigger="disabled"/>

     <application id="spe" location="spe.war" name="spe" type="war"/> 
 <logging consoleLogLevel="INFO" traceSpecification="*=info:com.ibm.tenx.*=fine:openjpa.jdbc.SQL=fine"/>
</server>