From b0afa0c4727aff343a5e3bb43022b154fcd3fb38 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 3 May 2010 12:51:54 +0000 Subject: [PATCH] only retrieve transaction manager bean if necessary (SPR-7153) --- .../transaction/interceptor/TransactionAspectSupport.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java index d32b4a41a9..2527d49be4 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java @@ -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();