public class ParentLastClassLoader
extends ClassLoader
The ParentLastClassLoader is needed because the OCSP/CRL feature for synapse uses a dependency
jar from bouncyCastle version bcprov-jdk16-1.46.jar. Apache Rampart which is a synapse
dependency for WS-Security also uses an older version of a bouncyCastle jar. The JVM loads the
older version thus making OCSP/CRL feature fail to function. This is known as Jar Hell in java
community. As a workaround, a Parent Last Class Loader is used to load the classes used by
OCSP/CRL feature from the relevant jar files. The default class loader hierarchy in Java is
Parent First. This custom ParentLastClassLoader overrides the default behaviour. If
ParentLastClassLoader could not load a class it will delegate the job to the parent, the system
class loader.