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:
Juergen Hoeller
2009-02-19 00:24:05 +00:00
parent dd7d299aa4
commit 4cc42bf16f
34 changed files with 415 additions and 134 deletions

View File

@@ -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() {

View File

@@ -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