I was looking at this very recently.

If the init() method throws a javax.servlet.UnavailableException(), it will be marked as unavailable. Take a look at the javadocs -- one invocation of this exception takes a time param that tells tomcat to try again after a set timeout period. That way it can periodically try again if the failure is because of database problems.

--David

Peter Bauer wrote:
Hi all,

i have the following problem here:
If the used database is not available at startup of the servlet, the
initialization should be aborted and the servlet should be in a
stopped state to be able to start it again if the database is
available again.
Waiting for the database is not an option since some processes will be
left running when tomcat is stopped without a working database.
So my question is how a servlet can be stopped from within the
servlet? Throw some kind of exception?

thx,
Peter

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



--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


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

Reply via email to