You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2012/08/29 05:36:33 UTC
svn commit: r1378436 -
/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/MssqlAdapter.java
Author: tfischer
Date: Wed Aug 29 03:36:33 2012
New Revision: 1378436
URL: http://svn.apache.org/viewvc?rev=1378436&view=rev
Log:
TORQUE-222 change the unlock table implementation in MSSQL to do nothing.
Modified:
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/MssqlAdapter.java
Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/MssqlAdapter.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/MssqlAdapter.java?rev=1378436&r1=1378435&r2=1378436&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/MssqlAdapter.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/MssqlAdapter.java Wed Aug 29 03:36:33 2012
@@ -125,14 +125,19 @@ public class MssqlAdapter extends Abstra
}
catch (Exception e)
{
- log.warn("Colud not close lock statement", e);
+ log.warn("Could not close lock statement", e);
}
}
}
}
/**
- * Unlocks the specified table.
+ * Tries to unlock the specified table.
+ * This implementation does nothing as tables in MSSQL are unlocked
+ * when a commit or rollback is issued.
+ * This has unintended side effects, as well as we do not know whether
+ * to use commit or rollback.
+ * The lock will go away automatically when the transaction is ended.
*
* @param con The JDBC connection to use.
* @param table The name of the table to unlock.
@@ -141,9 +146,7 @@ public class MssqlAdapter extends Abstra
@Override
public void unlockTable(Connection con, String table) throws SQLException
{
- // Tables in Sybase are unlocked when a commit is issued. The
- // user may have issued a commit but do it here to be sure.
- con.commit();
+ // do nothing
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org