Fix for LDAP-123: Now returning false from ContextSourceAndDataSourceTransactionManager#isNestedTransaction, properly inidicating that

nested transactions are not supported.
This commit is contained in:
Mattias Arthursson
2009-01-03 10:33:36 +00:00
parent 0e0d796d00
commit 0d7375d927
2 changed files with 4 additions and 5 deletions

View File

@@ -29,6 +29,8 @@ import org.springframework.transaction.support.DefaultTransactionStatus;
* is <b>not</b> a JTA XA transaction; no two-phase commit will be performed,
* and thus commit and rollback may yield unexpected results.
*
* Note that nested transactions are not supported.
*
* @author Mattias Hellborg Arthursson
* @since 1.2
*/
@@ -49,10 +51,8 @@ public class ContextSourceAndDataSourceTransactionManager extends
* @see org.springframework.jdbc.datasource.DataSourceTransactionManager#isExistingTransaction(java.lang.Object)
*/
protected boolean isExistingTransaction(Object transaction) {
ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) transaction;
return super.isExistingTransaction(actualTransactionObject
.getDataSourceTransactionObject());
// We don't support nested transactions here
return false;
}
/*

View File

@@ -17,7 +17,6 @@
package org.springframework.ldap.transaction.compensating.manager;
import java.sql.Connection;
import java.sql.SQLException;
import javax.naming.directory.DirContext;
import javax.sql.DataSource;