Craig R. McClanahan wrote:

> Chris Pratt wrote:
>
> > Why not turn your resources into Singleton classes.  Since all the Servlets
> > in a server are running in the same JVM, they will all access this shared
> > resource with no more work being required.
> >     (*Chris*)
>
> It is true that the servlets are running in the same JVM, but it is not
> necessarily true that Singleton objects are shared.

It's also important to realize that the servlet spec doesn't guarantee that all
servlets are going to be running in the same VM. A good example of this would be a
servlet running in an engine that does load-balancing. If, however, you have full
control over the environment, this may not be an issue (yet).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann
[EMAIL PROTECTED]
Virtua Communications Corp
http://www.virtua.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to