----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

I had the same problem with my mysql database.  However, I did not solve it
by reloading the servlet.  I just added some code into the service method
which checked if the connection to the database was broken,
(Connection.isClosed())in which case I executed a (synchronized) method
which re-established the connection.

I would also be interested to know whether someone has a better solution!

Regards,
Ásta
----- Original Message -----
From: Jean Tremblay <[EMAIL PROTECTED]>
To: Java Apache Users <[EMAIL PROTECTED]>
Sent: Thursday, January 27, 2000 6:59 AM
Subject: Please help! Restarting a servlet or simulating
anUnavailableException


> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
>
> Hi,
>
> I have written a servlet which fetches information on Oracle. In the
> init part of my servlet I open the port with the database.
>
> Sometimes, for X reasons this connection is broken, and my servlet
> cannot deliver its requested information.
>
> I would like to use the UnavailableException to force JSERV to reload my
> servlet. This seems to be working in the init method, but it stops
> functionning once the servlet has been initialized. I read the
> documentation, it says that the UnavailableException works like a
> ServletException.
>
> Is there a way to force JSERV to reload a servlet! Or is there a way to
> simulate a real UnavailableException?
>
> Thanks
>
> Jean
>
> --
> This message (plus any attachments) is confidential and may be subject
> to lawyer-client privilege.  Use without permission is strictly
> prohibited.
>
>
> ------------------------------------------------------------
> To subscribe:    [EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:       [EMAIL PROTECTED]
>
>
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://java.apache.org/main/mail.html>
> Problems?:           [EMAIL PROTECTED]
>



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to