tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Mack <>
Subject When does a servlet instance die?
Date Wed, 24 May 2000 12:21:17 GMT

I understand that if I write a servlet that implements
the SingleThreadModel concurrent accesses will be
served by different servlet instances each with its
own set of instance variables (eg. connections to a

Assuming that there are many many concurrent requests
occuring this means that there are also many many servlet
instances running. If each instance opens a database
connection in its init() procedure there will be a lot of
connections open.

My question is: What is tomcat's policy when it comes to
destroy unused instances (and thereby close the open
database connections)? Is an unused instance removed
immediately? What happens if it is the last instance of
the pool? Is there a timeout value as for sessions?

I have to admit that I did not read the Java Servlet
Specification word by word but on a quick look I could
not find anything answering this question. If I am wrong
please tell me the sections to read...

thanks in advance
    Christoph Mack

View raw message