You hit the nail on the head.
Performance being equal I see no reason to use separate jvm/tomcat instances.
Thanks,
Joe Wallace


-----Original Message-----
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Monday, March 09, 2009 12:47 PM
To: Tomcat Users List
Subject: Re: Run multiple web applications in Tomcat each as an
independent windows service question


Joe Wallace wrote:
> The setup is like this.
> 
> http://host1/app0:8080
> http://host1/app1:8081
> http://host1/app2:8082
> 
> App0,1,2 all being the same web app deployed with a different name, and with 
> different url.
> The concept being each web app serves a specific set of users with each set 
> of users having their own separate database.  
> Same web app different data.
> 
> Joe Wallace
> 
Hi.
Let's summarise and restart from the beginning, building on what Chick 
and Gregor already wrote.
You are under Windows, and you want to run Tomcat as a Windows Service.
You have 3 webapps with independent sets of data and users.  Whether 
they are the same webapp (renamed) or not makes no difference.

You /can/ run 3 instances of Tomcat (in fact, 3 instances of a JVM 
running Tomcat), each one listening on a separate port, but from the 
above description this is not necessary.
You could run a single instance of Tomcat, with all 3 webapps, provided 
they have different names.  Each webapp will have its own set of static 
variables, as Chuck explained.
Using a single instance of Tomcat, listening on a single port (say 8080) 
would be easier :
- the users of your 3 webapps would access them by the URLs
   http://host1:8080/app1
   http://host1:8080/app2
   http://host1:8080/app3
and your layout would be
(CATALINA_HOME)/webapps/app1/*
(CATALINA_HOME)/webapps/app2/*
(CATALINA_HOME)/webapps/app3/*
(where CATALINA_HOME is the top directory where you installed your 
Windows Tomcat) and you would have a single Tomcat Service.

The (possible) inconvenient I can see is that if one webapp crashes the 
server, it will crash the whole Tomcat with the 3 webapps.  But that 
does not happen very often.
You can start/stop/reload/redeploy each webapp independently using, for 
instance, the Tomcat Manager application.

Now if you absolutely want 3 separate ports, and/or 3 separate 
JVM/Tomcat instances, and/or running 3 independent Windows Services, any 
or all of that is also possible, but the setup is more complicated.
So, do you have a compelling reason to do that ?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to