Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6425

Check for external transactions in PollingMessageListenerContainer

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1, 3.1
    • Fix Version/s: 3.1.1
    • Component/s: JMS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Currently PollingMessageListenerContainer doesn't check if transaction was already created by container and tries to created nested one.
      That causes the following error:

      10:31:13,826 | WARN | pool-52-thread-1 | essageListenerContainer$XAPoller 128 | 158 - org.apache.cxf.cxf-rt-transports-jms - 3.1.1.SNAPSHOT | Unexpected exception. Res
      tarting session and consumer javax.transaction.NotSupportedException: Nested Transactions are not supported
      at org.apache.geronimo.transaction.manager.TransactionManagerImpl.begin(TransactionManagerImpl.java:157) 111:org.apache.aries.transaction.manager:1.1.1]
      at org.apache.geronimo.transaction.manager.TransactionManagerImpl.begin(TransactionManagerImpl.java:152)[111:org.apache.aries.transaction.manager:1.1.1]
      at org.apache.cxf.transport.jms.util.PollingMessageListenerContainer$XAPoller.run(PollingMessageListenerContainer.java:107)[158:org.apache.cxf.cxf-rt-transports-jms:3.1.1.SNAPSHOT]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_21]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_21]
      at java.lang.Thread.run(Thread.java:722)[:1.7.0_21]
      

      Proposal: check if the transaction already exists and if yes:
      a) not start it explicitly through TransactionManager
      b) in case of exception call setRollbackOnly()

        Attachments

          Activity

            People

            • Assignee:
              cschneider Christian Schneider
              Reporter:
              ashakirin Andrei Shakirin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: