You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Eric Espares <ee...@gmail.com> on 2007/08/21 08:00:05 UTC

how to speed up sql connection?

Hi,

We use Apache Tomcat 5.0.28, jtds-1.2.1 as jdbc driver, DBCP Jakarta-commons
as connection pooling and MS SQL 2000 sp4 as database.  We decided to use
dbcp commons for our connection pooling but the sql connection is not the
same as before. Sometimes we encounter this error:

java.sql.SQLException: Transaction (Process ID 312) was deadlocked on lock
resources with another process and has been chosen as the deadlock victim.
Rerun the
transaction.    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(
SQLDiagnostic.j
ava:367)

java.sql.SQLException: Invalid state, the Connection object is closed.
        at net.sourceforge.jtds.jdbc.TdsCore.checkOpen(TdsCore.java:451)
        at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java
:630)
        at net.sourceforge.jtds.jdbc.MSCursorResultSet.processOutput(
MSCursorResultSet.java:943)

Any idea on how to solve this problem.

Thanks,
Eric