Re: Re: Taglibs - Concurrency Issue #68

From: <>
Date: Tue, 9 Nov 2004 22:38:01 +0100

For good citizen principals and from examples of other tag libraries
(Standard), we should implement the 'release()' method to garauntee
ourselves that the state has been reset, no matter how the servlet
container is implemented-- a catch all, even for developers who extend
our tags and manipulate attributes.

Ryan Lubke <Ryan.Lubke_at_Sun.COM> wrote on 11/09/2004, 09:32:37 PM:
> 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: