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
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

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