Author |
Message
|
techno |
Posted: Sun May 02, 2004 8:56 am Post subject: Negative Transactions! |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
This is a general question and I would like to know how this is implemented.
I have three processes connected via MQ (P1, P2, P3)
P1 is connected to P2 via MQ
P2 is connected to P3 via MQ
In applications like stock exhange and banking, any operation is very important.
Message in P1 gets processed and goes to P2. Say some database gets updated in the meanwhile. Now if message processing on P2 fails for some reason, what should be done? How do I negate the updates done in database already at P1. I know this can be done. But it turns out to be complex. Can we really use messaging here? What is the best way to go about it?
Thanks. |
|
Back to top |
|
 |
kirani |
Posted: Sun May 02, 2004 5:12 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You can use Global coordinated transactio to do this. There is a chapter in Administration guide, which explains how to setup queue manager for 2-phase commit. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
jefflowrey |
Posted: Sun May 02, 2004 8:16 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
kirani wrote: |
You can use Global coordinated transactio to do this. There is a chapter in Administration guide, which explains how to setup queue manager for 2-phase commit. |
That's not going to help him much if his queues span multiple queue managers, will it? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bower5932 |
Posted: Mon May 03, 2004 5:00 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Yes and no...If he has to back out something on the second queue manager that has an effect on the first queue manager, he can always send a compensating messaging back. You'll end up with what you want, but it might be in multiple units of work instead of a single one. |
|
Back to top |
|
 |
techno |
Posted: Mon May 03, 2004 7:40 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Solution seems to be sending a compensative message to undo till that time. This is very complex solution and application has to do a huge job.
Do you think messaging solution fits well here? |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon May 03, 2004 7:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The validity of using messaging isn't really the issue.
Regardless of how the three processes communicate, you're going to have transactional management questions involved.
At least, as long as the processes are seperated.
If you put all three logical steps inside the same process, you wouldn't have to worry about coordinating the transaction between the three logical processes.
Workflow and/or Process Choreography might handle this extra level of transactional management for you - as might a distributed transaction coordinator of some sort or another. But I can't say for sure about either of those, myself. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|