views:

28

answers:

1

I have an application that usually is hosted on a Windows 2003 Apache Tomcat server and integrates with clients websites. We were thinking about using Amazon's EC2 service as an alternative so we can work within a predictable hosting environment. Unfortunately, and for obvious reasons, you only get 5 Elastic IP addresses (static ip addresses) so I am left looking for a way to efficiently run multiple instances of the app on the same server in Apache Tomcat. I have never had to run multiple instances of an app Apache Tomcat, how difficult is this?

+4  A: 

More apps per tomcat. You only have 1 tomcat, with more apps in the webapps folder.

They should have differently named wars. As long as they don't open network ports themselves that should be it. Otherwise they (the network ports your app opens in your code) need to be configured, cause a port can't readily be shared by 2 webapps. You could have trouble with log4j. If you use that let it be known as you'd need to configure some log4j properties then.

More tomcats. You have more than 1 tomcat, with 1 or more apps in the webapps folder.

The server.xml of tomcat should specify different ports. Tomcat A should listen on other ports than Tomcat B. I usually copy the entire tomcat directory and modify the ports in server.xml (A ports 8009, 8080, 8443, B ports 9009, 9080, 9443 and so on).

extraneon
+1 for multiple tomcat instances
matt b
Thank you for the info, this helped a lot!
Graham