-
1. Re: Auto-deploying and memory leaks
starksm64 May 5, 2005 10:31 AM (in response to bmelloni)There have been issues with several different components hanging on the class loaders across deployments which causes leaks. Create a jira issues if you have a reproducible deployment leak.
-
2. Re: Auto-deploying and memory leaks
dissonance May 9, 2005 6:42 PM (in response to bmelloni)Sometimes, the result of the OutOfMemory error (I assume this is in the PermGen space since I've encountered this error myself) is because of the JavaBeans Introspector's cache not being garbage collected on redeployments. I found this out indirectly looking at
http://www.springframework.org/docs/api/org/springframework/web/util/IntrospectorCleanupListener.html
Here's an excerpt from the java.beans.Introspector javadocs:
"Because the Introspector caches BeanInfo classes for better performance, take care if you use it in an application that uses multiple class loaders. In general, when you destroy a ClassLoader that has been used to introspect classes, you should use the Introspector.flushCaches or Introspector.flushFromCaches method to flush all of the introspected classes out of the cache"
If you don't use Spring, just implement the ServletContextListener and in your contextDestroyed method, be sure to call Introspector.flushCaches, then plug your listener in web.xml
From JBoss' side, you can also try looking at the Wiki:
http://wiki.jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenRedeploying
Cheers
-j yi -
3. Re: Auto-deploying and memory leaks
dissonance May 9, 2005 7:35 PM (in response to bmelloni)I need to read the dates of these posts before replying : p