Is there a way in JBOSS to have different URLs provided by the users resolve to other URLs; i.e.
http://OurAppUat/ => http://OurAppUat/web/app?environment=UAT http://OurAppSIT/ => http://OurAppSIT/web/app?environment=SIT
Skip this bit unless you're thinking "what problem are you trying to solve?".
We have an web app developed by a third party which is hosted on JBoss.
This app is our company's operations system; available internally only. We have some customisations, and as such have SIT, UAT and Production Replica environments to allow us to test customisations and reproduce production issues.
For various reasons, we often need to switch around the servers hosting environments (e.g. so we can prepare a refreshed copy of UAT on the SIT server whilst the current UAT environment's in use, then switch the users/testers to the refreshed instance before moving and refreshing SIT onto the former UAT server).
It is possible for multiple environments to be hosted independently on the same server; but we try to avoid this when possible to ensure the environments aren't affected by testing being done in another environment, and also to allow us to restart servers/services as required without concerning ourselves with other instances which may be sharing the same host.
What we're trying to do
Users currently connect to the app on URLs such as:
We'd like to simplify this to:
Using DNS we can get as far as:
The advantage is this allows us to switch servers around behind the scenes (and perhaps add in load balancing down the line) without affecting the URLs used by our users. That's achieved by repointing the DNS name to the correct resource's IP.
The further advantage of removing the rest of the URL is the URLs become human readable; with so users can look at the URL and tell what environment they're in without having to understand which part of the URL to read (though it looks obvious, most users seem to panic at the site of a long URL rather than just scanning it for the environment name).