I've a GWT application which is running on debian with tomcat server 7. This application uses connection pooling technique for communicating with back-end database.
I've some sites (with different domains) that all of them use same application & only difference between them is the database connection pool!
I have to create a virtual host for every domain, all virtual host configurations are exactly similar, except in hostname & database connection pool resource configuration that specifies database name, username and password.
Now here are the questions:
Yes
Web applications have their own class loaders, virtual hosts do not. So each app in each host will have its own class loader. If all apps share the same library you can place it in $CATALINA_BASE/lib. The downside is all apps then have to use that version and upgrading it means rebooting the entire Tomcat instance.
If you use a recent version of Tomcat 7, you can take advantage of parallel deployment. Set startStopThreads to something greater than 1 on the Engine element in server.xml