我正在从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中也可以使用相同的选项吗?是否可以像在Wildfly中的早期版本的JBoss一样分隔自定义配置?
我在Wildfly中找到了一种方法。有一个独立的目录,例如mystandalone,与独立目录平行。其中的所有目录将遵循默认standalone
结构。将war文件复制到的两个目录中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中启动服务器
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句