I'm working on a couple small/medium projects, but I do like tinkering with tools and I have to admit I do love overcomplicating things. The projects that I am working on are Java web applications that I have up until now deployed in a single Tomcat instance on a single server. My build tool of choice is Maven, source control; SVN, and I've got a Hudson and Bamboo CI server running.
Now, I'd like to have 3 "environments" if you will, that I will deploy my WARs to. I was thinking of having one for development builds (deployed on-demand via Hudson or nightly builds), QA to get feedback from friends, and production that I will hook up to my live domains.
How would I go about achieving this with Tomcat? I was thinking of running 3 different instances of Tomcat, with different priorities and memory pools assigned so that production would run smoothly but how exactly would I do that -- create 3 run scripts (I want one "webapps" directory for each)?
I've got an 8-core Xeon with 8 GB RAM at my disposal and I do think it is sufficient for now, however, I am probably going to end up with using another server for production later on ;-). The box is running Gentoo. I also do not mind alternatives containers such as Resin being suggested.
Thanks in advance.