This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes how to create a new instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "how to create a new instance" Watch "how to create a new instance" New topic

how to create a new instance

Anthony Karta
Ranch Hand

Joined: Aug 09, 2004
Posts: 342
I can copy the default setting and change PORT numbers in jboss-service.xml but I don't think it's clean way.

is there a tool / script to create another instance of JBoss AS with different PORT numbers?

thanks all

maha laxmi
Ranch Hand

Joined: Sep 23, 2005
Posts: 68
You should create a different SERVER CONFIGURATION DIRECTORY for each instance of JBoss AS you want to run. For example, your directory tree should be:

Copy default directory and name it as node1.

In the node1/conf/jboss-service.xml

Uncomment below code and specify ServerName as �node1�(don�t use capital letters)

<mbean code=""
name="jboss.system: service=ServiceBindingManager">
<attribute name="ServerName">node1</attribute>
<attribute name="StoreURL">${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml</attribute>
<attribute name="StoreFactoryClassName">

In the sample-bindings.xml create servername with node1 and add 1 to all port numbers

It needs to use different ports so you must manually change them. Also be aware of capitals causing issues. It's always easier to use lower case for everything and makes it more portable.


<server name="ports-default">
<service-config name="jboss:service=Naming" delegateClass="">
<delegate-config portName="Port" hostName="BindAddress">
<attribute name="RmiPort">1098</attribute>
<server name="node1">
<service-config name="jboss:service=Naming" delegateClass="">
<delegate-config portName="Port" hostName="BindAddress">
<attribute name="RmiPort">11098</attribute>
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10242

This might help:

[My Blog] [JavaRanch Journal]
Sajan Patel
Ranch Hand

Joined: Oct 25, 2004
Posts: 77
Is there any way we can manage this both instance of application server from JMX Console


Sajan Patel
I agree. Here's the link:
subject: how to create a new instance