-
1. Re: Keeping properties file out of war
cosmo Apr 27, 2010 3:37 PM (in response to angelodel80)If you created your Seam project from seam-gen it already comes with a nice Ant script that support different profiles. Are you taking full adavantage of it?
-
2. Re: Keeping properties file out of war
angelodel80 Apr 27, 2010 4:01 PM (in response to angelodel80)Thanks Aldo!
You are Italian, right? Me too!
Yes, I know the ant solution. But the problem is different: I have to read several properties in real-time after the deploy has been made , such as the datasource environment, without explode my war file! So properties should be written in a file out of war. In this way the war keeps the same and the changes affect only the .properties file.
I read a lot of posts and documents, but nothing I found for my particular matter...
-
3. Re: Keeping properties file out of war
babazs May 3, 2010 10:09 PM (in response to angelodel80)1. use JBoss persistent mbeans
2. use the JBoss property service:
You can add attributes to Jboss5/server/default/deploy/properties-service.xml, then, you can read this from a Seam component. You also have a possibility to create multiple property file.
http://community.jboss.org/wiki/PropertiesService -
4. Re: Keeping properties file out of war
daniele4 May 7, 2010 9:34 AM (in response to angelodel80)You can create a system property where you define the path of your properties file. You can do that adding this vm arguments: -Dpropertyname=path. Then you can read the value of property from java code by System.getProperty("propertyname"); -
5. Re: Keeping properties file out of war
angelodel80 May 18, 2010 12:16 PM (in response to angelodel80)Thanks a lot!
I will try it...