File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Products » Websphere
Bookmark "Application Property files in WebSphere" Watch "Application Property files in WebSphere" New topic

Application Property files in WebSphere

Obi Kenobi

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

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.

The error I get is ..

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

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
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

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.

[OCA 8 Book] [Blog]
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276


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.



Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Application Property files in WebSphere
It's not a secret anymore!