Some drivers support auto-reconnect parameter:
http://objectstyle.org/confluence/display/CAY/Reconnect
jTDS doesn't seem to support that. From the stack trace, you are
using a DBCP connection pool. IIRC DBCP allows transparent reconnect
with any driver. You'd have to check DBCP docs on that.
Andrus
On Apr 3, 2006, at 5:34 AM, Steve Wells wrote:
> Hi,
>
> If we try and run a query after the connection have been idle for
> some time,
> many hours (sorry I don't exactly yet know how long) we get:
>
> Caused by: java.sql.SQLException: Invalid state, the Connection
> object is
> closed.
> at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen
> (ConnectionJDBC2.java
> :1305)
> at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareCall (
> ConnectionJDBC2.java:1941)
> at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.prepareCall(
> DelegatingConnection.java:212)
> at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource
> $PoolGuardConnectionWrapper.prepareCall
> (PoolingDataSource.java :268)
> at
> org.objectstyle.cayenne.access.trans.ProcedureTranslator.createStateme
> nt
> (ProcedureTranslator.java:160)
> at
> org.objectstyle.cayenne.dba.sqlserver.SQLServerProcedureAction.perform
> Action
> (SQLServerProcedureAction.java :105)
> at org.objectstyle.cayenne.access.DataNodeQueryAction.runQuery(
> DataNodeQueryAction.java:95)
> at org.objectstyle.cayenne.access.DataNode.performQueries
> (DataNode.java
> :321)
> ... 54 more
>
> using SQL Server, jtds 1.2, Cayenne M10. Any thoughts please?
This archive was generated by hypermail 2.0.0 : Mon Apr 03 2006 - 04:11:43 EDT