tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <epr...@ptc.com>
Subject Re: Tag object reuse (pooling) in jsp 2.0?
Date Thu, 23 Jan 2003 13:46:45 GMT
I am guessing you are referring to custom tags?  Do you have a link to 
more information about this because I am new to custom tags and have 
never heard of this before.  Of course I would want to write my tags the 
"right" way, whichever way that is...


Erik


Joe Tomcat wrote:
> The current wisdom on object pooling is "don't do it", with the
> exception of expensive objects like database connections, etc.  Right
> now, jsp uses object pooling of tag objects, in theory to attain higher
> performance.  This might have made sense back in the old days, but now
> must Tag objects are very simple with only a few fields, and can be
> created and GCed very efficiently.  Is tag object pooling going to go
> away with jsp 2.0?
> 
> I'm hoping that it will, for two reasons.  First, that will make writing
> tags simpler.  The whole reason we are using Java instead of C++ is
> because in Java we let the GC do the cleanup work for us.  That results
> in much more stable software.  Right now, tags have to be written in
> such a way that they do their own cleanup.  The second reason is that
> tags should have all their fields set in the constructor, perhaps using
> a Map as an argument.  This seems strange but has the advantage that the
> tag object can then be made immutable, which has a large set of
> benefits.
> 
> Opinions?
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message