Dragomir asks:

> Currently, when I change data, I restart the server and initialize
> Globals in init method.  Is there anything more intelligent? How I
> can make sure that all requests in all servlets are completed so I
> can call public static synchronized void initialize(0 in Globals.  I
> need to make sure that all requests left their doPost/doGet.

     I'm told some servlet engines will allow you to dynamically poke
them and get them to reload things, and that yet others will
automatically reload the servlet when the file changes.

     I'm running into this same issue (we're using NES with Jrun) and
I've been writing my servlets so that if you invoke them with an
optional argument, they reload their config data.  This isn't great,
but it's better than bouncing the server every time I need to tweak a
config variable.

     One thing I've been considering is putting all of the config info
in a separate class and using some flavor of interservlet
communication.  Then I could just poke the special config class (or
maybe a config servlet) to reload the config data for all of the
servlets.  I'd be interested in hearing what approaches others have
used, particularly with servlet engines that don't provide a solution.

Steven J. Owens
[EMAIL PROTECTED]
[EMAIL PROTECTED]

___________________________________________________________________________
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