added "flush()" method to TransactionStatus and TransactionSynchronization interfaces; test context manager automatically flushes transactions before rolling back; general polishing of transaction management code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -345,7 +345,7 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan
|
||||
}
|
||||
|
||||
public boolean isNewConnectionHolder() {
|
||||
return newConnectionHolder;
|
||||
return this.newConnectionHolder;
|
||||
}
|
||||
|
||||
public boolean hasTransaction() {
|
||||
@@ -357,7 +357,7 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan
|
||||
}
|
||||
|
||||
public boolean isMustRestoreAutoCommit() {
|
||||
return mustRestoreAutoCommit;
|
||||
return this.mustRestoreAutoCommit;
|
||||
}
|
||||
|
||||
public void setRollbackOnly() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -87,6 +87,10 @@ public abstract class JdbcTransactionObjectSupport implements SavepointManager,
|
||||
return this.savepointAllowed;
|
||||
}
|
||||
|
||||
public void flush() {
|
||||
// no-op
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Implementation of SavepointManager
|
||||
|
||||
Reference in New Issue
Block a user