This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Websphere and the fly likes Application Property files in WebSphere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Application Property files in WebSphere" Watch "Application Property files in WebSphere" New topic
Author

Application Property files in WebSphere

Obi Kenobi
Greenhorn

Joined: Nov 02, 2005
Posts: 2
In my deployment set-up, I want to keep the application level
property files outside of the EAR file, so that if we ever need to
modify the contents of these files, we won't have to re-deploy the EAR
file.

There are two ways (that I know) to do this. One is hardcode the
location of the property file on the server, but that bring up the
issue of having J2EE components accessing resources on the server , not
to mention a bunch of other issues if we have a clustered setup. The
2nd option is using a URL provider. I'm trying to set it up as per the

WAS documentation but get a wierd error.

http://www-128.ibm.com/developerworks/websphere/library/techarticles/...

The error I get is ..

Context: mhubDevCell2/nodes/sun522mhub-devn2_1/servers/server1, name:
url/PhoenixProperties: First component in name PhoenixProperties not
found.

where "url/PhoenixProperties" is the JNDI name and "PhoenixProperties"
is the URL (resource) on the WAS instance.

Was wondering if anyone here has received this error and fixed it OR if
anyone here has a more graceful way to configure & deploy application
level property files
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3712
    
    5

Actually there's many ways to do what you are talking about. You could set up resource bundles on the server which contain property files and without having to re-deploy or reconfigure the EARs, reconfigure them to use different bundles.

You could set a server/jvm property that points to a specific directory or URL.

You could even serve the files/settings from a database.

There's a ton of possibilities for what you are asking, but the best, I've found is to either use resource bundles or set a server property that points to a specific network path.


My Blog: Down Home Country Coding with Scott Selikoff
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17258
    
    6

"Obi"

Please click on the My Profile link above and change your display name to match JavaRanch's Naming Policy of using your real first and real last names.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Application Property files in WebSphere