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