• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Best way to place property file values in Webspehere

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

What is the best way to place property file values in web sphere so that I can change them from admin console

Thanks
 
Ravi Narula
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anybody?

Thanks.
 
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know of a way where you can edit the property file values directly from the WAS console.

Key points to consider are:

1. Bundle the property file(s) in the jar that uses it. Requires you to deploy new jar every time property has to change.

2. Keep the property file outside application EAR/WAR/JAR file(s) but in a location like "\WebSphere\AppServer\profiles\<profile>\config\cells\<cell name>", which WAS will copy in all the nodes within ND environment.

3. The name of the property file can be either hard-wired in the application OR picked up from a WAS variable.

4. You can change the property file under "config\cells\<cell name>" folder and WAS will sync it up with all the nodes in ND environment. In Base env you are all set anyways.
 
Ravi Narula
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deepak Pant wrote:I don't know of a way where you can edit the property file values directly from the WAS console.

Key points to consider are:

1. Bundle the property file(s) in the jar that uses it. Requires you to deploy new jar every time property has to change.

2. Keep the property file outside application EAR/WAR/JAR file(s) but in a location like "\WebSphere\AppServer\profiles\<profile>\config\cells\<cell name>", which WAS will copy in all the nodes within ND environment.

3. The name of the property file can be either hard-wired in the application OR picked up from a WAS variable.

4. You can change the property file under "config\cells\<cell name>" folder and WAS will sync it up with all the nodes in ND environment. In Base env you are all set anyways.



Hi Deepak,

Thanks for the reply. Is it possible for you to direct me to an example on the web for the above? Mainly placing the property file in the config\cells folder and how to read it from there? I'd really appreciate it.
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No I don't have a sample code. I have it read in IBM Redbooks and used this concept myself in WebSphere clustered ND environment. You don't have to hardcode the path in the application. You can get WAS_CONFIG_ROOT or USER_INSTALL_ROOT type system properties and then add cell name to it.
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of or WAS variable or hard coding the path, create a URL resource. Here is an example.

http://www.ibm.com/developerworks/websphere/library/techarticles/0502_botzum/0502_botzum.html

Thanks
Anant
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes that would work as well. For ND environments copying the property file to all nodes would be required. Keeping it under config/cells makes it easier as WAS will copy it to all nodes.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic