Hello Ranchers,
I have a MDB implementing MessageListener and TransactionAttribute.NOT_SUPPORTED. The onMessage() simply throws an EJBException:
I use
jboss 4.2.2. When I execute the code the server tries to redeliver the message multiple times. Now I've the following questions:
a) Why does the server redeliver the message? From 13.6.3.2 of the ejb3-spec I understand, that this will happen only to MDB's with TransactionAttribute.Required set:
... If the
onMessage method does not successfully complete or the transaction is rolled back, message redelivery semantics apply.
(13.6.3.2 is only about REQUIRED CMT)
b) Also in 13.6.3.2 it reads:
A transaction must be started before the dequeuing of the JMS message and, hence, before the invocation of the message-driven bean�s onMessage method. The resource manager associated with the arriving message is enlisted with the transaction as well as all the resource managers accessed by the onMessage method within the transaction...
Does JMS starts a transaction and if so, is this transaction suspended before calling onMessage?
I'm very confused, please help me getting clearer ...
Thank you all,
Michael