Thursday, September 6, 2012

Multiple JBoss instances on the same box

If for some reason you need to run several JBoss instances on the same machine, you'll probably find that JBoss 5 predefined port ranges perfectly satisfy your needs.

You may change default port range by editing server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml.

<!-- The name of the set of bindings to use for this server --> <parameter>${jboss.service.binding.set:ports-default}</parameter>


Change ports-default to ports-01, ports-02 etc (in ports-01 range ports are increased by 100, in 02 by 200 etc). In the same bindings file you'll find more about these port ranges, and you can even create your own ranges. 

In case you don't want to maintain several folder copies you can start JBoss passing one of port ranges as a parameter: 

run -Djboss.service.binding.set=ports-01

No comments:

Post a Comment