Currently all the config files are obtained from the classloader via getResources with a harcoded filename. By default we have as a minimum jbm-configuration.xml, jbm-security.xml and jbm-jms.xml altho an optional jbm-queues.xml canbe used.
When we run from within a distro, i.e. './run.sh', all these config files are conatined in the config dir which is added to the classpath by the run.sh script.
We need to be able to specify different config files on starting the server, this is for running clustered and running examples withdifferent configurations.
There are a few ways of doing this.
1. simply specify a different config directory on startup, the script will change the classpath and the config files will be loaded from a different directory using the same filenames. i.e.
./run.sh -cjbm-config,dir=../examples/common/config
./run.sh -Djbm.conf=foo -Djbm.jms.conf=bar -Djbm.security.conf=foobar
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"> <property name="config">${JBM_HOME}/config/jbm-configuration.xml</property> </bean>
./run.sh ../examples/common/config/jbm-example-beans.xml
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"> <property name="config">${JBM_HOME}../examples/common/config/example-configuration.xml</property> </bean>