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