如何同时运行两个JBoss?
一.同时运行两个JBoss
1.在第一个Jboss, in the xml file $JbossPath$/server/default/conf/ jboss-service.xml, uncomment the <mbean> block:
<mbean code="org.jboss.services.binding.ServiceBindingManager"
name="jboss.system:service=ServiceBindingManager">
<attribute name="ServerName">ports-01</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>
2.修改第二个Jboss的 $JbossPath$/server/default/conf/jboss-service.xml 和$JbossPath$/server/default/deploy/jbossweb-tomcat55.sar/server.xml
修改所有的port address,不和第一个重复。
3.修改第二个Jboss的 $JbossPath$/server/default/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml 文件,将
<attribute name="Java2ClassLoadingCompliance">false</attribute> 修改为true
<attribute name="UseJBossWebLoader">false</attribute>修改为true
1.
You should create a different SERVER CONFIGURATION DIRECTORY for each instance of
* $JBOSS_HOME
o server
+ minimal
+ default
+ all
+ node1
+ node2
+ node3
+ nodeX
And you then launch each node with the -c option of run.sh/run.bat (e.g. run.bat/run.sh -c node1)
2.
假设将default复制后改名为node1,进去后修改conf/jboss-service.xml
<mbean code="org.jboss.services.binding.ServiceBindingManager"
name="jboss.system:service=ServiceBindingManager">
<attribute name="ServerName">ports-01</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>
这里,将
<attribute name="ServerName">ports-01</attribute>--改用ports-02
这里注意的是:
<attribute name="StoreURL">${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml</attribute>
里面设置了3个端口。。ports-01~03
3.
到deploy/jbossweb-tomcat55.sar/server.xml 修改成跟default里面不同的port端口
本文地址:http://www.45fan.com/a/question/67708.html