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 » Need help understanding onMessage

Post new topic  Reply to topic
 Need help understanding onMessage « View previous topic :: View next topic » 
Author Message
HondaAccord
PostPosted: Thu Apr 24, 2008 12:49 pm    Post subject: Need help understanding onMessage Reply with quote

Novice

Joined: 02 Apr 2008
Posts: 14

I need to perform a phase 1 commit or rollback from within an onMessage statement.

How do you mark the onMessage to act transactionally (The way I use it it apparently just performs a destructive GET on a QUEUE.

COuld someone show me a code example of a Phase I rollback from within an onMessage method ?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 24, 2008 2:17 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

There is no code difference in J2EE.

The MDB descriptor determines transactionality.

In order to roll back you have then to raise the proper exception.

If you are in a standalone app you need to do your own session management and have the MQ session transacted and available to the onMessage method in your class (reachable).
You then control commit or rollback with the session object.

Enjoy
_________________
MQ & Broker admin
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 » Need help understanding onMessage
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.