aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "how to create a new instance" Watch "how to create a new instance" New topic
Author

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
tony


SCJP 5
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:

$JBOSS_HOME
server
minimal
default
all
node1
node2
node3
nodeX
e.g.
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="org.jboss.services.binding.ServiceBindingManager"
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">
org.jboss.services.binding.XMLServicesStoreFactory
</attribute>
</mbean>



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.

e.g.

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

Joined: Jul 20, 2005
Posts: 10210
    
166

This might help:

http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfiguringMultipleJBossInstancesOnOneMachine


[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

Thanks

Sajan Patel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to create a new instance