Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Io exception ORA-17002 via JDBC

Io exception ORA-17002 via JDBC

From: David Wall <d.wall_at_computer.org>
Date: Tue, 1 Oct 2002 18:45:14 -0700
Message-ID: <Absm9.1$zS2.781@news03.micron.net>


In an application in which the client running with JDBC connects to Oracle 8.1.7 over the Internet, the underlying socket appears to be reset from time to time.

In JDBC, it raises and SQLException with an error code set to 17002. However, the Connection object itself is not closed by the JDBC library. This is unfortunate because if the connection in error were closed, it would be easy to detect the failed connection (as opposed to any of the myriad other SQL exceptions that can arise). Most connection pools I've seen attempt to check if the connection is closed before handing them out, so if it is, it can recreate the connection.

How are others handling this situation? I hate to have to call a method every place where SQLException is thrown and have it be checked in a non-portable way to see if the exception itself affects the connection or not, and if so closes it.

Thanks for your insights...

David Received on Tue Oct 01 2002 - 20:45:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US