tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Wuttke <wutt...@lu.unisi.ch>
Subject Potential reuse of TagHandlers implementing JspIdConsumer?
Date Wed, 15 Oct 2008 12:21:13 GMT
Hi,

for my research project I've been doing some ApsectJ magic with Tomcat  
and deployed WebApps. Among other things I'm interested in detecting  
at runtime when TagHandlers instantiated in a HttpServlet go out of  
scope. Since that can't be done with AspectJ I was tracking garbage  
collection to see when the objects get removed. To be sure that that  
made some sense I looked at where the servlet code instantiates the  
TagHandlers, and since they are created and used as local variables, I  
was expecting them to be collected after the servlet finishes  
processing.
Unfortunately, a few experiments showed that that is not the case.   
After delving into the details of the servlet code generated for JSP  
pages I discovered that the methods instantiating TagHandlers also  
store them in TagHandlerPools using #reuse().
I'm doing my experiments with a demo application for Java Server  
Faces, and all JSF tag handler implement  
javax.servlet.jsp.tagext.JspIdConsumer. The spec says that handler  
implementing that interface may not be reused, so I was wondering if  
this is a potential bug or if I'm missing some intricate detail of how  
things work.

Thanks,
Jochen

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


Mime
View raw message