Showing posts with label Wildfly. Show all posts
Showing posts with label Wildfly. Show all posts

Friday, February 13, 2015

Jboss Multiple Standalone Servers

Suppose in JBoss Web server you want to deploy multiple instances of a web server in standalone mode outside of the standalone directory...



  • Now that u have multiple servers 1, 2 3 and 4(essentially copies of standalone directory that are simply renamed) , you can place your war/ear file in their respective deployment folder
  • Now create a bat files to each of the servers so as to start them individually (server1.bat) in the bin directory with text in it:
    standalone.bat -Djboss.server.base.dir=../Server1 --debug 8888
    Above line means you are calling standalone.bat on server1 with debug port 8888
  • Make sure you have the port offset configured in the respective standalone.xml so that you can access each of the sites simultaneously
    Offset 5 means u access the local host using http://localhost:8085
  • Now you can run custom bat files simultaneously and access the url at different ports as offset.
    For external sites with public facing URL u can directly specify the URL at the <interface name="public">
    <inet-address value="${jboss.bind.address:UR_URL}"/>
    </interface>
    Make sure Socket Binding for http is 80 not 8080 in cases of URL binding (Local host binding need to have 8080)