vvra
vvra

Reputation: 2912

Wildfly 8.1.0 run standlone in alternate configuration

I am migrating from JBoss 5 to Wildfly. One of our server has group of small web applications that are deployed in two instances of the same JBoss, namely customappgrp1 & customappgrp2, with two custom configurations.

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

The server instances are started with the below command

$ ./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 

I want to run multiple instances of Wildfly standalone with custom configuration, how do I do it? Is the same option available in the Wildfly too? Can a custom configuration be separated like the earlier version of JBoss in Wildfly?

Upvotes: 0

Views: 1223

Answers (1)

vvra
vvra

Reputation: 2912

I found a way to do this in Wildfly. Have a separate directory, say mystandalone, parallel to standalone directory. All the directories inside this will follow the default standalone structure. Copy the war files on both the directories inside deployments, or you can deploy using the console too. Use the below command to start the server

$ standalone.bat

This will start the server using default standalone directory in 8080 port

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

jboss.server.base.dir points by default to the standalone directory

jboss.socket.binding.port-offset is to set the port, 1010 will start the server in 8080+1010

Upvotes: 1

Related Questions