Java original equipment manufacturer (OEM) API toolkit

To set up your environment, you need the Java™ original equipment manufacturer (OEM) API toolkits for IBM® Content Manager.

About this task

In Content Manager Enterprise Edition EE installation, the JAR file CMJavaOEMAPIToolkit.jar is found in IBMCMROOT/lib. To install the toolkit, extract the files from IBMCMROOT/lib/CMJavaOEMAPIToolkit.jar (for example, jar xvf IBMCMROOT/lib/CMJavaOEMAPIToolkit.jar) into the OEM API toolkit directory, for example, cmjavaOEMAPIInstallPath. Note that Content Manager Enterprise Edition does not have installed for the OEM API toolkit to work.
To begin your environment setup, do the following steps:
  1. If you use z/OS®, run a script that is called zossetup.sh to convert the necessary files into EBCDIC encoding then use the Java OEM API toolkit on z/OS under UNIX® System Services. Run this script before first use of the OEM toolkit. This script is in <cmjavaOEMAPIInstallPath>/bin/zossetup.sh. To run this script, use these commands:
    cd <cmjavaOEMAPIInstallPath>/bin
    ./zossetup.sh

    Henceforth, the term UNIX also includes the UNIX System Services on z/OS.

  2. Make sure that your Java environment setup is complete.
  3. Add the following directory and JAR files to your Java class path. <cmjavaOEMAPIInstallPath> = The location where the Java OEM Toolkit is installed.
    Windows
    • <cmjavaOEMAPIInstallPath>\cmgmt
    • <cmjavaOEMAPIInstallPath>\lib\cmbicmsdk81.jar
    • <cmjavaOEMAPIInstallPath>\lib\db2jcc4.jar
    • <cmjavaOEMAPIInstallPath>\lib\db2jcc_license_cisuz.jar
    • <cmjavaOEMAPIInstallPath>\lib\log4j-1.2.15.jar
    UNIX System Services
    • <cmjavaOEMAPIInstallPath>\cmgmt
    • <cmjavaOEMAPIInstallPath>\lib\cmbicmsdk81.jar
    • <cmjavaOEMAPIInstallPath>\lib\db2jcc4.jar
    • <cmjavaOEMAPIInstallPath>\lib\db2jcc_license_cisuz.jar
    • <cmjavaOEMAPIInstallPath>\lib\log4j-1.2.15.jar

    If Oracle is used, make sure that the Oracle JAR file (for example, ojdbc8.jar) is in the class path.

    The toolkit directory for Windows™ and UNIX System Services:

    Windows
    • <cmjavaOEMAPIInstallPath>\CMJavaOEMAPIToolkit.readme: Java OEM toolkit readme file
    • <cmjavaOEMAPIInstallPath>\cmgmt\cmbcmenv.properties: Used by the connector to find the other ini files and used by the logger to find cmblogconfig.properties
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmblogconfig.properties: Logger properties file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbicmenv.ini: Library server database connect id information ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbicmsrvs.ini: Library server information ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbpool.ini: WebSphere® connection pooling ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbrm.ini: Connector resource manager-related options ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbicmcache.ini: Global cache ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\ddo.dtd: DDO dtd file
    • <cmjavaOEMAPIInstallPath>\bin\cmbenvicm.bat: Windows environment setup bat file
    • <cmjavaOEMAPIInstallPath>\bin\cmbenvicm.sh: AIX® environment setup sh file
    • <cmjavaOEMAPIInstallPath>\lib\cmbicmsdk81.jar: IBM Content Manager V8 Connector JAR file
    • <cmjavaOEMAPIInstallPath>\lib\db2jcc4.jar: Db2® JCC JAR file IBM Content Manager V8 connector utility JAR file
    • <cmjavaOEMAPIInstallPath>\lib\db2jcc_license_cisuz.jar: Db2 JCC license JAR file
    • <cmjavaOEMAPIInstallPath>\lib\log4j-1.2.15.jar: Log4J JAR file
    UNIX System Services
    • <cmjavaOEMAPIInstallPath>\CMJavaOEMAPIToolkit.readme: Java OEM toolkit readme file
    • <cmjavaOEMAPIInstallPath>\cmgmt\cmbcmenv.properties: Used by the connector to find the other ini files and used by the logger to find cmblogconfig.properties
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmblogconfig.properties: Logger properties file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbicmenv.ini: Library server database connect id information ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbicmsrvs.ini: Library server information ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbpool.ini: WebSphere connection pooling ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbrm.ini: Connector resource manager-related options ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\cmbicmcache.ini: Global cache ini file
    • <cmjavaOEMAPIInstallPath>\cmgmt\connectors\ddo.dtd: DDO dtd file
    • <cmjavaOEMAPIInstallPath>\bin\cmbenvicm.bat: Windows environment setup bat file
    • <cmjavaOEMAPIInstallPath>\bin\cmbenvicm.sh: AIX environment setup sh file
    • <cmjavaOEMAPIInstallPath>\lib\cmbicmsdk81.jar: IBM Content Manager V8 Connector JAR file
    • <cmjavaOEMAPIInstallPath>\lib\db2jcc4.jar: Db2 JCC JAR file
    • <cmjavaOEMAPIInstallPath>\lib\db2jcc_license_cisuz.jar: Db2 JCC license JAR file
    • <cmjavaOEMAPIInstallPath>\lib\log4j-1.2.15.jar - Log4J JAR file
  4. Do the following steps in a command line window if your cmbicmenv.ini and cmbicmsrvs.ini have not been set up for your IBM Content Manager library server.

    Windows

    1. cd <cmjavaOEMAPIInstallPath>\bin Directory.

      If you are running Oracle, make sure to set the ORACLE_HOME to your Oracle home directory.

    2. Run cmbenvicm.bat : cmbenvicm <cmjavaOEMAPIInstallPath>
    3. cd <cmjavaOEMAPIInstallPath>\cmgmt\connectors Directory
    4. Run Java utility com.ibm.mm.sdk.util.cmbenvicm to add the database connect userid and password for cmbicmenv.ini.
      java com.ibm.mm.sdk.util.cmbenvicm -a add -s <library server database name> -u <database connect id> -p <database connect id password>
      To see more options, run the following without any input parameters: java com.ibm.mm.sdk.util.cmbenvicm

      For example: java com.ibm.mm.sdk.util.cmbenvicm -a add -s icmnlsdb -u icmconct -p password

    5. Run Java utility
      com.ibm.mm.sdk.util.cmbsrvsicm
      to add IBM Content Manager library server information to your cmbicmsrvs.ini.
      java com.ibm.mm.sdk.util.cmbsrvsicm -a add -s <library server database name> -sm <database schema> -r <database representation type> -rs <TRUE | FALSE> (remote server indicator (default FALSE)) -host <library server hostname> -port <library server port number> -rdb <library server remote database name> -os <NT | MVS | AIX | SUN | Linux | OS/400> (operating system type (default no value) -jdbcDriver <JDBC Driver main class Name> (default ) -jdbcConnectionURL <JDBC connection URL used to get the connection from Driver Manager> -jndiref <JNDI Indirect lookup reference resource string> (default ) -dbver <Database version> (default)

      Many of these options are optional.

      To see more options, run the following without any input parameters:

      java com.ibm.mm.sdk.util.cmbsrvsicm

      For example:

      Db2: java com.ibm.mm.sdk.util.cmbsrvsicm -a add -s icmnlsdb -sm ICMADMIN -r DB2 -rs TRUE -host cmwin.ibm.com -port 50000 -rdb icmnlsdb -os NT

      Oracle: java com.ibm.mm.sdk.util.cmbsrvsicm -a add -s icmnlsdb -sm ICMADMIN -r ORACLE -rs TRUE -host cmwin.ibm.com -port 1521 -rdb icmnlsdb -os NT - jdbcConnectionURL jdbc:oracle:thin:@//cmwin.ibm.com:1521/icmnlsdb

    UNIX System Services
    Note: For UNIX System Services, make sure that all the ini files, properties files, and directories have a permission of 775.
    1. cd <cmjavaOEMAPIInstallPath>\bin Directory

      If you are running Oracle, make sure to set the ORACLE_HOME to your Oracle home directory.

    2. Run cmbenvicm.sh : cmbenvicm <cmjavaOEMAPIInstallPath>
    3. cd <cmjavaOEMAPIInstallPath>\cmgmt\connectors Directory
    4. Run Java utility com.ibm.mm.sdk.util.cmbenvicm to add the database connect userid and password for cmbicmenv.ini.
      java com.ibm.mm.sdk.util.cmbenvicm -a add -s <library server database name> -u <database connect id> -p <database connect id password>
      To see more options, run the following without any input parameters:
      java com.ibm.mm.sdk.util.cmbenvicm

      For example:

      java com.ibm.mm.sdk.util.cmbenvicm -a add -s icmnlsdb -u icmconct -p password
    5. Run Java utility com.ibm.mm.sdk.util.cmbsrvsicm to add IBM Content Manager library server information to your cmbicmsrvs.ini.
      java com.ibm.mm.sdk.util.cmbsrvsicm -a add -s <library server database name> -sm <database schema> -r <database representation type> -rs <TRUE | FALSE> TRUE | FALSE -host <library server hostname> -port <library server port number> -rdb <library server remote database name> -os <NT | MVS | AIX | SUN | Linux | OS/400> (operating system type (default no value) -jdbcDriver <JDBC Driver main class Name> (default ) -jdbcConnectionURL <JDBC connection URL used to get the connection from Driver Manager> -jndiref <JNDI Indirect lookup reference resource string> (default ) -dbver <Database version> (default )

      Many of these options are optional.

      To see more options, run the following without any input parameters:

      java com.ibm.mm.sdk.util.cmbsrvsicm
      For example:
      java com.ibm.mm.sdk.util.cmbsrvsicm -a add -s icmnlsdb -sm ICMADMIN -r ORACLE -rs TRUE -host cmwin.ibm.com -port 1521 -rdb icmnlsdb -os NT - jdbcConnectionURL jdbc:oracle:thin:@//cmwin.ibm.com:1521/icmnlsdb
      Db2:
      java com.ibm.mm.sdk.util.cmbsrvsicm -a add -s icmnlsdb -sm ICMADMIN -r DB2 -rs TRUE -host cmwin.ibm.com -port 50000 -rdb icmnlsdb -os NT
      Oracle:
      java com.ibm.mm.sdk.util.cmbsrvsicm -a add -s icmnlsdb -sm ICMADMIN -r ORACLE -rs TRUE -host cmwin.ibm.com -port 1521 -rdb icmnlsdb -os NT - jdbcConnectionURL jdbc:oracle:thin:@//cmwin.ibm.com:1521/icmnlsdb
  5. The following log directories are created if they do not exist during runtime, if the relative path Java property com.ibm.mm.sdk.logtool.cmlogrelativepath=true or the cmbcmenv.properties keyword CMLOGRELATIVEPATH=TRUE is specified.
    Windows
    <cmjavaOEMAPIInstallPath>\cmlog\connectors
    UNIX System Services
    <baselogpath>\cmlog\connectors
    Base log path examples:

    Java property: com.ibm.mm.sdk.logtool.cmbaselogpath=C:\WebSphere\AppServer\profiles\AppSrv01\logs\server1\myapp

    CMBASELOGPATH keyword: CMBASELOGPATH= C:\\WebSphere\\AppServer\\profiles\\AppSrv01\\logs\\server1\\myapp

    These directories override the log directory that is specified in the cmblogconfig.properties keywords log4j.appender.apiAppender.File for the log4j logger and the DKLogOutputFileName for the default logger.

    If the log path cmlog/connectors must be created, there are two Java properties that allow you to specify the directory administration user and group directory owner. After the directory is created, the connector performs a chown for UNIX System Services to that user:group. Also, for UNIX System Services, the connector attempts to change the directory permission to 775, unless the Java property com.ibm.mm.sdk.logtool.cmlogadmperm is used with a different permission.
    • com.ibm.mm.sdk.logtool.cmlogadmuser=<userid>
    • com.ibm.mm.sdk.logtool.cmlogadmgroup=<userGroup>
    • com.ibm.mm.sdk.logtool.cmlogadmperm=<directory permission>
    Relative path methodology

    In order to find the ini file, the cmbcmenv.properties is found by the class path. Once the file is found, the connector searches for the Java property com.ibm.mm.sdk.common.cmrelativepath=true or the keyword CMRELATIVEPATH=TRUE. The relative path indicator tells the connector to find the ini files in the cmgmt/connectors directory, which is based on the location of the cmbcmenv.properties file that is found by the class path. The Java property takes precedence over the keyword.

    In order to find the cmblogconfig.properties file, which contains logging information, the cmbcmenv.properties is found by the class path. Once the file is found, the connector searches for the Java property com.ibm.mm.sdk.logtool.cmlogrelativepath=true or the keyword CMLOGRELATIVEPATH=TRUE. The relative path indicator tells the connector to find the cmblogconfig.properties file in the cmgmt/connectors directory, which is based on the location of the cmbcmenv.properties file that is found by the class path. The Java property takes precedence over the keyword.

    Test connection utility
    Once the ini files are set up to point to a library server, a test connection utility can be used to test the connection to the library server. This lets you know if their environment has been set up properly to connect to a library server. This test connection utility can be run in a command window.
    Be sure to run the cmbenvicm.bat or cmbenvicm.sh file that is mentioned in step 4.
    java com.ibm.mm.sdk.server.TTestConnectUtilityICM -server <LS database name> -userid <userid> -password <password> -connectString <connect string (optional)> -configString <configuration string (optional)>

    For example:

    java com.ibm.mm.sdk.server.TTestConnectUtilityICM -server icmnlsdb -userid icmadmin -password password