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 » Multiphase Commit » Two Session JMS Transactionality question

Post new topic  Reply to topic
 Two Session JMS Transactionality question « View previous topic :: View next topic » 
Author Message
MQFanUK
PostPosted: Mon Jul 14, 2008 7:54 am    Post subject: Two Session JMS Transactionality question Reply with quote

Newbie

Joined: 14 Jul 2008
Posts: 1

Hi all

We have written a small stand-alone Java application which simply moves MQ msgs from one QM to another QM (on a different machine) using JMS API. I know this is not the best practice but one of the QMs is MQ ESE and there are issues with encrytion/decryption exists when sending a msg from ESE to non-ESE QMs.. hence the App.

We have two (2) JMS sessions. We have used the JMS API to receive msgs from Q1 on QM1 and put them onto Q2 on QM2. Very simply, this is all the app needs to do and we have got this working nicely!

Now we need to add some form of roll-back to the app, i.e., if the PUT fails to the destination Q, then they want to roll-back the GET from the source Q.

At the moment, it has two steps (separate transactions).

We apparently cannot use Synchpointing as that only works if you have one (1) session. We have two invovled.

Does anyone have advice on a simple way to cater for this? We've started looking into XA transactions as a possibility and this
seems promising. However, we've been told that it is quite involved if the app is stand-alone and not running on a server.

Any advice much appreciated!

Cheers
-Craig
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 14, 2008 3:55 pm    Post subject: Reply with quote

Grand High Poobah

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

Easy: have both your sessions being transacted.
Keep the receiving session open uncommitted until the sending session is committed, then commit the receiving session.

On any exception rollback both sessions.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
atheek
PostPosted: Thu Sep 18, 2008 2:37 am    Post subject: Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

fjb_saper wrote:
Easy: have both your sessions being transacted.
Keep the receiving session open uncommitted until the sending session is committed, then commit the receiving session.


This solution does ensure that messages wont get lost, but you cant have "exactly-once" quality of service. There is a possibility of duplicate messages, consider the scenario where appln crashes after sender commits and before receiver does so. If you are using single phase commit, this is the best you can achieve.
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 » Multiphase Commit » Two Session JMS Transactionality question
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.