Why don't you have an initialization servlet that is set to load on startup and whose init method calls another method that actually loads the state information and puts it in application scope. You can also code the doGet() method of the servlet to call the initialization method. Whenever you want to reinitialize the state info, you would invoke the servlet. You might want to make sure there are no other users on the site when the state information is refreshed so that users don't access partially refreshed data.
-Richard At 07:51 PM 8/31/2005, you wrote:
Hi, I have a question. In my web application, when the user logs in, I have to load all State information from the database and display it.The State information will be common to all users.I would add new States into the database table. My question is what is the best way to get the state information from database and store it globally,so that, it can be shared by all users. If I use servlet for this, and load the state information in the init(), I have to restart the server whenever I add new state information to the database, inorder to get the new states.I don't want the server to get restarted whenever I add state information to database.SO, this option is not feasible. Is there any other way to do this? Any ideas/suggestions to resolve this issue would be very helpful for me. Thanks in advance. ___________________________________________________________________________ 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