This content has been marked as final.
Show 3 replies
-
1. Re: Properties File
peterj Sep 10, 2007 4:48 PM (in response to renen)I assume that you want to have one properties file that controls all three apps. Use a system property, such as jboss.server.config.url or jboss.server.data.dir, to get the absolute location of the server/xxx/config or server/xx/data directory, and place your properties file there.
-
-
3. Re: Properties File
renen Sep 11, 2007 6:56 AM (in response to renen)Just to follow that up. The following code will open a property file and read a property:
String confFile = System.getProperty("jboss.server.config.url") + confFilename; System.out.println("Will look for configuration settings in: " + confFile); URL url = new URL(confFile); defaultProperties = new Properties(); defaultProperties.load(url.openStream()); queryTIMEOUT = Integer.parseInt(defaultProperties.getProperty("QueryTimeout", Integer.toString(defaultQueryTIMEOUT) ));
Hope somebody finds this useful.