Discussion of
http://jira.jboss.com/jira/browse/JBAS-5376.
I've walked through the deploy/undeploy of an ear with an embedded war, and here's
what I see. During deployment of the nested war:
AbstractLevelClassLoaderSystemDeployer.createClassLoader(DeploymentUnit) -->
VFSDeploymentClassLoaderPolicyModule.registerClassLoaderPolicy(ClassLoaderSystem system,
ClassLoader parent) -->
DefaultClassLoaderSystem.registerClassLoaderPolicy(String domainName, ParentPolicy
parentPolicy, Loader parent, ClassLoaderPolicy policy) -->
ClassLoaderSystem.createAndRegisterDomain(String name, ParentPolicy parentPolicy, Loader
parent)
Here we create a domain for the war and assign param "Loader parent" to the new
domain as it's parent. "Loader parent" has a ref to the ear classloader. We
then register the new domain with the classloader system. This sets up the chain of
references shown in the JIRA description.
During undeploy:
AbstractLevelClassLoaderSystemDeployer.removeClassLoader(DeploymentUnit unit) -->
BaseClassLoaderSystem.unregisterClassLoader(ClassLoader classLoader) -->
BaseClassLoaderSystem.unregisterClassLoaderPolicy(ClassLoaderPolicy policy)
that removes the ref to the *war's* poliyc/classloader from the war's domain, But
the war domain itself is never unregistered from the ClassLoaderSystem. So the ref to the
parent is leaked.
In an eclipse I don't see any calls at all to
ClassLoaderSystem.unregisterDomain(ClassLoaderDomain domain) anywhere.
ClassLoaderSystem.shutdown() removes all domains, but that doesn't help here.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142116#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...