On Sun, 18 Mar 2001, Casey Lucas wrote:

> [snip]
> I was thinking of something like:
> 
> If an exception is thrown (from any code, not necessarily the tag) during
> the scope of a tag handler's use (between doStartTag and doEndTag), then
> that tag should be removed from the pool because its state can not be
> guaranteed.
> 

Thinking more about it, this is definitely the safer approach.  The
scenario I described earlier is mostly a development-time issue
anyway; tag instances should throw exceptions rarely in a production
environment so the "cost" of not recycling them is pretty low.

> Of course this is only a Tomcat 3.x issue because JSP 1.2 introduces the
> TryCatchFinally interface.  If a tag must perform state maintenance at
> the end of its use, then it will just use the doFinally method.  By using
> doFinally, the container does not have to make any assumptions about
> a tag handlers possible reuse -- the tag must ensure its ability to
> be reused.
> 

Even in JSP 1.2, it still matters, because we are required to run a JSP
1.1 application (which cannot use TryCatchFinally).  So, the same
reasoning applies.

> -Casey
> 

Craig


Reply via email to