File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes multiple JVM problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "multiple JVM problem" Watch "multiple JVM problem" New topic

multiple JVM problem

sam wzm

Joined: Nov 06, 2004
Posts: 11
Dear friends,

I have a question about installing Tomcat on multiple JVM versions. because one of my applications only works with JDK 1.4.2. the other one can work with JDK1.5. I know I can reinstall the application that works with JDK1.5, the problem is that there are many projects under that application and also it is shared by serveral guys. so I wonder if I can install tomcat on multiple JVM.

my operating system is linux. there is a Tomcat based on JDK1.5 under root account and is shard by all users, it runs all the time. I want to install another Tomcat based on JDK1.4.2 on my own account(not root account). but I don't know if there will have confliction between the two tomcats. and if not, how can I install my own tomcat and how should I configure it?

thank you very much for your great help!
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

You won't have a problem. Just set the JAVA_HOME environment variables to point to the correct jdk for each instance.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
jay wick

Joined: Jan 28, 2005
Posts: 4

Ben is correct, you can have the JAVA_HOME set to differnt JDKs for each Tomcat instance.

This would be a somewhat complicated installation. I have tried it with multiple VirtualHost entries in the apache conf and there are several gotchas.

I decided to use apache VirtaulHost to separate catalina_home installations and create a worker for each one, with separate web server doc roots.

I tried to get separate installations of the workers.java_home & workers.tomcat_home, but I am pretty sure that won't work without multiple apache homes. Then you would need at to proxy requests so that both installation would like to clients like they are just on port 80, that means that you need a "master" apache and one at each proxy "end point" -- a lot of work.

I got frustrated and decided that I could live with 'sharing' the workers.tomcat_home with one of the virtual host cataline home's.

Seems to work OK for development, though I would think in production this would be bad -- if your app breaks the java that is running the workers then POOF all the apps go down...
[ January 28, 2005: Message edited by: jay wick ]
I agree. Here's the link:
subject: multiple JVM problem
It's not a secret anymore!