[jboss-jira] [JBoss JIRA] Created: (JBAS-9397) Memory leak in EJB3.1 no interface view for stateful beans
Jürgen Koras (JIRA)
jira-events at lists.jboss.org
Mon May 30 03:22:00 EDT 2011
Memory leak in EJB3.1 no interface view for stateful beans
----------------------------------------------------------
Key: JBAS-9397
URL: https://issues.jboss.org/browse/JBAS-9397
Project: Legacy JBoss Application Server 6
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB
Affects Versions: 6.0.0.Final
Environment: All platforms
Reporter: Jürgen Koras
Assignee: Carlo de Wolf
Priority: Critical
Using a stateful no-interface bean causes a memory leak in PermGen space. This can easily be reproduced by creating and removing such a bean. On my machine it fails after 22500 instances.
The problem is that for each instance of a bean a new Proxy-class is generated.
This is done using javassist framework in the class org.jboss.ejb3.proxy.javassist.JavassistProxyFactory in method createProxy(Class[], InvocationHandler). Here the depreciated javassist method (instance).setHandler(...) is used. Due to documentation (http://www.csg.is.titech.ac.jp/~chiba/javassist/html/javassist/util/proxy/ProxyFactory.html) this call deactivates the cache!
The solution is simply to remove that call and pass the handler right in the (instance).create(...) method.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list