ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Transaction attributes on MDB

Post new topic  Reply to topic
 Transaction attributes on MDB « View previous topic :: View next topic » 
Author Message
texan
PostPosted: Mon Apr 25, 2005 5:41 am    Post subject: Transaction attributes on MDB Reply with quote

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
View user's profile Send private message
malammik
PostPosted: Mon Apr 25, 2005 6:56 am    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2005
Posts: 397
Location: Philadelphia, PA

Try defining a backout queue and see if the mdb listener picks up on it.
_________________
Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex
Back to top
View user's profile Send private message Visit poster's website AIM Address
fjb_saper
PostPosted: Mon Apr 25, 2005 4:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Transaction attributes on MDB
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.