Friday, May 30, 2008

Extending JBoss Classpath

In $JBOSS_HOME/server/{instance}/lib can you put all the external jar that you need, but if you want to put them separatly into another path, add the following entry in your $JBOSS_HOME/server/{instance}/jboss-service.xml
 <classpath codebase="file:///${jboss.myserver.lib.ext}" archives="*" /> 

Then you can set jboss.myserver.lib.ext simply in your JBoss start script as Java System Property, for example
export JAVA_OPT="$JAVA_OPT -Djboss.myserver.lib.ext=/to/path

This approach my be very practical to manage jar files, but also configurations files.

No comments: