> -----Original Message-----
> From: Felipe Schnack [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, February 03, 2003 3:15 PM
> To: Tomcat Users List
> Subject: RE: more about custam tag life cycle
> 
> 

> > > > I think there might be some benefit in clarity to the tag
> > > developer.
> > > > The current lifecycle behavior seems to confuse a lot of
> > > people (and I
> > > > was certainly one of those people when I first started 
> writing tag
> > > > extensions).
> > >   Yes, but add even more method would make it easier? Maybe
> > > just the way 
> > > the current methods are "defined" in the docs should be 
> > > changed. If you make it clear that doFinally() is ok for tag 
> > > reuse cleaning, everybody will use it for this.
> > Except that it's not, really.
>   Yes, but it can be done... to me seems simpler to change 
> the spec a little than add even more methods (this tends to 
> create even more confusion IMHO)

But, to reiterate, there isn't really any kind of useful "cleaning" you
can do in doFinally that doesn't break the spec in other ways.

> 
> > >   Tag reusing is so rare to be useful at all? Why?
> > Well I guess that's the conclusion they came to by JSP 2.0, and the 
> > rationale behind the SimpleTag interface.
>   Yes, but I guess it must be hard to know when is good to 
> pool a tag, 
> isn't it? :-)

Only when there is some kind of expensive operation necessary that could
be done once rather than per-invocation.  For example if you had a tag
that read a large configuration file that isn't expected to change while
the appserver is running, you obviously don't want to do that every time
the tag is called.  But for most simple tags, nothing like that is
necessary.

> 
>   My conclusion about my experience and all this debate is 
> that I should always initialize tag attributes with null, and 
> reset them in doFinally()...

Nope. :-)

You should reset them to null in release, and not change them at all
anywhere else (except for the setters, of course).
-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to