|
Home > Archive > WebSphere Application Server > January 2006 > JDBC: DriverManager.setLoginTimeout(5) not working properly
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
JDBC: DriverManager.setLoginTimeout(5) not working properly
|
|
|
| The problem occurs with an application developed for a Tomcat server. We have "migrated" the application to WAS Express (actually "adapted"), but some things that worked really fine with Tomcat seems to not do that with WAS.
One of them are the database connections: We are connecting to databases through the simplest code:
Class.forName ("com.informix.jdbc.IfxDriver");
DriverManager.setLoginTimeout(5);
Connection conn = DriverManager.getConnection (url);
The problems is that the "setLoginTimeout(int)" method does not have any effect in WAS, indeed if the database server is down (or the server could not be reached), Websphere will hung without using the timeout for the connection.
After sometime the trace in server shows this messages:
=========
Thread "WebContainer : 15" (000002dc) has been active for 641491 milliseconds and may be hung. There are 8 threads in total in the server that may be hung
=========
What should I do? something I'm missing?
thanks in advance.
| |
|
|
|
|
|