<strong>method setlogintimeout() of DriverManager doesn't work as per documentation</strong>
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   thillai_selvan
Posted On:   Wednesday, November 28, 2001 10:06 PM

In my JDBC wrapper class,Iam using thin driver for database connections. I would like the class to handle situations(give some appropriate error message) even if the Database Box goes down (machine turned off) . Under this scenerio(machine turned off) when i try to get a connection using DriverManager.getConnection() method, the system hangs awaiting a response from the database server .I tried using setLoginTimeout() method before getconnection() being called but still it hangs. I tired replacing the DriverManager class with DataSource class and used setLoginTimeout() method for the DataSource , still iam unable get out of the getConnection() method when the database server is turned off. I need   More>>

In my JDBC wrapper class,Iam using thin driver for database connections. I would like the class to handle situations(give some appropriate error message) even if the Database Box goes down (machine turned off) . Under this scenerio(machine turned off) when i try to get a connection using DriverManager.getConnection() method, the system hangs awaiting a response from the database server .I tried using setLoginTimeout() method before getconnection() being called but still it hangs.




I tired replacing the DriverManager class with DataSource class and used setLoginTimeout() method for the DataSource , still iam unable get out of the getConnection() method when the database server is turned off.





I need to address this issue can anyone help me out in this issue.





thanks in advance..    <<Less

Re: <strong>method setlogintimeout() of DriverManager doesn't work as per documentation</strong>

Posted By:   Bernie_Acs  
Posted On:   Thursday, November 29, 2001 09:31 AM

The default value for LoginTimeOut() is zero which means wait forever for most DBs and that seems to be what you are compaining is happening even when you set the value to non-zero using this method call.



I am a bit curious as to what DB type and driver are you using ?


Would submit a snipplet of code showing what you have actually done to establish the failure you are witnessing?
About | Sitemap | Contact