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
Procedure
- 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.
- Compile your Java file. This generates a compiled .class file, for example: SearchService.class.
- Add your compiled .class file into a jar file: Type:AcmeServices is the name of the .jar file.
jar -cvf /data/jars/AcmeServices.jar SearchService.class
- Store the generated AcmeServices.jar in a directory on the IBM® InfoSphere® Master Data Management Collaboration Server - Collaborative Edition server.
- On the InfoSphere
Master Data Management Collaboration Server - Collaborative Edition server
perform the following tasks:
- Initialize your command-line environment.
- Stop your InfoSphere
Master Data Management Collaboration Server - Collaborative Edition server
if it is running. Type:
$TOP/bin/go/stop_local.sh
- Add the custom user JAR file. Use either of the following methods:
- Copy the JAR file to the
<install dir>/jarsdirectory.
- Add the paths, one per line, to the custom JAR file to bin/conf/classpath/jars-custom.txt.
- 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.jaris 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. - Copy the JAR file to the
- Run the following script to update the runtime classpath:
A message displays stating that a .jar file was added.
configureEnv.sh.If the classpath parameter needs to reflect the latest custom JAR additions or deletions, ensure you use the
$TOP/bin/updateRtClasspath.shshell 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 theupdateRtClasspath.shshell script, refer to: updateRtClasspath.sh script. - Re-deploy the .war file. Type: yourAppServer is the name of your application server.
$TOP/bin/yourAppServer/install_war.shIf 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.
- Restart InfoSphere
Master Data Management Collaboration Server - Collaborative Edition.
start_local.sh --rm_logs.