aspose file tools*
The moose likes JBoss/WildFly and the fly likes Need help to create a two instance of jboss server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Need help to create a two instance of jboss server " Watch "Need help to create a two instance of jboss server " New topic
Author

Need help to create a two instance of jboss server

Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 157
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


jasmine kaur
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
jeremias lacanienta
Ranch Hand

Joined: Sep 17, 2006
Posts: 60
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"


jeremias lacanienta<br />scea5/scwcd1.4/scwcd/scmad/scjp1.4/scjp1.1/scja/rhcja
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

Here's how you can achieve it:
Configuring Multiple JBoss Instances On One Machine


[My Blog] [JavaRanch Journal]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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

Joined: Sep 17, 2006
Posts: 60
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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

Joined: Nov 25, 2003
Posts: 157
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help to create a two instance of jboss server