Wildfly 8.1.0 在备用配置中运行



我正在从 JBoss 5 迁移到 Wildfly。我们的一个服务器有一组小型Web应用程序,这些应用程序部署在同一JBoss的两个实例中,即customappgrp1和customappgrp2,具有两个自定义配置。

$ /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 中的早期版本的 JBoss 一样分离吗?

我在Wildfly中找到了一种方法。有一个单独的目录,比如 mystandalone,与独立目录并行。其中的所有目录都将遵循默认的standalone结构。复制 deployments 内两个目录上的 war 文件,或者您也可以使用控制台进行部署。使用以下命令启动服务器

$ 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启动服务器

最新更新