I have a number of servlets that use information from a database.
Certain portion of information is read-only for clients and is changed
reletively rarely on the server by the administrator. For performance
reasons, servlets suck in this data in class Globals.
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.
Of course I can always use some kind of readers/writers locking
mechanism at the beginning/end of doPost/doGet.
But then what happens when a request dies in the middle of
doGet/doPost (bugs happen ;-) ).
Any idea? Is there anything in servlets that will let me
do the reinitialization when all requests are through?
It would be nice to have an admin servlet.
Thanks
Dragomir
___________________________________________________________________________
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