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

Home -> Community -> Usenet -> c.d.o.server -> Re: JDBC Thin: "No more data to read from socket"

Re: JDBC Thin: "No more data to read from socket"

From: Brad Hill <brhl_at_gwl.com>
Date: Wed, 08 Sep 1999 11:26:00 -0600
Message-ID: <37D69C28.B0B166D3@gwl.com>


You can't expect a connection to persist through a db bounce. This error indicates that the socket has been closed on the server side.

There's no way to resuscitate the dead connection, but nothing should stop you from catching this exception, closing the old connection and opening a new one.

Since you can never expect network resources to be indefinitely stable, you always have to be prepared to catch exceptions of some sort anway. I use a wrapper class around the Connection object with a boolean flag indicating the connection's validity. Everywhere that I call an operation that results in a SQLException, I toggle this flag and return the dead connect to my connection pool, which does the necessary cleanup. It works quite well.

Brad Hill Received on Wed Sep 08 1999 - 12:26:00 CDT

Original text of this message

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