Bookmark Topic Watch Topic
  • New Topic

Using Application Property files in an EAR

 
Obi Kenobi
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • 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: 3903
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Why is this repeated here:

http://www.coderanch.com/t/77232/Websphere/Application-Property-files-WebSphere
 
Rajesh Agarwal
Ranch Hand
Posts: 79
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
The best way to do this is to keep the file external to the ear file. Then
specify the path of the path in the -D parameter for java. In case you are using weblogic, you can specify -DKey=value where the java is started. Then in your code you could read the value of this key , load the file and parse it. Let me know if this solves your purpose
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Master Kenobi...

First, please refrain from cross posting. Second, regardless of how strong you are in the ways of the force, I doubt your real name is Obi Kenobi. Please change it to adhere to the Java Ranck naming policy.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic