Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-635

MDB should not permit transaction attributes other than REQUIRED and NOT_SUPPORTED

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.ER5
    • 7.0.0.DR7, 7.0.0.ER5
    • EJB, JMS
    • None

      Message driven bean should be used only with transaction attributes REQUIRED and NOT_SUPPORTED.

      The ejb specification says

      13.6.3 Container-Managed Transaction Demarcation for Message-Driven Beans
      Only the NOT_SUPPORTED and REQUIRED transaction attributes may be used for message-driven bean message listener methods. The use of the other transaction attributes is not meaningful for message-driven bean message listener methods because there is no pre-existing client transaction context (REQUIRES_NEW, SUPPORTS) and no client to handle exceptions (MANDATORY, NEVER).

      EAP 7 permits usage of other transaction attributes as well. In my testcase strangely attribute REQUIRED behaves differently than REQUIRES_NEW.

      I do have mdb receiving message from remote message broker of ActiveMQ and closing connection during the commit (during prepare phase of XA 2PC). It happens to me that if used REQUIRED then all works fine. If used REQUIRES_NEW message seems to be read from the inbound queue but returned there instead of being left in in-doubt state (as expected when txn failed to prepare all participants).

            jmesnil1@redhat.com Jeff Mesnil
            ochaloup@redhat.com Ondrej Chaloupka (Inactive)
            Ondrej Chaloupka Ondrej Chaloupka (Inactive)
            Ondrej Chaloupka Ondrej Chaloupka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: