[jboss-jira] [JBoss JIRA] (WFLY-5074) MDB should not permit transaction attributes other than REQUIRED and NOT_SUPPORTED

Ondřej Chaloupka (JIRA) issues at jboss.org
Mon Aug 10 08:40:06 EDT 2015


Ondřej Chaloupka created WFLY-5074:
--------------------------------------

             Summary: MDB should not permit transaction attributes other than REQUIRED and NOT_SUPPORTED 
                 Key: WFLY-5074
                 URL: https://issues.jboss.org/browse/WFLY-5074
             Project: WildFly
          Issue Type: Bug
          Components: EJB, JMS
            Reporter: Ondřej Chaloupka
            Assignee: Jeff Mesnil


Message driven bean should be used only with transaction attributes REQUIRED an REQUIRES_NEW.

The ejb specification says
{quote}
 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).
{quote}

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).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)



More information about the jboss-jira mailing list