We use this Log4J config to display JTA info:
<category name="org.springframework.transaction">
<priority value="DEBUG"/>
</category>
The resulting log entries are of the type:
15:36:08,048 DEBUG [JtaTransactionManager] [ ] Creating new transaction with name [class]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
15:36:09,564 DEBUG [JtaTransactionManager] [ ] Initiating transaction commit
... Now we use Spring's MessageListener
to listen to an MQ queue. Problem is this is transactional, and we get the aforementioned logging printed out every 2 seconds.
What we want, is just to have these JTA log statements printed out when someone uses our REST API to access services that utilize @Transactional
. We don't want the JTA log entries that come from this "polling" MQ listening implementation.
Can you do this?