Praveen Tapashetti wrote:
>
> But I want a feature in which every time properties file is changed, new
> values should be loaded without restarting the server. Is there any
> work-around for this??
Sure, here are a few suggestions:
- Implement a service in the servlet, such that if that service is
invoked by a client, the servlet reloads the properties file or resource
bundle. This would be a manual update.
- Start a separate thread in a class that monitors the proerties file.
When it sees that the file is changed, it makes a callback to the
servlet and the servlet reloads the properties file.
- Every time you change the properties file, update the time-stamp of
the servlet which will force the servlet to be reloaded, which should
load the new properties file.
In the first two suggestions, you will need to guard against changing
the properties while a request thread might be accessing the properties.
K Mukhar
___________________________________________________________________________
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