Hi,
I need to run multiple(more than 4) instances of JBoss server on a single machine. I am using JBoss 4.2.3 GA.
Hi,
I need to run multiple(more than 4) instances of JBoss server on a single machine. I am using JBoss 4.2.3 GA.
You basically have to set different ports for every server. Look at this tutorial for complete information.
I found the answer. We have to configure the jboss-service.xml to run multiple instances in the same machine.
We may need to keep the same "default" instance same as it is under the **JBOSS_HOME\Serve**r.
We have to create another folder say "instance2" under JBOSS_HOME\Server. Copy all the contents from JBOSS_HOME\Server\default to this newly created folder.
Now goto conf folder under JBOSS_HOME\Server\instance2 directory.
Edit the jboss-service.xml.
Search for mbean code="org.jboss.services.binding.ServiceBindingManager"
in this configuration file.
By default this xml tag is commented. We have to un comment it and change the value ports-00 to ports-01.
Then start this instance2 jboss instance. We can access this application by using the port number 8180.
We can go for at maximum of 3 instances with this way.
To run more than this we have to add some more running tags in JBOSS_HOME\docs\examples\binding-manager\sample-bindings.xml.
You can make things a lot simpler by simply changing the IP that the server is bound to.
You will need to copy the entire jboss folder several times and configure run.bat to use the -b parameter on startup.
If this is a Windows server and you're running jboss as a service, you might want to edit the service.bat for each instance too so that the servers all have different names in the services control panel.
Part of the problem we ran into when trying to use different HTTP ports was that jboss uses 'lots' of ports for different purposes and it was a pain to edit all of these port numbers to be unique on each instance. By changing the bind address you can avoid this problem entirely.