dev@javaserverfaces.java.net

Re: Taglibs - Concurrency Issue #68

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Tue, 09 Nov 2004 15:32:37 -0500

jacob_at_hookom.net 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).


>http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/Tag.html#release()
>
>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: dev-unsubscribe_at_javaserverfaces.dev.java.net
>For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net