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





------- Additional Comments From [EMAIL PROTECTED]  2005-04-24 06:01 -------
Created an attachment (id=14815)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=14815&action=view)
Removing Context caching from InsertTag

(In reply to comment #2)
> Using Tomcat the cached context is not reset either but Tomcat appears to not

> reuse the tag despite tag pooling is enabled and therefore the problem does  

> not surface.

I investigated this in Tomcat - I created a custom version of InsertTag which
logged when it was being created and when it was being re-used from the pool. I
then repeated the InsertTag eight times on the same page with the same
attributes, but different body contents. From my logs Tomcat only created one
instance and re-used it. Then I caused an exception in the body content of the
fourth tag - this time Tomcat used the same tag for the first four occurances,
but for the fifth, after the exception in the fourth, it created a new
instance. So it looks like Tomcat's tag pooling strategy is smarter than Orions
- if an exception occurs the pooled tag doesn't appear to be re-used again.

Having said all that, it doesn't address the problem in Orion.

* Looking at InsertTag, the cachedCurrentContext is there just to improve
performance, rather than getting the context out of the request each time.

* It is only accessed from the getCurrentContext() and releaseInternal()
methods. The getCurrentContext() method is only called from the processName()
method, processAttribute() method and the InsertHandler's doStartTag() method.

* When a "name" or "attribute" attribute is used on the InsertTag it is called
twice and therefore saves accessing the Request once and for the other
attributes actually saves nothing as its only ever called once from the
InsertHandler. Therefore I propose that we remove this caching mechanism
altogether to resolve this issue and believe the performance impact will be
minimal.

The patch I'm attaching shows what I propose to give others the opportunity to
comment before committing this.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to