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 » MQ Message Roll back

Post new topic  Reply to topic
 MQ Message Roll back « View previous topic :: View next topic » 
Author Message
nz1g9j
PostPosted: Thu Jun 28, 2007 7:16 am    Post subject: MQ Message Roll back Reply with quote

Newbie

Joined: 02 Jun 2007
Posts: 7
Location: Detroit

How do I roll back MQ message after catching an exception. Here is the code snippet.
Even after throwing the exception the message is showing up in the queue.

Your help is greatly appreciated.

private SessionContext ctx

try{



// QueueSender.send(textMessage);



// throw null pointer exception for testing rollback



}catch(Exception e){

ctx.setRollbackOnly();

}
Back to top
View user's profile Send private message AIM Address
Vitor
PostPosted: Thu Jun 28, 2007 7:19 am    Post subject: Re: MQ Message Roll back Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

nz1g9j wrote:
How do I roll back MQ message after catching an exception. Here is the code snippet.
Even after throwing the exception the message is showing up in the queue.


Where, presumably it's been rolled back after the application reading it off abended?

The backout queue on the local queue definition (if that's what you're referring to) is not honoured by a base queue manager; your application should include code to use it once it reads a message with a backout count higher than the threshold.

Note that software like WMB does honour the queue within it's MQInput node, but this is a specifically coded function.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ Message Roll back
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.