[jboss-jira] [JBoss JIRA] Commented: (JBAS-9397) Memory leak in EJB3.1 no interface view for stateful beans
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Wed Jun 1 06:12:01 EDT 2011
[ https://issues.jboss.org/browse/JBAS-9397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605732#comment-12605732 ]
jaikiran pai commented on JBAS-9397:
------------------------------------
Jürgen, can you please try the following steps and see if it fixes the issue:
1) Download the latest snapshot containing this fix from here https://repository.jboss.org/nexus/content/repositories/snapshots/org/jboss/ejb3/proxy/proxy-javassist/1.0.0-SNAPSHOT/proxy-javassist-1.0.0-20110601.100509-2.jar
2) Rename the downloaded file to proxy-javassist.jar
3) *Replace* the proxy-javassist.jar from JBOSS_HOME/common/lib with this new one (Take a backup of the original JBOSS_HOME/common/lib/proxy-javassist.jar if you want to).
4) Test it out.
Let us know how it goes. If it fixes the issue, I'll do a release and integrate it with 6.1.0 AS.
> 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: jaikiran pai
> Priority: Critical
> Fix For: 6.1.0
>
> Attachments: JavassistProxyFactory-patch.txt
>
>
> 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