To run another instance of JOnAS 5.2.1 on the same server one needs to change the ports of the new instance.
Initially, the JONAS_BASE environment variable points to /home/test/JonasInstances/instance1
To create a second instance, I just run the newjb command.
Then I need to make some port and name changes in different files :
1) I modify the name of the newly created instance, in the jonas.properties file :
2) I run the command jonas start -n jonas1 and whenever i get a “port already running” error I try to find which file defines that port. For instance if port 9001 is already running (by instance2) I run the following command :
grep -i -w 9001 *
With this slow (and rather annoying) method i was able to run a second instance of Jonas. There are the files that i needed to modify :
– carol.properties (port RMI JRMP) :
# RMI JRMP URL
# RMI JRMP URL
– HTTP port conflict :
jetty6.xml: 9003 instead of 9000
tomcat6-server.xml: 9003 instead of 9000
tomcat7-server.xml: 9003 instead of 9000
uddi.properties : 9003 instead of 9000
– HSQL port (defautl is 9001 ):
HSQL1.properties:datasource.url : 9004 instead of 9001
jonas.properties : 9004 instead of 9001
– org.objectweb.joram.mom.proxies.tcp.TcpProxyService :
a3servers.xml : 16010 ==> 16009
joramAdmin.xml : ==> 16009
I guess there is a better way to create and run multiple JOnAS instances on the same machine. Someone told me that I should take a look at the deployme tool hosted in the JASMINe project (administration framework for JOnAS cluster).
There is also the newjc command.