Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Connection handling with jdbc.oracle.thin
Joerg wrote:
<snip>
>, the servlet hangs when doing a request.
>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've seen something similar in a connection pool we've implemented. We have two failure modes that are occurring, neither of which throw exceptions, but instead hang the connection:
I discovered something VERY interesting while developing a
connection handler to time out these operations by isolating
them to a separate thread: I developed this new handler class in
IBM Visual Age V 2.0 ( JDK 1.1.7 ).
What I found was that when running under the Visual Age VM, the
failed getConnection() calls threw exceptions every time, just
like I'd expect. Bad connect string, database not available,
incorrect user, etc., all worked properly and threw exceptions
under VA 2.0's environment.
But on Solaris 2.6 and Windows NT using any of JDK 1.1.6, 1.1.7, 1.1.8, 1.2.1, any of the above conditions cause the calling thread to block indefinitely. We're using Oracle thin drivers connecting to an Oracle 8.0.5 database.
I suspect this is a Java VM / JDBC interaction, but I'm not sure what to do about it, other than write an elaborate connection-management system that will time out hung operations and kill the requesting thread !
Steve H Received on Wed Nov 24 1999 - 09:34:03 CST