only retrieve transaction manager bean if necessary (SPR-7153)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3308 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller 2010-05-03 12:51:54 +00:00
parent 4840f1da39
commit b15ec21c0e
1 changed files with 1 additions and 2 deletions

View File

@ -32,7 +32,6 @@ import org.springframework.transaction.NoTransactionException;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.TransactionSystemException;
import org.springframework.transaction.interceptor.TransactionAspectUtils;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
@ -238,7 +237,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
* Determine the specific transaction manager to use for the given transaction.
*/
protected PlatformTransactionManager determineTransactionManager(TransactionAttribute txAttr) {
if (this.transactionManager != null || this.beanFactory == null) {
if (this.transactionManager != null || this.beanFactory == null || txAttr == null) {
return this.transactionManager;
}
String qualifier = txAttr.getQualifier();