Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Refreshing the contents of a ResourceBundle w/o JVM restart?

 
Grigory O. Ptashko
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

Is it possible to add new properties to a resource bundle without restarting a jvm?

The exact case is: we have all the language specific strings in property files and as you know they are loaded after a jvm started. Our weblogic starts in about 3 minutes or something and there is no way to make the process of adding a new property to a resource bundle and seeing on the html page in the browser..

The current scheme is:

1. Add the property to a bundle.
2. Stop weblogic
3. Start weblogic

It takes about 5 or 6 minutes. It is very long for me. Is there a way to make it faster (maybe by loading bundles w/o jvm restart)?

Thanks.
 
Zip Ped
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Try this link : http://www.javaworld.com/javaworld/javatips/jw-javatip125.html

Also, there is another way you can reload the changes without restarting the server. I think you need to read the property file again, put the values in a HashMap and put it under the session. In the JSP you need to use the session object to populate the values in the properties file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic