45fan.com - 路饭网

搜索: 您的位置主页 > 网络频道 > 阅读资讯:如何同时运行两个JBoss?

如何同时运行两个JBoss?

2016-08-26 07:46:54 来源:www.45fan.com 【

如何同时运行两个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

 

 

二.运行一个JBoss的两个实例

1.

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

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
Tags: 运行 两个 JBoss
编辑:路饭网
关于我们 | 联系我们 | 友情链接 | 网站地图 | Sitemap | App | 返回顶部