commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Commented: (JELLY-85) TagScript doesn't clear its cached tags after run()
Date Thu, 12 Aug 2004 03:52:20 GMT
The following comment has been added to this issue:

     Author: dion gillard
    Created: Wed, 11 Aug 2004 8:51 PM
This patch has broken the define taglib and it's test cases.

I'm backing it out until a replacement patch can be made that doesn't do this.
View this comment:

View the issue:

Here is an overview of the issue:
        Key: JELLY-85
    Summary: TagScript doesn't clear its cached tags after run()
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: jelly
             core / taglib.core

   Reporter: Scott Howlett

    Created: Tue, 16 Sep 2003 8:16 PM
    Updated: Wed, 11 Aug 2004 8:51 PM

TagScript caches the tags it generates in a ThreadLocal. At the beginning of run() it checks
to see if the context wants to cache tags - if not, it clears the cache and regenerates it.

But there is no corresponding check and cache clearing at the end of run(). So if a tag holds
onto some significant resource, that resource will hang around until the thread goes away
or until the tag is run again.

I am using Jelly Swing extensively, and various tags end up attached to the AWT Event thread
for the lifetime of my application.

As a quick fix, I have a patch that simply repeats the check-and-clear-cache behavior at the
end of I also have a patch that adds this behavior to StaticTagScript, whose
run() never seems to clear cached tags.

I am probably just unclear, but it seems to me that there is a deeper issue as well - the
context is being asked whether it wants to cache tags, but the result of this question affects
the TagScript, which is really independent of the context. It seems like if context wants
to cache tags, perhaps the ThreadLocal used for their storage ought to belong to the context

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message