tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From QM <>
Subject Re: Multiple requests sharing the same Servlet instance
Date Wed, 16 Jun 2004 14:34:20 GMT
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."  =)



software  --
tech news --

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message