|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Transaction attributes on MDB |
« View previous topic :: View next topic » |
Author |
Message
|
texan |
Posted: Mon Apr 25, 2005 5:41 am Post subject: Transaction attributes on MDB |
|
|
Acolyte
Joined: 25 Feb 2004 Posts: 74
|
I have a MDB that listens to a queue. If MDB cannot process the message, then I want to move that message to error queue. MDB calls another EJB to perform datbase insert/updates. In my scenario, if database update fails I want to move that to error queue.
In order to do this, I am catching all exceptions in OnMessage function and calling rollback on MessageDrivenContext and then am moving that message to error queue. Until rollback its working fine. But when am moving to error queue, its not letting me do that and throwing transaction already rolledback exception. Moreover, my message left on original queue and it is stopping my listener. What is the best approach for handling this scenario? How would typically mdb configured?
Appreciate all your help and time. |
|
Back to top |
|
 |
malammik |
Posted: Mon Apr 25, 2005 6:56 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Apr 25, 2005 4:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You need to set a backout threshold on the queue.
This value should be one less than the retry value of the mdb and > 0.
If there is no backout queue defined the msg will go to the dlq with reason 2362 (from memory).
If there is a backout queue defined the message will be put on the backout queue.
Enjoy  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|