Two Laptop Bag
The moose likes Oracle/OAS and the fly likes Application properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Application properties" Watch "Application properties" New topic

Application properties

J. Solis

Joined: Sep 03, 2008
Posts: 2
Hi all,
I am very newby in oas.
I have an application in spring and must be deployed in several regional goverment offices. Each of theese offices has a different configuration (ip adresses, database instance, users and so on). We have placed this parameters in .properties files. We want to deploy the application as a .war file plus several .properties files. The main objective is that reponsible at each location can modify the configuration files by himself, and not to loose the configuration when new versions of the software are released.
My question is in which folder of the oas must I place those .properties files in order the application is able to read them at start up time.

And now some code:

in the applicationContext.xml we have something like this:
<import resource="classpath:springMapping/applicationContext-db.xml"/>
<import resource="classpath*:ServiceDeskCore/applicationContext-*.xml"/>
So, the * in the last line means that if there are any applicationContext-*.xml in a folder called ServiceDeskCore, its configuration replaces the configuration loaded with the first line.

And in the applicationContext-*.xml we have something like this:
<bean id="DbPropertyConfigurer"class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">

This code works fine in JBoss, as we put the external configuration in a folder call $JBOSS_HOME/server/default/conf/ServiceDeskCore

Thank you for your time, I'm looking forward your reponses.
Best regards.
P.D.: I expect that you can understand what is my problem despite my poor English.
I agree. Here's the link:
subject: Application properties
It's not a secret anymore!