users@glassfish.java.net

Re: Glassfish JSTL implementation object releasing problem ?

From: <glassfish_at_javadesktop.org>
Date: Sat, 21 Jun 2008 04:18:17 PDT

Thanks for clarifying. The thing is that in our web apps we use large objects and traverse them in jsps using different jsp tags. With the current behavior, these objects may not get garbage collected if the pooled TagHandler instances stil reference them and this may (and quite possibly does) result in outofmemory problems.

How do i solve this ?

Setting the <b>poolingEnabled</b> parameter of <b>org.apache.jasper.servlet.JspServlet</b> to <b>false</b> or <b>tagpoolMaxSize</b> to <b>0</b> (as noted in http://www.nabble.com/TagHandlerPool-Memory-Problem-td16002619.html#a16002619 ) may be an option, but i'm not sure if that's something i want to do.

Looking at org.apache.jasper.compiler.Generator source and the java class generated from the jsp, the TagHandlerPool.release() methods are called in the <b>_jspDestroy()</b> method. I'm sure this must have been discussed somewhere sometime, but would it slow things down too much if the tagHandlerPools would release() the TagHandlers at the end of <b>_jspService()</b> method ?
[Message sent by forum member 'kolmis' (kolmis)]

http://forums.java.net/jive/thread.jspa?messageID=281787