Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to create a new instance

 
Anthony Karta
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
maha laxmi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
 
Sajan Patel
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way we can manage this both instance of application server from JMX Console

Thanks

Sajan Patel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic