Thanks for the replies - several suggested filters. I guess I have two
concerns with that approach:
1) Since this doesn't happen very often, I'm not sure I want to add
additional processing to EVERY request processed by the system. I may
be wrong and it may not be much extra?
2) we have several servlets that are init'd in a specific order. If the
database is not available, I don't even want them to be called. If I
used a filter, I guess I could just configure the same filter to each
servlet...
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 1:22 PM
To: Tomcat Users List
Subject: Re: Options to prevent web app from being available if DB not
available?
Servlet filter.
The filter can check the database status on init. Then the filter could
be
made smart enough to let all traffic through if the database comes back
to
life. (or conversely also goes away)
-Tim
Mike Miller wrote:
> Hi,
>
> I am looking for options to prevent my web application from being
> available if our database is not available. I've used context
listeners
> in the past, but since you can return a bad return code they don't
like
> the cleanest approach.
>
>
>
> I have tried registering a context listener and then throwing a
> RuntimeException if the database is not available but that seems like
a
> kludge.
>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]