-
1. Re: keeping properties file out of war
pillingworth Apr 27, 2010 11:10 AM (in response to angelodel80)1 of 1 people found this helpfulI have got something similar - I have a xyz.sar with a jboss-service.xml that defines an MBean that contains the properties I want to set as attributes. The war file is in the sar (and is not exploded) and I access the MBean from the war. It's not pretty or elegant but it does work.
-
2. Re: keeping properties file out of war
jaikiran Apr 27, 2010 11:17 AM (in response to angelodel80)1 of 1 people found this helpfulAngelo Mario del Grosso wrote:
Is there a way to store and source .properties file outside of the .war? If I've got this right, Seam assumes the
root
of the paths used are the root of the .war?I don't have experience in Seam. But I don't think Seam would rely on the war context root to find the properties file. I guess, it just uses ClassLoader.getResourceAsStream() or something along those lines. If you make available that properties file in the classpath of the application, then all should be well.
Since you want to keep the properties file outside the .war and still make it available in the classpath, you could place it under JBOSS_HOME/server/< servername>/conf folder which by default is available in the classpath of the application.
-
3. Re: keeping properties file out of war
angelodel80 Apr 27, 2010 12:05 PM (in response to pillingworth)Thanks Paul,
could you let me watch your code solution? It is possible?
I use seam, and maybe i can do what you have done in same freamework library!
-
4. Re: keeping properties file out of war
angelodel80 Apr 27, 2010 12:20 PM (in response to jaikiran)Thanks jaikiran,
the solution you wrote it was one of my first thought!
But,like you, I not have much experience in seam develop and its structure and library! I tryed to insert my file in conf directory, but the properties file were not read!
i.e. if a move the component.properties from WEB-INF to conf directory and I change several values, nothing happened!any suggestion?