When a Java user-defined node is packaged as a PAR file, the Java user-defined node is loaded in a separate classloader. The classloader loads any class that is packaged within the deployed PAR. The classes that are placed in the JAR override any classes that are in the shared classes directory or the CLASSPATH environment variable. If the deployed PAR contains more than one node type, the nodes share the same classloader. Therefore, a set of user-defined nodes that share static data should be packaged in a single PAR file. Java user-defined nodes that are packaged as simple JAR files are loaded in the same classloader. The classes and the location from which they are loaded are written to user trace, so you can use this information to check that the correct classes are being loaded.
The broker uses the following classloader tree:
User-defined nodes package in a PAR
User-defined nodes package in a JAR
The endorsed standards overriding mechanism allows the following standard packages to be overridden in the JRE:
To override these packages in the broker, place the JAR files for the API standards in the /lib directory of the PAR.
Thread.currentThread.setContextClassLoader(this.getClass().getClassLoader());