I am coming from this SO however my case is not on Tomcat, but JBoss EAP 6. So suppose I have two web apps app1 and app2 running on JBoss AS 6:
h
Following way worked out for me. Have a look.
First go the server location and copy the default folder with new name. In my scenario will name it, server_uat.
Copy conf, lib, and server folder from default into server_uat folder.
Direct to jboss-service.xml (which is in server_uat)
Uncomment the ServiceBindingManager mbean and change the ServerName to ports-01.
You can even use ports-02 or ports-03. The required configurations are already done by JBoss in the docs/examples/binding-manager.xml file.
Once the change is made after adding ports-01 to mbean code fragment. It should lool like the following.
ports-01
${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml
org.jboss.services.binding.XMLServicesStoreFactory
Using the command prompt, direct to the bin folder and run the server_uat server instance with the following command.
Windows:
run.bat -c server_uat
Linux:
./run.sh -c server_uat
FYI:
ports-01 refers 8180
ports-02 refers 8280
ports-03 refers 8380