DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=26135>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26135





------- Additional Comments From [EMAIL PROTECTED]  2005-01-25 13:21 -------
After seaching the net I found that there indeed exists a problem with Struts 
that prevents web app class loaders from beeing garbage collected. The problem 
is that java beans information used by Struts is cached by 
java.beans.Introspector and never removed. A call to one of the methods 
java.beans.Introspector.flushCaches(), java.beans.Introspector.flushCaches
(Class) or org.apache.commons.beanutils.PropertyUtilsBean.clearDescriptors() 
would solve this.

After doing a bit more searching I found that the Spring framework solves this 
problem by providing a servlet context listener class 
(http://www.springframework.org/docs/api/org/springframework/web/util/Introspec
torCleanupListener.html) that calls Introspector.flushCaches() when a context 
is destroyed. 

To test this, I modified the web.xml of the struts-examples web app to include 
a listener definition using IntrospectorCleanupListener. After that I ran the 
WebPageConnector test program posted by James Norman on bug 32709. The program 
ran over 1500 redeploys before i turned it off, at which time the memory 
consumed by Tomcat (5.5) was about 30MB. Before the modification the program 
could only run about 110 redeploys before an OutOfMemoryError occurred.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to