Infinite wait for connection using JDBC thin driver.
742375Dec 21 2009 — edited Jan 13 2010Hi,
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.