Re: Reestablishing a db connection after a network failure

From: Nathan Zumwalt <nathanz_at_hotmail.com>
Date: 3 May 2004 09:25:36 -0700
Message-ID: <521673fd.0405030825.584fe87a_at_posting.google.com>


Most connection pool implementations handle this sort of thing, with the added benefit of higher performance.

Apache has a connection pools architecture in their common package:

http://jakarta.apache.org/commons/dbcp/

Or, you can roll your own... it's fairly easy to implement the JDBC interfaces. Sun had a tutorial on their website at one time (java.sun.com), but I can't find anymore.

//Nathan

ippokratis_at_cmu.edu (Pandis Ippokratis) wrote in message news:<8ad0a5bd.0404290415.57a93cc3_at_posting.google.com>...
> Hi,
>
> I have the following problem: I am implementing a server in Java and
> I use jdbc to connect to an Oracle 9.0.2 db. All seem to work fine,
> but when I intensionally cause a network failure (i.e. I remove the
> network cable) I get the following exception:
>
> java.sql.SQLException: Io exception: Connection reset by peer: socket
> write error
>
> I plug the cable again and I want to reset the java.sql.Connection but
> this seems to not work. Any suggestions?
Received on Mon May 03 2004 - 18:25:36 CEST

Original text of this message