Haven't really thought it through as I just woke up :-) 

However, I don't see why couldn't write a filter that filters all request.
It checks the DB connection and if it isn't there it just simply forwards
the user to an appropriate page.

As to making the whole web app unavailable - I am not sure dude.

Arup 

-----Original Message-----
From: Mike Miller [mailto:[EMAIL PROTECTED] 
Sent: 26 September 2005 19:18
To: tomcat-user@jakarta.apache.org
Subject: Options to prevent web app from being available if DB not
available?

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.

Any other options?

 

Thanks in advance,

Mike



                
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to