jboss配置多个实例

以jboss-4.2.3.GA为例:

1.在jboss-4.2.3.GA\server目录下有:default,all,minimal三个文件夹

打开default中conf文件夹jboss-service.xml,搜索“service binding”,这一段代码是注释掉的

  <!-- ==================================================================== -->
   <!-- Service Binding                                                      -->
   <!-- ==================================================================== -->


   <!-- Automatically activated when generatting the clustering environment -->
   <!-- @TESTSUITE_CLUSTER_CONFIG@ -->


   <!--
      | Binding service manager for port/host mapping. This is a sample
      | config that demonstrates a JBoss instances with a server name 'ports-01'
      | loading its bindings from an XML file using the ServicesStoreFactory
      | implementation returned by the XMLServicesStoreFactory.
      |
      | ServerName: The unique name assigned to a JBoss server instance for
      | lookup purposes. This allows a single ServicesStore to handle mulitiple
      | JBoss servers.
      |
      | StoreURL: The URL string passed to org.jboss.services.binding.ServicesStore
      | during initialization that specifies how to connect to the bindings store.
      | StoreFactory: The org.jboss.services.binding.ServicesStoreFactory interface
      | implementation to create to obtain the ServicesStore instance.


   <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.在\docs\examples\binding-manager目录中打开sample-bindings.xml文件,里面有ports-default,ports-01,ports-02,ports-03,分别对应端口号8080,8180,8280,8380,也就是说,可以配置4个不同的端口。

3.现在只需要将server目录中的default复制一份,粘贴到server目录中,重命名为test,将jboss-service.xml中的<attribute name="ServerName">ports-01</attribute> 

中的ports-01改为sample-binding.xml中的server的名称(ports-02 or ports-03)。这样就可以了

4.4个实例一般够用了,如果不够,可在sample-binding 中增加组(ports-4)。

5.在window系统中,切换到bin目录,run.bat -c test,启动test实例。




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值