This content has been marked as final.
Show 1 reply
-
1. Re: Adding configuration files to SAR deployment
peterj Jul 20, 2007 12:33 PM (in response to ramboid)If you want to place the cfg file outside your SAR, you could use one of the jboss system properties. (http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossProperties). For example. place the cgf in server/xxx/data and locate it using the jboss.server.data.dir property.
If you want to place the cfgfile inside your SAR, place it in a JAR (could be exploded) and access it using Class.getResource() or Class.getResourceAsStream(). For example, assume the following SAR layout:some.sar + config.jar + some + config + myconfig.cfg
You can access the cfg file as follows:
InputStream is = this.getClass().getResourceAsStream("/some/config/myconfig.cfg")