Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PropertiesFile in Classpath

 
David Kincade
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am moving an application from WebSphere to JBoss. Not being familiar with the SA tasks of JBoss, I have hit a question (and can't seem to find the answer on the net)...

I have a properties file that is located in the classpath of the application. This properties file must exist outside of the EAR since it contains different values on different servers (dev, test, prod).

How do I configure the deployment of the EAR to add a directory (which would contain the properties file) to add it to the application's classpath?

In WebSphere 5, it used the concept of a Shared Library (which would contain the directory name) and this was added to the application (and therefore part of the application's classpath).

Thanks in advance!
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about this:

Maintaining Properties files in JBoss
 
David Kincade
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure that the topic of that link is what I am looking for. It appears that the link is talking about how to set system properties for JBoss (or properties that will be available to all applications running on that JBoss server).

I am looking for a way that my application (and preferably ONLY my application) running on a JBoss server will have access to a properties file. In addition, I don't want to have to specify the location of the properties file in my source code ... it should be found as part of the classpath (but not contained in the EAR / WAR / JAR).

Any ideas?
 
David Kincade
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is maybe a better way to ask my question ...

I have 2 EARs running on one JBoss server. Inside each EAR is a WAR ... and that WAR uses log4j. However, the log setting (log4j.xml) is different for each EAR.

How can I create 2 log4j.xml files and put them in 2 different places and tell each EAR where the proper log4j.xml file is located?

Thanks in advace
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic