Hi,

You may want to check out the paper by Ted Neward at the following link
http://www.javageeks.com/Papers/JavaStatics/index.html

The archives of this list have discussions on this topic.
One of the threads is
http://archives.java.sun.com/cgi-bin/wa?A2=ind0010&L=servlet-interest&D=0&P=
88460

Regds,
Gokul


----- Original Message -----
From: "Servlets" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 10:32 AM
Subject: [SERVLET-INTEREST] class loader for sevlets


> I found this from an article. Can anyone explain me this line "This
doesn't
> work at all when static variables are involved since the special class
> loader..........."
>
> Resource URL: http://wackyhtml.com/columns/connection_pool.html
>
****************************************************************************
> ***********************************
> Class loader considerations
>
> Most Servlet Engines use a special class loader for Servlets to be able to
> automatically reload a Servlet when it is modified. This class loader
> handles all class files located in a special directory, typically named
> servlets. A common mistake among new Servlet developers is to also put
> helper classes, such as the connection pool classes described here, in the
> servlets directory. This doesn't work at all when static variables are
> involved since the special class loader creates a separate class instance
> for each Servlet. To avoid this problem you should place all helper
classes
> in the regular CLASSPATH used by the Servlet Engine. How you set the
> CLASSPATH varies between Servlet Engines so read the documentation for the
> product you use.
>
>
___________________________________________________________________________
> 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

___________________________________________________________________________
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