Software AG Products 10.7 | Administering Integration Server | Class Loading in Integration Server | Where to Put Your Classes and Jar Files
 
Where to Put Your Classes and Jar Files
If you are using your own classes developed by your company or classes from a third-party library, you can control the visibility and loading order of these classes. Class visibility refers to whether the classes and jar files will be or need to be visible to all the classes in Integration Server or to a particular package only.
Use the following guidelines to help you decide where to put your class files and jar files.
*If a class or jar file is needed only by services in one Integration Server package, put it in the package's code/classes or code/jars directory.
*If a class or jar file is needed by a second Integration Server package, keep the class or jar in the package that it already resides in and establish a package dependency on the first package. You can accomplish this by using Designer to establish a dependency on the first package from the second package or by modifying the second package's manifest.v3 file to require the first package.
*If additional Integration Server packages need the class or jar file, and the package dependencies are becoming difficult to manage, do one of the following:
*If it is a jar or zip file, move it to the package's code/jars/static directory. This will add the jar or zip to the server's classpath and make it available to all packages.
*If it is a class or a set of classes and you are using Integration Server, add the full path to the parent directory in one of these lines in the following file: Software AG_directory\profiles\IS_instanceName\configuration\custom_wrapper.conf
wrapper.java.additional.202=-Dwatt.server.prepend.classes=
wrapper.java.additional.203=-Dwatt.server.append.classes=
*If it is a class or a set of classes and you are using Microservices Runtime, add the full path to the parent directory in one of the Java system properties in the following file: Software AG_directory\Integration Server_directory\bin\setenv.bat(sh)
APPENDCLASSES
PREPENDCLASSES
*If your package needs a different version of a class or jar file than one that resides in another package, copy the version you need to your package's code/classes or code/jars directory.
*If your package needs a different version of a class or jar file than one that is on the server classpath, do the following:
1. Copy the version you need to your package's code/classes or code/jars directory.
2. Change your package's classloader property to "package".
*When a Java security provider is registered with the JVM, the provider is available to all Integration Server packages. Java security is implemented in such a way that the JVM retains the implementation of the provider along with its class loader and makes this implementation available to every process running within the JVM. This affects other Integration Server packages as well as any other installed products that run in the JVM. For this reason, registering additional security providers or overriding existing ones should be done with caution.