Jared
2003-08-20 10:13:39 UTC
Hello,
I need to specify to MS SQL Server with JDBC how long a connection
object (gotten by DriverManager.getConnection()) should be kept alive
before it times out. I've searched a fair bit, and all I can find is
Statement.setQueryTimeout() and DriverManager.setLoginTimeout(), which
are both not what I need.
Statement.setQueryTimeout() will cause a query that's taking too long
to execute to time out, and DriverManager.setLoginTimeout() will cause
a connection that is taking too long to be created to time out. But
how can I cause an idle connection that has been around too long to
close itself?
Any help would be appreciated!
Thanks, Jared Hagel
I need to specify to MS SQL Server with JDBC how long a connection
object (gotten by DriverManager.getConnection()) should be kept alive
before it times out. I've searched a fair bit, and all I can find is
Statement.setQueryTimeout() and DriverManager.setLoginTimeout(), which
are both not what I need.
Statement.setQueryTimeout() will cause a query that's taking too long
to execute to time out, and DriverManager.setLoginTimeout() will cause
a connection that is taking too long to be created to time out. But
how can I cause an idle connection that has been around too long to
close itself?
Any help would be appreciated!
Thanks, Jared Hagel