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" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to