You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/10/17 18:35:57 UTC

DO NOT REPLY [Bug 13392] - When tag pooling is enabled, release() is not called on tag instances

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13392

When tag pooling is enabled, release() is not called on tag instances

sgabriel@brainfuse.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From sgabriel@brainfuse.com  2003-10-17 16:35 -------
According to the specification the release method should be called before the 
tag is garbage collected. But the truth is when a programmer writes the code 
for a tag, he/she is expecting that it will be garbage collected at the end of 
the page. The tag pooling disable this behaviour which puts everybody in a 
tight spot. Still all tag handlers including the JSTL doesn't release the 
resources after they are done with them. I reviewed the guidlines posted on 
jakarta for creating tag library. But here is an example for your Remy, I have 
a page that uploads a file and creates a huge number of objects to be inserted 
into the database, it is like Access mapping of fields feature. At the end of 
the page with TagLibraries I am left with 20 MB of ram held in memory because 
both Struts Iterator tag and JSTL ForEachTag doesn't set the items collection 
to null until the release. Now i have to wait for the next iteration for this 
page to be called and still I will end up with 20 MB in memory. According to 
the guidelines these 20MB will never be released or garbage collected because 
the initial state of the tag will only be reinitialized in the doStartTag. 

I think there were too much discussion about this issue and I think 
practically every tag developer expects the release to be called at the end of 
the page. Disabling Tag Pooling is not an option for precompiled pages because 
JSPC Ant Task implementation returns a hardcoded true for the isPooling 
method. So now where can somebody go to fix this issue.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org