File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Application properties" Watch "Application properties" New topic
Author

Application properties

J. Solis
Greenhorn

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:
-------------------------------------------------------------------------
<beans>
<import resource="classpath:springMapping/applicationContext-db.xml"/>
...
<import resource="classpath*:ServiceDeskCore/applicationContext-*.xml"/>
</beans>
-------------------------------------------------------------------------
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">
<list>
<value>classpath:sdk_db.properties</value>
<value>file:etc/springframework/sdk_db.properties</value>
<value>classpath*:ServiceDeskCore/sdk_db.properties</value>
</list>
</property>
</bean>
-------------------------------------------------------------------------

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: http://aspose.com/file-tools
 
subject: Application properties