1. Go to JBoss directory and copy the standalone directory and rename it to a preferred name. Lets say it is demo.
2. Then go to demo/configuration directory and open the standalone.xml file and find the element of "socket-binding-group".You can observe the default as follows.
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
4. Change the "port-offset" attribute of that element to another number to shift the ports of the new instance. Lets say we changed it to the 100 as follows.
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:100}">
5. Then move to the bin directory and execute the following command to start the server
./standalone.sh -Djboss.server.base.dir=../demo
6. You are done with another instance within the same JBoss and access in the browser with the port 8180 as we set the offset to 100 in 4th step.
7. If you are using Maven as the build tool and jboss-as plugin to deploy, you can use the following command to deploy your application
mvn clean package jboss-as:deploy -Djboss-as.port=10099
No comments:
Post a Comment