[ http://issues.apache.org/jira/browse/TAPESTRY-346?page=all ] Jesse Kuhnert resolved TAPESTRY-346: ------------------------------------
Resolution: Won't Fix If there is a discernable patch or issue logged that someone could follow and do something about it will likely be fixed. > Memory leak then reseting pages.. > --------------------------------- > > Key: TAPESTRY-346 > URL: http://issues.apache.org/jira/browse/TAPESTRY-346 > Project: Tapestry > Type: Bug > Versions: 3.0.3 > Environment: windows xp > Reporter: Tomas Jucius > Priority: Critical > > Here what I have found.. I can't develop my project because of this.. > Because it depends on this feature.. > As we all know tapestry put all things into pool ant it retrieves it > when you request for page and etc... > My application sometimes need to reset this pool.. > So I use reset service.. > But after a lot of resets jvm memory becomes full, and I get > "java.lang.OutOfMemoryError" > So after each reset some object are not collected.. And some > references to objects are left.. I could't find where.. > if in class AbstractEngine you comment these lines in clearCachedData method > _pageSource.reset(); > _pool.clear(); > when memory usage stops growing bet pool is not cleared:).. > So I suppose what pool is buggy or something else.. couldn't figure.. > TO SEE THIS BUG DEPLOY NEW APPLICATION WITH THESE FILES: > -----------------------------HomePage.java------------------------------- > mport java.io.IOException; > import java.util.Map; > import org.apache.tapestry.IMarkupWriter; > import org.apache.tapestry.IRequestCycle; > import org.apache.tapestry.Tapestry; > import org.apache.tapestry.engine.IEngineService; > import org.apache.tapestry.html.BasePage; > import org.apache.tapestry.util.prop.PropertyFinder; > public class HomePage extends BasePage { > public void beginResponse(IMarkupWriter writer, IRequestCycle cycle) { > // TODO Auto-generated method stub > System.out.println("redirect " + > cycle.getEngine().isResetServiceEnabled() + " " + > (Runtime.getRuntime().totalMemory()) ); > redirectToResetService(cycle); > try { > Thread.sleep(200); > } > catch (InterruptedException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > super.beginResponse(writer, cycle); > } > public void redirectToResetService(IRequestCycle cycle) { > IEngineService resetService = > cycle.getEngine().getService(Tapestry.RESET_SERVICE); > try { > > cycle.getRequestContext().redirect((resetService.getLink(cycle, > this, null).getURL())); > resetService = null; > } > catch (IOException e) { > e.printStackTrace(); > } > } > } > ------------------------------Home.page----------------------- > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE page-specification PUBLIC > "-//Apache Software Foundation//Tapestry Specification 3.0//EN" > "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd"> > <!-- generated by Spindle, http://spindle.sourceforge.net --> > <page-specification class="HomePage"> > </page-specification> > ---------------------------Home.html------------------------------ > <html> > <head> > </head> > <body> > <div jwcid="@Insert" value="leak" /> > </body> > </html> > OPEN YOUR APPLICATION WITH EXPLORER IT HAS NO REDIRECTION LIMIT.. > AND YOU CAN SET MAX MEMORY PROPERTY TO: -Xmx3M > IF THEREIS NO ANY COMPONENT in page when it is not leaking (so I put > this insert).. > So maybe of component specifications it is leaking? > Used profiler.. I didn't see growing any tapestry object only > java.util.* classes.. > Appreciate all your notes... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]