The real issue is that two instances can't share port numbers. SO the defaults ports would be used for the first instance, but the second wouldn't start. So what you need to do is change the port numbers.
You need to have two different server configurations, so in the server directory you have minimal, default, and all, so you need to make a copy of the server that you are using, and then there is a MBean for ServiceBindings that you can use and it uses another xml file to define the ports for a configuration, then start up the two different configurations with "run -c name_of_server"
in the Docs/examples/bindings directory is a service-bindings.xml with ports-default, ports-01, etc already defined.
Originally posted by jeremias lacanienta: the most simple way to start multiple jboss servers on a single machine (if your machine have multiple IP) is to bind the jboss instance to the IP. e.g. "run -b xxx.xxx.xxx.xxx"
Yes, but that means you have multiple network cards (NIC) on your machine.
Thanks. Pretty old article though. I saw that with newer versions of Windows also allows it, but If you are looking at having two instance to increase performance, having just one NIC still seems to bottleneck your machine at the NIC level.
Joined: Nov 25, 2003
Thank alot for helping me , well i have followed the steps involved in creating a two instances of jboss and i did like this which are following and tell me is that right or wrong.
step1: copying the c:\jboss4.0\server\default folder and I name it defaul2. so i have another configuration c:\jboss4.0\server\default2 . Under default2\conf\jboss-service.xml file, i changed the port here for naming services , webservices, JRMPInvoker and also change the port of uil2services.xml file and then run the server with the command run -c default2.
well its running properly but i want to know basically a tow domains have been created with one instance of jboss , plesae correct me if iam wrong.
That is one way that works, although I think there are other ports that might still need changing.
But what you saw in your option is that you had to go to a few config files and change the ports directly.
With the Binding service you could have done the same thing, but in one place.
In the docs/examples/binding-manager directory is a sample sample-bindings.xml file. All that you would need to do is uncomment the lines in the jboss-service.xml file in the conf directory to point to a service-bindings.xml. In the commented XML it already points to the xml file in the docs/examples/binding-manager directory.
subject: Need help to create a two instance of jboss server