A JBoss extension implementing a workaround for the JNDI/LDAP memory leak.
The JNDI/LDAP implementation that ships with Oracle's JVM has the potential to cause a classloader memory leak. Tomcat's JreMemoryLeakPreventionListener and Jetty's LDAPLeakPreventer both provide workarounds. JBoss does not appear to provide a workaround out-the-box, this JBoss extension provides one.
Build and package the extension using mvn package. This command will create a JBoss module for the extension under target/module. Copy the module to your JBoss installation by copying the com folder from under target/module to <JBOSS-HOME>/modules - merging with any existing modules that share the com package prefix.
Edit the JBoss standalone.xml configuration file as follows:
- Add
<extension module="com.scottlogic.ldapleakpreventer"/>to theextensionselement. - Add
<subsystem xmlns="urn:scottlogic:ldapleakpreventer:1.0"/>to theprofileelement. - Add the LDAP-specific properties to the
system-propertieselement. These properties can be specified at the command line or as environment variables, but must be present at the time the extension is loaded.