I'm not sure if I'm answering your question, but I have situation where I
need to check to make sure a database is online and if it is not, fire off
an email to a list of administrators.

I do this by having a Singleton class that handles the database access.  This
singleton fires off a thread when it starts up that checks the connection
every X minutes.  If the connection fails it uses standard JavaMail code
to send an email to the list of administrators.

All the servlets in my app get a reference to the singleton in their init()
method so the first servlet hit starts the thread that monitors the connection.
(actually I have a parent class that does this and all my servlets
implement this parent class... but anyway.)

(If you are using WebLogic, I believe you should use their event object and
not start up your own thread.)

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to