struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25125] New: - Violation of JSP spec: release() method and pageContext + parent
Date Mon, 01 Dec 2003 23:23:07 GMT
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=25125>.
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=25125

Violation of JSP spec: release() method and pageContext + parent

           Summary: Violation of JSP spec: release() method and pageContext
                    + parent
           Product: Struts
           Version: 1.1 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: mogsie@escenic.com


IMHO, it is a violation of the JSP spec to not reset the "pageContext" and
"parent" instance variables of the JSP Tag Handlers in the release() method. 
The Final JSP 1.2 spec states on page 164 (jsp-2.0 on page 2-55) that:

"Once a release method invoked _all_ properties, including parent and
pageContext, are assumed to have been reset to an unspecified value."

I propose (in all Tags):

  public void release() {
    ...
    this.pageContext = null;
    this.parent = null;
  }

One could argue that the "TagSupport" class should do exactly this in its
release() method, but Fat Chance... (see bug 13741.)

The problem I am experiencing with this is a memory leak which slowly eats up
memory, as old pooled tag handlers are kept in memory.  This leak is caused by
our own tag handlers as well as the Struts tag handlers. After 20 hours of peak
traffic, a heap dump shows thousands of PageContext objects kept in memory by
idle tag handlers; totalling to several hundreds of megabytes...

And, no, this has nothing to do with bug 13392 !

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


Mime
View raw message