tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hankin" <kei...@addr.com>
Subject Re: Multiple requests sharing the same Servlet instance
Date Wed, 16 Jun 2004 14:55:49 GMT
Yes, those are useful objects, but they can be set at init() time, so there
is no point in pooling since only one instance is needed.

----- Original Message -----
From: "QM" <qm300@brandxdev.net>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Wednesday, June 16, 2004 8:04 PM
Subject: Re: Multiple requests sharing the same Servlet instance


> On Wed, Jun 16, 2004 at 07:53:07PM +0530, Keith Hankin wrote:
> : Maybe I'm being dumb, but it seems to me that based upon what I'm
hearing,
> : there is no benefit of doing Servlet instance pooling since the Servlets
> : aren't true objects; they are merely places to put code, since no local
> : state is useful.
>
> Depends on how you look at it: they are true objects in that they are
> self-referential, and hold some (shareable) state.
>
> Check out the javadoc for the HttpServlet class: by default, the
> ServletConfig and some other vars are shared, and you're more than
> welcome to share thread-safe objects (such as a logger).  I'd certainly
> call those local objects "useful."  =)
>
> -QM
>
> --
>
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Mime
View raw message