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: Connection handling with jdbc.oracle.thin

Re: Connection handling with jdbc.oracle.thin

From: Steve Hall <stephenhallANTISPAM_at_earthlink.net>
Date: Wed, 24 Nov 1999 02:31:18 GMT
Message-ID: <aqim3ss49qisdgfj1qpd3dntlmjv8der54@4ax.com>


On 22 Nov 1999 19:01:34 GMT, jorgland_at_sol.wohnheim.uni-ulm.de (Joerg <snip>

.
.
.

>There is no exception thrown and no error log. After some debugging
>it seems that <statement>.executeQuery() never returns and that this
>is not a query or RDBMS problem but a timeout on the network connection
>to the oracle server. I read lots of documentation but I did not
>find anything about such a timeout. Neither <Connection>.setLoginTimeout()
>nor <Statement>.setQueryTimeout() show any effect on this behaviour.
>
>Did anyone ever experience this problem and does anyone have a
>solution for that? One could say 'create the connection in doGet()
>and close it there', but I don't want to do this if there's any
>possibility to avoid it.
>
>Thanks in advance,
>Joerg

Hello,

I'm seeing something very similar in a connection pool that I've constructed. We recycle connections to the connection pool after use and this works very well, but we see that occasionally a connection will "hang" and the calling thread will block indefinitely. Our regular pool-cleanup routines don't work with this "hung" connection and we sometimes have to kill the whole JVM to clean up.

I have had confirmation from others on Usenet that setLoginTimeout() is not implemented, so that doesn't help. The odd thing is that with Solaris 2.6 and JDK 1.1.6, 1.1.7, 1.1.8 or 1.2.1 passing a bad connect string, bad JDBC user id or bad JDBC password causes the connection attempt to hang ( against Oracle 8.0.5 ) indefinitely. Interestingly, in the course of developing a workaround to this awful behavior, I ran some test code in IBM's Visual Age for Java, V2.0 and discovered that every condition I could throw at the getConnection() call generated an exception like I expected.

The foregoing leads me to believe that there may be something odd going on with the VM. Visual Age's worked perfectly, but I can't exactly run that on my server !

I'm re-writing my connection pool software to "age" connections and use worker threads to actually perform the connect / close operations to avoid these problems. Sure seems like a lot of work to deal with a driver/VM environment that won't throw exceptions !

Regards,

Stephen H Received on Tue Nov 23 1999 - 20:31:18 CST

Original text of this message

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