Options to prevent web app from being available if DB not available?

2005-09-26 Thread Mike Miller
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

Re: Options to prevent web app from being available if DB not available?

2005-09-26 Thread Tim Funk
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

RE: Options to prevent web app from being available if DB not available?

2005-09-26 Thread Arup Vidyerthy
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

RE: Options to prevent web app from being available if DB not available?

2005-09-26 Thread Mike Miller
, 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

Re: Options to prevent web app from being available if DB not available?

2005-09-26 Thread Steve Dodge
Mike, Doing this with pure J2EE Servlet code, I would use three components. First, use the Context Listener to check the Database on start up, if no DB connectivity set a ApplicationContext attribute to that effect. The second part would be a javax.servlet.Filter which checks the status of