Author |
Message
|
Scooter |
Posted: Thu Aug 03, 2006 10:01 am Post subject: Is this the correct approach to Transactions? |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
I have read several manuals and many posts about Transactions and XA. I'm looking to implement a process that requires the use of transactions and wanted to verify my approach to the problem with more experienced developers.
Scenario:
We have a local queue that has messages and we need to pull each message from the queue and transform the data that is contained in the message and then place the message on a remote queue to be delivered to another remote server. Both the local and remote queue will be located on the same server and Qmgr. The program will be written in JAVA and will be running on the server (AIX) and will be in binding mode. We are using MQ 5.3 CSD11. This process must be XA Compliant.
Approach:
Use get and put calls in a single UOW with Syncpoint to control the messages. MQCMT and MQROLLBACK will be used to control the success of the process.
Is this the correct approach to this scenario or I'm I missing something with the way UOW and syncpoint work?
Thanks for any input you can provide. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 03, 2006 10:03 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You don't need XA to coordinate transactions between two queues.
Just between MQ and something else, like a database. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Scooter |
Posted: Thu Aug 03, 2006 12:58 pm Post subject: |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
Ok, but would I still use UOW and Syncpoint to get guaranteed one-time delivery to the remote queue? I can allow duplicate messages put in the remote queue and can't let a message be lost. |
|
Back to top |
|
 |
Scooter |
Posted: Thu Aug 03, 2006 1:00 pm Post subject: |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
That should be "I can't allow duplicate messages put in the remote queue and can't let a message be lost."
Sorry  |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 03, 2006 1:19 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Scooter |
Posted: Thu Aug 03, 2006 1:23 pm Post subject: |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
|
Back to top |
|
 |
|