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: [email protected]
For additional commands, e-mail: [email protected]