3 Replies Latest reply on Jun 26, 2012 10:36 AM by Peter Johnson

    How to run same application in 2 different ports

    Sam Halpa Newbie

      Hi, My problem is that i configured Jboss 6.1.0. Final to run a web application in port 8080. Now i want to run this same web application in the same Jboss server but in different port. meaning, i want to run same web application in 2 different ports at the same time. Say one is for development-port 8080 and other one is for QA testing -port 8180.

      Appriciate if someone could provide me a step by step guide to do this with JBoss 6.1.0 Final version. I had a look at https://community.jboss.org/wiki/AS5ServiceBindingManager, but i didnt exactly get what need to be done.

        • 1. Re: How to run same application in 2 different ports
          Peter Johnson Master

          You should be able to run the exact same application in two ports by defining an additional port in server/xxx/deploy/jbossweb.sar/server.xml - just copy the Connection entry for port 8080 and change the port number (replace the ${jboss.web.http.port} property referenc with a hard port number). Example:

           

            <Connector protocol="HTTP/1.1" port="9090" address="${jboss.bind.address}"
               redirectPort="${jboss.web.https.port}" />

           

          However, this will not give you a "development" app and a "testing" app - they will both be the exact same app.

           

          If you really want a "development" vs. "testing" environment, you will have to run two copies of JBoss AS.

          • 2. Re: How to run same application in 2 different ports
            Sam Halpa Newbie

            Thanks peter for quicke response, well my requirement is to run 2 copies of same app. Because my development work should not be affected to qa team to test the application.appriciate if you could guide me how to run 2 copies of Jboss AS in one machine, I can set up 2 mysql servers for both application, i am running the current Jboss in linux.I can get sys admin to map the ports in to 2 differnet urls.

            EG: JBoss 1 runs in 8080 >>> http://dev.abc.com

                   JBoss 2 runs in 8180 >>> http://qa.abc.com

            • 3. Re: How to run same application in 2 different ports
              Peter Johnson Master

              You need to run two copies of JBoss AS. The link on the binding manager that you provided gives the recommend process. There are more ports than just port 8080 that you must ensure are unique, and the binding manager enables you to set all of the ports at once.