Deploying a third party or custom user .jar file

To use the third party code or code that is available from custom JARs, those custom JARs need to get deployed in to the system.

Before you begin

If you are deploying custom user .jar files, before you can deploy them, you must write your Java™ code.

Procedure

  1. If you are deploying a custom user .jar file, perform the following tasks on your development environment to produce the custom .jar file. If you are deploying a third party .jar, that .jar file should already be available and the following steps are not required.
    1. Compile your Java file. This generates a compiled .class file, for example: SearchService.class.
    2. Add your compiled .class file into a jar file:
      Type:
      jar -cvf /data/jars/AcmeServices.jar SearchService.class
                  
      AcmeServices is the name of the .jar file.
    3. Store the generated AcmeServices.jar in a directory on the IBM® InfoSphere® Master Data Management Collaboration Server - Collaborative Edition server.
  2. On the InfoSphere Master Data Management Collaboration Server - Collaborative Edition server perform the following tasks:
    1. Initialize your command-line environment.
    2. Stop your InfoSphere Master Data Management Collaboration Server - Collaborative Edition server if it is running. Type: $TOP/bin/go/stop_local.sh
  3. Add the custom user JAR file. Use either of the following methods:
    1. Copy the JAR file to the <install dir>/jars directory.
    or
    1. Add the paths, one per line, to the custom JAR file to bin/conf/classpath/jars-custom.txt.
    2. Save the jars-custom.txt file.
    The paths in the jars-custom.txt file can be absolute or relative to the <install dir> directory. If you use a relative path, the <install dir> directory is prepended to the value in the jars-custom.txt file. For example, /opt/ssce/lib/myjar.jar is an absolute path. When the runtime class path is assembled, the /opt/ssce/jars/myjar.jar path is added to the class path.

    Another example of an absolute path is somedir_under_install_dir/mydir/myjar.jar. When the runtime class path is assembled, the <install dir>/somedir_under_install_dir/mydir/myjar.jar path is added to the class path.

  4. Run the following script to update the runtime classpath:
    configureEnv.sh.
    A message displays stating that a .jar file was added.

    If the classpath parameter needs to reflect the latest custom JAR additions or deletions, ensure you use the $TOP/bin/updateRtClasspath.sh shell script to only update the classpath parameter in the env_settings.ini file without modifying other configuration files in the $TOP/etc/default directory. All InfoSphere Master Data Management Collaboration Server - Collaborative Edition services start with the classpath parameter as defined in the $TOP/bin/conf/env_settings.ini directory. For more information about the updateRtClasspath.sh shell script, refer to: updateRtClasspath.sh script.

  5. Re-deploy the .war file. Type:
    $TOP/bin/yourAppServer/install_war.sh
    yourAppServer is the name of your application server.

    If you are running WebSphere® Application Server , as an alternate approach, you can also add the .jar file directly from the WebSphere Application Server administrative console using the following path: Application servers > servername > Process Definition > Java Virtual Machine > Classpath.

  6. Restart InfoSphere Master Data Management Collaboration Server - Collaborative Edition.
    start_local.sh --rm_logs.