Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Infinite wait for connection using JDBC thin driver.

742375Dec 21 2009 — edited Jan 13 2010
Hi,

I am using an OracleDataSource and an OracleConnectionCacheManager to manage my connection pool from my stand alone Java application. I am using ojdbc14.jar for my Oracle drivers. The database is Oracle 10g RAC. Java version is 1.5. I am using thin client.

The problem I have experienced is that upon calling the getConnection() method on the OracleDataSource object, my application waits infinitely for a connection. As my application is not checking how long it takes to retrieve a connection, the application effectively hangs.

Has anyone else witnessed this behaviour?? I have observed this behaviour in two seperate stand alone Java applications that are both talking to Oracle RAC databases.

When I create the OracleDataSource, I am considering calling the setLoginTimeout() method to specify a timeout when trying to connect to the database. Does anyone know if this will throw an SQLException if the infinite wait occurs again??

Thanks, Kenny.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 10 2010
Added on Dec 21 2009
10 comments
6,781 views