2014-12-03 36 views
0

我正在從JBoss 5遷移到Wildfly。我們的服務器中有一組小型Web應用程序,它們部署在同一個JBoss的兩個實例中,即customappgrp1 & customappgrp2,具有兩個自定義配置。Wildfly 8.1.0在備用配置下運行獨立版

$ /home/apps/jboss-5.1.0.GA/server 
+ all 
+ default 
+ minimal 
+ standard 
+ web 
+ customappgrp1 
+ customappgrp2 

服務器實例開始與下面的命令

$ ./run.sh -b 0.0.0.0 -c customappgrp1 -Djboss.service.binding.set=ports-01 -Dcom.a2wi.global.prop=/home/apps/jboss-5.1.0.GA/server/customappgrp1/prop/global.properties -Dglobal.properties.loc=/home/apps/jboss-5.1.0.GA/server/customappgrp1/prop/global.properties 

$ ./run.sh -b 0.0.0.0 -c customappgrp2 -Djboss.service.binding.set=ports-02 -Dcom.a2wi.global.prop=/home/apps/jboss-5.1.0.GA/server/customappgrp2/prop/global.properties -Dglobal.properties.loc=/home/apps/jboss-5.1.0.GA/server/customappgrp2/prop/global.properties 

我想運行自定義配置Wildfly獨立的多個實例,我該怎麼辦呢? Wildfly中也有相同的選項嗎?自定義配置可以像Wildfly中早期版本的JBoss一樣分離嗎?

回答

1

我發現了一種在Wildfly中做到這一點的方法。有一個單獨的目錄,稱爲mystandalone,與獨立目錄並行。這裏面的所有目錄將遵循默認的standalone結構。將戰爭文件複製到deployments中的兩個目錄中,或者也可以使用控制檯進行部署。使用下面的命令來啓動服務器

$ standalone.bat 

這將使用默認的獨立目錄啓動服務器在8080端口

$ standalone.bat -Djboss.server.base.dir=/home/apps/wildfly-8.1.0.Final/mystandalone -Djboss.socket.binding.port-offset=1010 

jboss.server.base.dir點在默認情況下獨立的目錄

jboss.socket.binding.port-offset是設置端口1010將啓動服務器8080 + 1010

+0

謝謝!這裏有一些更詳細的信息:http://www.nailedtothex.org/roller/kyle/entry/using-multiple-instances-of-wildfly – seanf 2015-02-06 08:14:31