سؤال

As far as I know there is only AUTO_ACKNOWLEDGE and DUPS_OK_ACKNOWLEDGE possible with MDB. I would like to have something like CLIENT_ACKNOWLEDGE to avoid XA transactions.

Basically what I want: get a message --> start local transaction --> perform db operations --> end local transaction --> ack message

Do you know how to achieve this?

Currently i use Jboss 5.1.GA.

هل كانت مفيدة؟

المحلول

I found compenhensive description of MDB strategies here.

AFAIK there is no way to perform ack manually, but if we use Bean Managed Transaction, the ack won't occure in case of exception in onMessage method. So we can start and finish our transaction 'manually' and in case of exception our message won't be ack.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top