[jboss-dev-forums] [Design of EJB 3.0] - Re: EJB3 Classloader Leak (EJBTHREE-1442)

bstansberry@jboss.com do-not-reply at jboss.com
Wed Sep 10 19:04:45 EDT 2008


>From a JBoss Profiler analysis of this:

!--org.jboss.classloader.spi.base.BaseClassLoader at 166889468(BaseClassLoader at 9f287fc{vfszip:/home/bes/dev/jboss/clean/trunk/testsuite/output/lib/classloader-leak-ejb3.jar})
  | !--!--ClassLoaderReference @ java.lang.Class at 161343925(interface org.jboss.test.classloader.leak.ejb3.Ejb3StatelessSession)
  | !--!--!--ReferenceInterface at java.lang.Class@370564132(class $Proxy177)
  | !--!--!--!--arrayRef [Ljava.lang.Object;[0] id=@1684924387
  | !--!--!--!--!--FieldReference protected java.lang.Object[] java.util.Vector.elementData=java.util.Vector at 1804802967([class $Proxy177, class $Proxy178])
  | !--!--!--!--!--!--FieldReference private java.util.Vector java.lang.ClassLoader.classes=org.jboss.classloader.spi.base.BaseClassLoader at 1648466027(BaseClassLoader at 6241986b{vfsfile:/home/bes/dev/jboss/clean/trunk/build/output/jboss-5.0.0.CR2/server/all/deploy/ejb3-connectors-jboss-beans.xml})
  | !--!--!--!--!--!--!--FieldReference private java.lang.ClassLoader org.jboss.classloading.spi.dependency.policy.ClassLoaderPolicyModule.classLoader=org.jboss.deployers.vfs.plugins.classloader.VFSDeploymentClassLoaderPolicyModule at 116952494(VFSDeploymentClassLoaderPolicyModule ejb3-connectors-jboss-beans.xml:0.0.0)

... carries on into the default classloading domain.


Looks like a proxy class loaded by the ejb3-connectors-jboss-beans.xml classloader is holding a ref to the org.jboss.test.classloader.leak.ejb3.Ejb3StatelessSession loaded from the ejb deployment.  I think this is a manifestation of the problem in SessionProxyFactoryBase discussed at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=141165. I bet if you limit the creation of an alternative proxy to cases where the caller classloader's version of the business interface is distinct from the standard one, this leak will go away.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175721#4175721

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175721



More information about the jboss-dev-forums mailing list