Use the static singleton pattern to construct a States object to hold the static data.  Make sure it has some method to allow it to be reloaded on the fly.  Then add an extra web page to your web app (possibly with higher security) that allows you to reload the States singleton after you've updated the database.  Or even better have that page present you with a form to add the new State to both the singleton and the database in one fell-swoop.
  (*Chris*)

On 8/31/05, SUBSCRIBE EJB-INTEREST anonymous <[EMAIL PROTECTED]> 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

Reply via email to