]
Jeff Mesnil commented on WFLY-5074:
-----------------------------------
[~ochaloup] Do you have a test case highlighting the issue?
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
NOT_SUPPORTED.
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).