Change the schema name in the Java EE database logger for MFT

The Java Platform, Enterprise Edition (Java EE) database logger can use a database that has a non-default schema name. We must change the schema name in the Java EE database logger EAR file.


To change the name of the schema that the Java EE database logger uses, complete the following steps:


Procedure

  1. Extract the JPA JAR file from the EAR file by using the following command:
    jar -xvf ear_file lib/jpa_file
    where:

    • ear_file is com.ibm.wmqfte.databaselogger.jee.oracle.ear or com.ibm.wmqfte.databaselogger.jee.ear depending on whether we are using Db2 or Oracle.
    • jpa_file is com.ibm.wmqfte.web.jpa.oracle.jar or com.ibm.wmqfte.web.jpa.jar depending on whether we are using Db2 or Oracle.

  2. Extract the persistence.xml file from the JPA JAR file by using the following command:
    jar -xvf lib/jpa_file META_INF/persistence.xml
    where:

    • jpa_file is com.ibm.wmqfte.web.jpa.oracle.jar or com.ibm.wmqfte.web.jpa.jar depending on whether we are using Db2 or Oracle.

  3. Edit the persistence.xml file to change the following line:
    <property name="openjpa.jdbc.Schema" value="schema_name" />
    where

    • schema_name is the schema name we want to use.

  4. Update JPA JAR with the modified persistence.xml file by using the following command:
    jar -uvf lib/jpa_file META_INF/persistence.xml
    where:

    • jpa_file is com.ibm.wmqfte.web.jpa.oracle.jar or com.ibm.wmqfte.web.jpa.jar depending on whether we are using Db2 or Oracle.

  5. Update the EAR file with the modified JPA JAR file by using the following command:
    jar -uvf ear_file lib/jpa_file
    where:

    • ear_file is com.ibm.wmqfte.databaselogger.jee.oracle.ear or com.ibm.wmqfte.databaselogger.jee.ear depending on whether we are using Db2 or Oracle.
    • jpa_file is com.ibm.wmqfte.web.jpa.oracle.jar or com.ibm.wmqfte.web.jpa.jar depending on whether we are using Db2 or Oracle.


What to do next

Use the modified EAR file to install the Java EE database logger. Parent topic: Installing the Java EE database logger for MFT


Related tasks