• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

property file dynamic vs static

 
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May i know the property file or resource bundle we use in struts is dymic or static?
In otherwords, can we change value content in property file at runtime without having to restart the server or redeploy?
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Static.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:Static.



So if i want to change a button name from "X", which is comming from property file(resource bundle), to "Y". should I restart the server after making changes to value in property file?
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't have to restart the server, you have to redeploy your WAR or EAR.
Most servers can detect changes made to files and automatically redeploy. This is a convenience for development purposes. Not for production use.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:You don't have to restart the server, you have to redeploy your WAR or EAR.
Most servers can detect changes made to files and automatically redeploy. This is a convenience for development purposes. Not for production use.



May I know how property file get affected at the below mentioned time


compile
run
deploy
publish

want to make changes in the producation but dont want to stop, restart or recompile the server in order to avoid creating any problem to users who are using the web site.


Note: My plan is to make changes to the web site that is being used by across the world by thouseds of users. And the change is-- changing the button name from X to Y, and the button name X is to be changed in the property file only to Y.
 
Ranch Hand
Posts: 247
MyEclipse IDE MySQL Database Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can place you property file on any external location excluded from the application ..


so any changes done in property file does not need any Server start or even redeploy..


Regards ,
Raza
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Raza Mohd wrote:you can place you property file on any external location excluded from the application ..
so any changes done in property file does not need any Server start or even redeploy..



Property files don't automatically reload after a change, so you will still need a mechanism to detect changes and update the in-memory copy. Have a look at Apache Commons Configuration.
 
Raza Mohd
Ranch Hand
Posts: 247
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tested it with placing the property file on my hard drive and accessing it from the application..
So when i made any changes in property file, the changed Data was fetched by the Application .. it Does not require any Server resart or redeploy ..

I just checked it on my local machine....

reply
    Bookmark Topic Watch Topic
  • New Topic