tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magnus LarsgÄrden <ma...@kbab.net>
Subject Multiple instances of servlets
Date Wed, 14 Jun 2006 14:01:23 GMT
Hi all,

Is Tomcat supposed to create multiple instances of my servlet at startup? Or 
is it a bug?

Background:
========
I have two different domains connected to my Tomcat server (version 5.5.17):
http://mydomain1.host.com  and
http://mydomain2.host.com

"mydomain1" is directed to /home/web/tomcat/webapps/ROOT/
and "mydomain2" is directed to /home/web/tomcat/webapps/mydomain2/

Both domains use a copy of the same servlet except that they belong to 
different packages. Ex:
The .java files under mydomain1 belong to package 
"com.mydomain1.bookingManager"  and are located under
/home/web/tomcat/webapps/ROOT/WEB-INF/classes/com/mydomain1/bookingManager/

The .java files under mydomain2 belong to package 
"com.mydomain2.bookingManager" and are located under
/home/web/tomcat/webapps/mydomain2/WEB-INF/classes/com/mydomain2/bookingManager/

Problem:
======
When Tomcat starts it creates only ONE instance of the "mydomain1" -servlet, 
and FOUR instances of the "mydomain2" servlet.
I would really like to only have ONE instance of each servlet. How can I 
achieve this?

I have searched Google for answers but only found contradicting statements. 
Some say that Tomcat creates one, and only one instance of each servlet. 
Other say the opposite.


All help is appreciated!

Thanks in advance
BR/Magnus







---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message