Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3143

JMS Messages with CMP and transactional=true are not commited to the queue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • 7.1.0.Final
    • 7.0.1.Final, 7.1.0.CR1, 7.1.0.CR1b
    • JMS
    • None
    • Hide

      Start JBoss 7.1.0.CR1 with standalong-full.xml
      Deploy attached TestEAR.ear
      access
      http://localhost:8080/TestWEB/JMSTest1 (transactional=false)
      access
      http://localhost:8080/TestWEB/JMSTest1 (transactional=true)

      Result:
      http://localhost:8080/TestWEB/JMSTest1
      10:40:29,498 INFO [de.tccproducts.test.JMSTest1] (http-127.0.0.1-127.0.0.1-8080-4) beforeSend
      10:40:29,511 INFO [de.tccproducts.test.TestServiceBean] (http-127.0.0.1-127.0.0.1-8080-4) Nontransactional message send...
      10:40:29,512 INFO [de.tccproducts.test.TestMDB] (Thread-1 (group:HornetQ-client-global-threads-22377537)) Processing message: HornetQMessage[ID:fa98b75a-3137-11e1-9994-b499bae1c417]:PERSISTENT
      10:40:34,512 INFO [de.tccproducts.test.TestServiceBean] (http-127.0.0.1-127.0.0.1-8080-4) Nontransactional message commit...
      10:40:34,516 INFO [de.tccproducts.test.JMSTest1] (http-127.0.0.1-127.0.0.1-8080-4) afterSend
      (message is processed before the send transaction is commited)

      http://localhost:8080/TestWEB/JMSTest2
      10:40:38,995 INFO [de.tccproducts.test.JMSTest2] (http-127.0.0.1-127.0.0.1-8080-4) beforeSend
      10:40:39,004 INFO [de.tccproducts.test.TestServiceBean] (http-127.0.0.1-127.0.0.1-8080-4) Transactional message send...
      10:40:44,004 INFO [de.tccproducts.test.TestServiceBean] (http-127.0.0.1-127.0.0.1-8080-4) Transactional message commit...
      10:40:44,009 INFO [de.tccproducts.test.JMSTest2] (http-127.0.0.1-127.0.0.1-8080-4) afterSend
      (message is never processed)

      Show
      Start JBoss 7.1.0.CR1 with standalong-full.xml Deploy attached TestEAR.ear access http://localhost:8080/TestWEB/JMSTest1 (transactional=false) access http://localhost:8080/TestWEB/JMSTest1 (transactional=true) Result: http://localhost:8080/TestWEB/JMSTest1 10:40:29,498 INFO [de.tccproducts.test.JMSTest1] (http-127.0.0.1-127.0.0.1-8080-4) beforeSend 10:40:29,511 INFO [de.tccproducts.test.TestServiceBean] (http-127.0.0.1-127.0.0.1-8080-4) Nontransactional message send... 10:40:29,512 INFO [de.tccproducts.test.TestMDB] (Thread-1 (group:HornetQ-client-global-threads-22377537)) Processing message: HornetQMessage [ID:fa98b75a-3137-11e1-9994-b499bae1c417] :PERSISTENT 10:40:34,512 INFO [de.tccproducts.test.TestServiceBean] (http-127.0.0.1-127.0.0.1-8080-4) Nontransactional message commit... 10:40:34,516 INFO [de.tccproducts.test.JMSTest1] (http-127.0.0.1-127.0.0.1-8080-4) afterSend (message is processed before the send transaction is commited) http://localhost:8080/TestWEB/JMSTest2 10:40:38,995 INFO [de.tccproducts.test.JMSTest2] (http-127.0.0.1-127.0.0.1-8080-4) beforeSend 10:40:39,004 INFO [de.tccproducts.test.TestServiceBean] (http-127.0.0.1-127.0.0.1-8080-4) Transactional message send... 10:40:44,004 INFO [de.tccproducts.test.TestServiceBean] (http-127.0.0.1-127.0.0.1-8080-4) Transactional message commit... 10:40:44,009 INFO [de.tccproducts.test.JMSTest2] (http-127.0.0.1-127.0.0.1-8080-4) afterSend (message is never processed)
    • Hide

      With the latest installment of AS 7 it is now possible to differentiate between having JMS transactions managed by the transaction manager or having JMS local transactions. Using java:/ConnectionFactory instead of java:/JmsXA for a transacted session will activate a JMS local transaction. The JMS local transaction must be explicitly committed via session.commit();

      So in the end this is a configuration issue of this new feature.

      Show
      With the latest installment of AS 7 it is now possible to differentiate between having JMS transactions managed by the transaction manager or having JMS local transactions. Using java:/ConnectionFactory instead of java:/JmsXA for a transacted session will activate a JMS local transaction. The JMS local transaction must be explicitly committed via session.commit(); So in the end this is a configuration issue of this new feature.

    Description

      When sending a message to a JMS queue using container managed transactions and setting transactional=true (connection.createSession(true, Session.AUTO_ACKNOWLEDGE)), the message is never added to the queue.
      Using transactional=false is not an option because the message is added to the queue immediately and not after transaction commit.

      This can be reproduced with the attached EAR (exploded deployment, so just unpack the .zip in the deployments directory) and the standalone-full.xml (JBoss 7.1.0.CR1

      Attachments

        1. TestEAR.ear.zip
          11 kB
        2. TestEAR.ear.zip
          11 kB
        3. TestEAR.ear.zip
          8 kB

        Activity

          People

            rhn-engineering-cdewolf Carlo de Wolf
            markusdoring_jira Markus Döring (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: