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. The reason for this is
that many servlet engines implement customized class loaders so that they can
dynamically reload servlets that have changed, without restarting the servlet
engine. Classes that are loaded by different custom class loaders are not
shared.
The way to ensure that this approach will work for you is to ensure that your
Singleton classes are loaded from the system CLASSPATH for your servlet engine.
Craig McClanahan
___________________________________________________________________________
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