[jboss-dev-forums] [Design of POJO Server] - Re: JBAS-5376: leak of webapp classloader when deployed in e
adrian@jboss.org
do-not-reply at jboss.com
Mon Apr 7 11:58:59 EDT 2008
The patch is fairly simple (see the change to undeploy below).
If you can't wait for the next release of jboss-deployers
then we could just copy the fixed deployer into the AS project as a temporary fix.
| Index: deployers-impl/src/main/org/jboss/deployers/plugins/classloading/AbstractLevelClassLoaderSystemDeployer.java
| ===================================================================
| --- deployers-impl/src/main/org/jboss/deployers/plugins/classloading/AbstractLevelClassLoaderSystemDeployer.java (revision 71766)
| +++ deployers-impl/src/main/org/jboss/deployers/plugins/classloading/AbstractLevelClassLoaderSystemDeployer.java (working copy)
| @@ -21,6 +21,7 @@
| */
| package org.jboss.deployers.plugins.classloading;
|
| +import org.jboss.classloader.spi.ClassLoaderDomain;
| import org.jboss.classloader.spi.ClassLoaderSystem;
| import org.jboss.classloading.spi.dependency.ClassLoading;
| import org.jboss.classloading.spi.dependency.Module;
| @@ -136,8 +137,22 @@
| ClassLoader classLoader = unit.getClassLoader();
| try
| {
| - // Remove the classloader
| - system.unregisterClassLoader(classLoader);
| + try
| + {
| + // Remove the classloader
| + system.unregisterClassLoader(classLoader);
| + }
| + finally
| + {
| + // Try to tidy up empty domains
| + String domainName = module.getDeterminedDomainName();
| + if (ClassLoaderSystem.DEFAULT_DOMAIN_NAME.equals(domainName) == false)
| + {
| + ClassLoaderDomain domain = system.getDomain(domainName);
| + if (domain.hasClassLoaders() == false)
| + system.unregisterDomain(domain);
| + }
| + }
| }
| finally
| {
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142127#4142127
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142127
More information about the jboss-dev-forums
mailing list