Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help to create a two instance of jboss server

 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everybody,

Hi I need to the steps to create a two instance of jboss server4.0 ,please
help me so that I can deploy and run two application simultaneously on tow instance of jboss server.

Thanks alot.
jasmine kaur
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Mark
 
jeremias lacanienta
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's how you can achieve it:
Configuring Multiple JBoss Instances On One Machine
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Mark
 
jeremias lacanienta
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you do not need several network cards to have multiple IPs. you can multihome your machine. http://www.networkcomputing.com/818/818ws2.html
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jeremias lacanienta:
you do not need several network cards to have multiple IPs. you can multihome your machine. http://www.networkcomputing.com/818/818ws2.html


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.

Mark
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everybody,

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.

and tell me the right way.

Thanks alot for helping me.

jasbir
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic