Polishing

(cherry picked from commit 3767092)
This commit is contained in:
Juergen Hoeller
2016-08-31 01:53:03 +02:00
parent 31c5644691
commit ab9fea6b8d
6 changed files with 51 additions and 40 deletions

View File

@@ -32,10 +32,10 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* an event to a {@link TransactionalEventListener} annotated method. Supports
* the exact same features as any regular {@link EventListener} annotated method
* but is aware of the transactional context of the event publisher.
* <p>
* Processing of {@link TransactionalEventListener} is enabled automatically when
* Spring's transaction management is enabled. For other cases, registering a
* bean of type {@link TransactionalEventListenerFactory} is required.
*
* <p>Processing of {@link TransactionalEventListener} is enabled automatically
* when Spring's transaction management is enabled. For other cases, registering
* a bean of type {@link TransactionalEventListenerFactory} is required.
*
* @author Stephane Nicoll
* @author Juergen Hoeller
@@ -69,8 +69,11 @@ class ApplicationListenerMethodTransactionalAdapter extends ApplicationListenerM
}
processEvent(event);
}
else if (logger.isDebugEnabled()) {
logger.debug("No transaction is running - skipping " + event);
else {
// No transactional event execution at all
if (logger.isDebugEnabled()) {
logger.debug("No transaction is active - skipping " + event);
}
}
}