Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Application Property files in WebSphere

 
Obi Kenobi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4008
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic