Re: Taglibs - Concurrency Issue #68

From: Adam Winer <>
Date: Tue, 09 Nov 2004 13:16:27 -0800

You're both right! :)

Ryan, you're correct with regards to JSP 2.0, where release() is *finally*
specified as called once before it is truly gone. However, JSP 1.2 was
(sadly) not quite so specific, and release() can be called repeatedly.
There's a diagram that's in both 1.2 and 2.0 where the 1.2 version has
an extra arrow leading away from the "release()" state.

So, in JSF 1.2, therefore, we can rely on the JSP 2.0 behavior, while
any JSF 1.1 release theoretically has to suffer all the behavior
allowed by JSP 1.2.

-- Adam

Ryan Lubke wrote:
> wrote:
>> I just downloaded the weekly build and was looking at Issue #68
>> (concurrency issues).
>> Some containers, as I know it, use tag pooling. They reset the Tag
>> objects by calling the "release()" method on them:
> Actually, I don't believe you can rely on the release() method being
> invoked on the pooled
> instance. According to the javadocs for release(), there could be
> multiple invocations of
> doStartTag()/doEndTag() before release() is called.
> Additionally, in the general docs for Tag it states that once doEndTag()
> is called, the handler
> instance is available for further invocations and is expected to
> maintain its state.
> The only time release() is guaranteed to be called is before the Tag
> instance is released by
> the container (for GC).
>> With the cool taglib generator that was written, I don't believe it
>> would be hard to implement releasing of tags across the board.
>> Currently, depending on the container, User A could set a bunch of
>> properties on the tag for her view, then User B could end up with those
>> same properties when the tag is used again in rendering his view.
> From section JSP.13.1
> "The JSP container may resuse classic tag handler instances for multiple
> occurences of the
> corresponding custom action, in the same page or in different pages, but
> only if the same
> set of attributes are used for all occurences. If a tag handler is used
> for more than once
> occurence, the container must reset all attributes where the values
> differ between the custom
> action occurences. Attributes with the same value in all occurences
> must not be reset. If an attribute
> values is set as a request-time attribute value (using a scription or EL
> expression), the container
> must reset the attribute between all reuses of the tag handler instance)."
>> -Jacob
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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