-
1. Re: application specific configuration data. Where is best
stevecoh2 Jul 28, 2005 1:03 PM (in response to stevecoh2)Further info here - what I am looking for is something like the PropertiesService.xml but which can read xml formatted data.
And we are using JBoss 3.2 -
2. Re: application specific configuration data. Where is best
henkomannen Aug 20, 2005 6:37 PM (in response to stevecoh2)Hi Steve,
found any answers to your question? I'm looking for answers for the exact same question, and I must say I'm a bit puzzled about the lack of answers around here...
/Henrik -
3. Re: application specific configuration data. Where is best
pledge Aug 22, 2005 4:26 AM (in response to stevecoh2)Henrik,
I have found the following system properties that will help you do what you ask.Use System.getProperty("key"); to get the required property A second string paramater can be used to specify a default value if the key cannot be found or if it has no value e.g. System.getProperty("key", "Default return value"); jboss.server.base.url: file:/C:/Programs/JBoss/jboss-4.0.0/server/ jboss.home.dir: C:\Programs\JBoss\jboss-4.0.0\ jboss.server.config.url: file:/C:/Programs/JBoss/jboss-4.0.0/server/default/conf/ jboss.home.url: file:/C:/Programs/JBoss/jboss-4.0.0/ jboss.server.home.url: file:/C:/Programs/JBoss/jboss-4.0.0/jboss-4.0.0/server/default/ jboss.lib.url: file:/C:/Programs/JBoss/jboss-4.0.0/lib/ jboss.server.name: default jboss.server.data.dir: C:\Programs\JBoss\jboss-4.0.0\server\default\data
So you would use "jboss.server.config.url". Note that this is a URI.
Hope this is helpful to you.
Martin -
4. Re: application specific configuration data. Where is best
stevecoh2 Aug 22, 2005 6:44 AM (in response to stevecoh2)Martin - thank you!
Are these documented somewhere in the JBoss docs? -
5. Re: application specific configuration data. Where is best
pledge Aug 22, 2005 6:58 AM (in response to stevecoh2)I found them on the JBoss wiki.
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossProperties
You can see them printed out as some of the first lines when JBoss starts up. -
6. Re: application specific configuration data. Where is best
stevecoh2 Aug 22, 2005 7:05 AM (in response to stevecoh2)Thanks again. Can someone from the JBoss team confirm whether there are any negative effects caused by dropping config files that are usec by applications, not by jboss itself, into the directory specified by the jboss.server.config.url property?
Is this an officially sanctioned practice?
I would assume that jboss only opens files it is looking for here, unlike the deploy directory, in which I know that jboss tries to open everything. But I'd like some confirmation of this. -
7. Re: application specific configuration data. Where is best
jwcone Aug 22, 2005 9:37 AM (in response to stevecoh2)Another option is to use HSQLDB. Set up a JNDI entry for your application-specific "properties" table to access the data from your application. You can populate the tables with regular SQL, of course. This may be overkill, depending on what you're doing, but it's pretty easy, since HSQLDB is integrated into JBoss.
-
8. Re: application specific configuration data. Where is best
stevecoh2 Sep 2, 2005 1:34 PM (in response to stevecoh2)Hmm. Intriguing.
Can you point me at some real documentation on HSQLDB? I know I've stared at the word in countless JBOSS startup logs without thinking about it. How robust a database is it, etc.? I'm in a position where I really SHOULD be accessing a database but we don't have access to one. If HSQLDB is any good, it could be the answer. But solid documentation on it withing the JBoss site is very sparse.