|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2014 the original author or authors. |
| 2 | + * Copyright 2002-2016 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
17 | 17 | package org.springframework.transaction.interceptor;
|
18 | 18 |
|
19 | 19 | import java.lang.reflect.Method;
|
| 20 | +import java.util.Map; |
20 | 21 | import java.util.Properties;
|
21 | 22 | import java.util.concurrent.ConcurrentHashMap;
|
22 | 23 |
|
@@ -85,7 +86,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
85 | 86 | new NamedThreadLocal<TransactionInfo>("Current aspect-driven transaction");
|
86 | 87 |
|
87 | 88 |
|
88 |
| - private final ConcurrentHashMap<Object, PlatformTransactionManager> transactionManagerCache = |
| 89 | + private final Map<Object, PlatformTransactionManager> transactionManagerCache = |
89 | 90 | new ConcurrentHashMap<Object, PlatformTransactionManager>();
|
90 | 91 |
|
91 | 92 | /**
|
@@ -243,7 +244,7 @@ protected final BeanFactory getBeanFactory() {
|
243 | 244 | public void afterPropertiesSet() {
|
244 | 245 | if (getTransactionManager() == null && this.beanFactory == null) {
|
245 | 246 | throw new IllegalStateException(
|
246 |
| - "Setting the property 'transactionManager' or running in a ListableBeanFactory is required"); |
| 247 | + "Setting the property 'transactionManager' or running in a BeanFactory is required"); |
247 | 248 | }
|
248 | 249 | if (this.transactionAttributeSource == null) {
|
249 | 250 | throw new IllegalStateException(
|
@@ -449,17 +450,16 @@ protected TransactionInfo prepareTransactionInfo(PlatformTransactionManager tm,
|
449 | 450 |
|
450 | 451 | TransactionInfo txInfo = new TransactionInfo(tm, txAttr, joinpointIdentification);
|
451 | 452 | if (txAttr != null) {
|
452 |
| - // We need a transaction for this method |
| 453 | + // We need a transaction for this method... |
453 | 454 | if (logger.isTraceEnabled()) {
|
454 | 455 | logger.trace("Getting transaction for [" + txInfo.getJoinpointIdentification() + "]");
|
455 | 456 | }
|
456 |
| - // The transaction manager will flag an error if an incompatible tx already exists |
| 457 | + // The transaction manager will flag an error if an incompatible tx already exists. |
457 | 458 | txInfo.newTransactionStatus(status);
|
458 | 459 | }
|
459 | 460 | else {
|
460 |
| - // The TransactionInfo.hasTransaction() method will return |
461 |
| - // false. We created it only to preserve the integrity of |
462 |
| - // the ThreadLocal stack maintained in this class. |
| 461 | + // The TransactionInfo.hasTransaction() method will return false. We created it only |
| 462 | + // to preserve the integrity of the ThreadLocal stack maintained in this class. |
463 | 463 | if (logger.isTraceEnabled())
|
464 | 464 | logger.trace("Don't need to create transaction for [" + joinpointIdentification +
|
465 | 465 | "]: This method isn't transactional.");
|
|
0 commit comments