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
If I understand the situation correctly,
You could use a filter to deny all requests to the servlet (return
HTTP error 500) while the database is down. On initialization you
check the database and set a flag to tell the filter if the database
is down. When the database comes back up (assuming you
. Thank you.
- Original Message -
From: "Peter Bauer" <[EMAIL PROTECTED]>
To:
Sent: Sunday, September 03, 2006 10:01 AM
Subject: Aborting servlet init() method
> Hi all,
>
> i have the following problem here:
> If the used database is not available at
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