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).
- is cloned by
-
WFLY-5074 MDB should not permit transaction attributes other than REQUIRED and NOT_SUPPORTED
- Closed