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 2006/02/16 11:48:58 UTC

DO NOT REPLY [Bug 38676] New: - permanently reloading tagfile classes without changes to the tagfile

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=38676>.
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=38676

           Summary: permanently reloading tagfile classes without changes to
                    the tagfile
           Product: Tomcat 5
           Version: 5.0.28
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: georg.zimmermann@gmx.de
                CC: georg.zimmermann@gmx.de


Scenario:

- jsp with a tag in it (tagfile, no taglib)
- activate "reloading" in web.xml
- clean work directory
- start tomcat
- load jsp

Tomcat generates/compiles/load the jsp and the tagfile classes. After
"checkInterval" seconds the background compile thread "JspRuntimeContext[\*]"
loads the tagfile classes (and only them) again and again. This produces a lot
of work for the garbage collector. (permanently class unloading of tagfile classes)

A Breakpoint in the method loadTagFile() in JspServletWrapper.java will show
this. Perhaps the reload flag must be set to false after loading the TagFile?

JspServletWrapper.java:
...

if(reload) {
   tagHandlerClass = ctxt.load();
   reload = false;  //perhaps, this solves the problem but i am not shure
}

...

After restarting the server the problem is not present because no
JspServletWrapper is instantiated for the tagfile an therefore the backround
compile task does not check the tagfile.

-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 38676] - permanently reloading tagfile classes without changes to the tagfile

Posted by bu...@apache.org.
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=38676>.
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=38676





------- Additional Comments From georg.zimmermann@gmx.de  2006-02-16 12:57 -------
Created an attachment (id=17712)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17712&action=view)
WebApp with a simple JSP  and Tagfile


-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 38676] - permanently reloading tagfile classes without changes to the tagfile

Posted by bu...@apache.org.
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=38676>.
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=38676


buckett@bumph.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matthew.buckett@oucs.ox.ac.u
                   |                            |k




-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 38676] - permanently reloading tagfile classes without changes to the tagfile

Posted by bu...@apache.org.
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=38676>.
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=38676


rainer.jung@kippdata.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From rainer.jung@kippdata.de  2006-06-10 07:56 -------
Fixed in 5.0 HEAD. Consistent Changes applied to 5.5 and 6.0, although the
problem was hidden in these versions.

-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 38676] - permanently reloading tagfile classes without changes to the tagfile

Posted by bu...@apache.org.
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=38676>.
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=38676





------- Additional Comments From rainer.jung@kippdata.de  2006-02-19 21:13 -------
I think you are right. There are two things:

1) When JasperLoader loads a class it checks if the class has already been
loaded by the super URLClassLoader. But in our case a new instance of
JasperLoader is used every time JspCompilationContext.load() is being called. So
the TagFile class is really loaded every time load is called for it. For Tomcat
5.5 this changed, the JasperLoader is being reused, so the problem is hidden by
that.

2) For Servlets the attribute reload of JspServletWrapper is used to determine,
if the servlet should be reloaded.

ctxt.load() is being called in the JspServletWrapper methods:

- getServlet() if reload is true
- loadTagFile() if reload is true
- getDependants() if isTagFile and reload are true

reload is set to true:

- as default in JspServletWrapper 
- in JspServletWrapper.setServletClassLastModifiedTime() after updating the
mtime to true
- in JspCompilationContext.compile() if isPackagedTagFile or
jspCompiler.isOutDated()

reload is set to false:

- in JspServletWrapper.getServlet() after loading to false

So I think, yes, reload has to be set to false in loadTagFile().

-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org