activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From THMayr <Thomas.M...@adesso.de>
Subject Re: Message not redirected to DLQ when exception thrown by MDB
Date Fri, 11 Mar 2016 16:23:19 GMT
One more add on:

Also the EJB 3.1 specification is a bit unclear how to handle message
acknowledge with bean managed transactions:

/*5.4.15 Message Acknowledgment for JMS Message-Driven Beans*
JMS message-driven beans should not attempt to use the JMS API for message
acknowledgment. Message acknowledgment is automatically handled by the
container. If the message-driven bean uses container-managed transaction
demarcation, message acknowledgment is handled automatically as a part of
the transaction commit. If bean-managed transaction demarcation is used, the
message receipt cannot be part of the bean-managed transaction, and, in this
case, the receipt is acknowledged by the container. If bean-managed
transaction demarcation is used, the Bean Provider can indicate whether JMS
AUTO_ACKNOWLEDGE semantics or DUPS_OK_ACKNOWLEDGE semantics should apply by
using the
activationConfig element of the MessageDriven annotation or by using the
activation-config-property deployment descriptor element. The property name
used to specify the acknowledgment mode is acknowledgeMode. If the
acknowledgeMode property is not specified, JMS AUTO_ACKNOWLEDGE semantics
are assumed. The value of the acknowledgeMode property must be either
Auto-acknowledge or Dups-ok-acknowledge for a JMS message-driven bean./

The specification seems to be differently interpreted. As I said already,
WebLogic handes it so, that when an exception occurs in the MDB messages are
resent to the bean and at last redirected to the DLQ. It doesn't matter if I
use ActiveMQ or the WebLogic internal JMS system. Interestingly, the message
is not redelivered or redirected, when I roll-back the user transaction. 

I wonder if this has something to do with the ActiveMQ resource adapter,
which is involved with WildFly but not with WebLogic. Or it is a WildFly
issue.

In any case IMHO acknowledging a message, when processing fails is not very
useful.

Thomas





--
View this message in context: http://activemq.2283324.n4.nabble.com/Message-not-redirected-to-DLQ-when-exception-thrown-by-MDB-tp4709187p4709206.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message