Author |
Message
|
Monk |
Posted: Tue Aug 04, 2009 10:03 pm Post subject: MB and adapters in transaction |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Hi All,
I have a following architecture ,
Front ends (COM based ) -> COM WBI adapter -> Message broker/ MQ -> Database(Oracle/SQL)
question
Can COM WBI adapter be a part of a global transaction?.
i.e if there is say a money transfer request from one account to another and this request is coming from Front end systems. Can the WBI adapter be a part of the transaction?
if it fails or crashes during the global transaction ? what will be the consequences?
Note : By global transaction i mean 2PC. Am i correct here?
Thanks. _________________ Thimk |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Wed Aug 05, 2009 12:03 am Post subject: Re: MB and adapters in transaction |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Monk wrote: |
Hi All,
if it fails or crashes during the global transaction ? what will be the consequences?
|
In 2PC, either all resuorces will be committed or all resources will be rolled back, depending exactly where in the transaction the failure occurs. But the point about 2PC is that all resources are / will be as they should be according the outcome of the global transaction.
Quote: |
Note : By global transaction i mean 2PC. Am i correct here?
|
Works with me. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 05, 2009 2:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Think also about asynchronous decoupled systems and the need for a compensating transaction.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Monk |
Posted: Wed Aug 05, 2009 2:50 am Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Quote: |
asynchronous decoupled systems and the need for a compensating transaction. |
Can you please elaborate on this..
may be some links/books to read on this kind of stuff.. _________________ Thimk |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 05, 2009 2:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well, let's say you have a biztalk service and an MQ service involved in the same transaction. Your MQ message is not committed unless you create a separate transaction for it. So if your global transaction needs to take action depending on the result of either the MQ or the biztalk side of the transaction you may need to rollback the part of the transaction that was successful.
This cannot be done without a compensating transaction because the branch that was successful is already committed...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Monk |
Posted: Wed Aug 05, 2009 3:10 am Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Quote: |
This cannot be done without a compensating transaction because the branch that was successful is already committed... |
So , How would I go about designing something like this and what are the things i need to factor in?
Some links related to MQ/MB would be nice..
Btw fjb_saper..you caught me, I was wondering when the poobahs would catch me..
 _________________ Thimk |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Wed Aug 05, 2009 3:17 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Monk wrote: |
So , How would I go about designing something like this and what are the things i need to factor in?
 |
This is application specific. The compensating transaction will provide the logic to undo the specific thing that was done. For example if you created an account and wish to roll this back, the compensating transaction would implement / invoke the logic to delete the account.
Last edited by WMBDEV1 on Wed Aug 05, 2009 5:00 am; edited 1 time in total |
|
Back to top |
|
 |
Monk |
Posted: Wed Aug 05, 2009 3:23 am Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Quote: |
This is application specific. The compensating transaction will provide the logic to undo the specific thing that was done. For example if you created an account and wish to roll this back, the compensating transaction would implement / invoke the logic to delete the account. |
Ahhhh I see now  _________________ Thimk |
|
Back to top |
|
 |
Monk |
Posted: Wed Aug 05, 2009 3:25 am Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Quote: |
This is application specific. The compensating transaction will provide the logic to undo the specific thing that was done. For example if you created an account and wish to roll this back, the compensating transaction would implement / invoke the logic to delete the account. |
So can i put this logic in Message broker or is it a bad idea? _________________ Thimk |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 05, 2009 3:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Generally a bad idea to try to locate this function somewhere.
You were looking at a multiphase commit. This would have been coordinated by some global transaction coordinator. Well the coordination here needs to happen at the next level. If you look at the standard ESB functionality you look most probably at a BPEL / orchestration and this is where the compensating transactions should be defined and executed if need be.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Monk |
Posted: Thu Aug 06, 2009 1:22 am Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Quote: |
You were looking at a multiphase commit. This would have been coordinated by some global transaction coordinator. Well the coordination here needs to happen at the next level. If you look at the standard ESB functionality you look most probably at a BPEL / orchestration and this is where the compensating transactions should be defined and executed if need be. |
Can I use Websphere Process server for this kind of thing? _________________ Thimk |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Thu Aug 06, 2009 1:53 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Quote: |
Can I use Websphere Process server for this kind of thing? |
Absolutely, it will orchestrate the need to perform the compensating transaction (although probably wont implement the actual logic to undo the work!) |
|
Back to top |
|
 |
Monk |
Posted: Sun Aug 09, 2009 8:58 pm Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
I have only one issue with using W Process server.
whenever we used it in production , it throws heap dumps..and its still not reliable and stable, probably until IBM fixes all the issues, I cant use it.
Is there any other product of IBM that can do the compensating transactions apart from WPS.
Thanks. _________________ Thimk |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Aug 09, 2009 9:19 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Monk wrote: |
I have only one issue with using W Process server.
whenever we used it in production , it throws heap dumps..and its still not reliable and stable, probably until IBM fixes all the issues, I cant use it.
Is there any other product of IBM that can do the compensating transactions apart from WPS.
Thanks. |
You can try to develop a WMB flow but it will be more complicated.
This should really belong into the BPEL realm i.e. WPS. Get with IBM and submit them the PMRs...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Monk |
Posted: Sun Aug 09, 2009 9:40 pm Post subject: |
|
|
 Master
Joined: 21 Apr 2007 Posts: 282
|
Hi,
fjb_saper : I also have adapters for COM involved in my architecture.
In my experience, using adapters is generally a bad idea in a critical transaction , even with HA, however for a normal enquiry , its ok.
How would using Web services work in a critical transaction in place of adapters. Would it be a good thing to do? _________________ Thimk |
|
Back to top |
|
 |
|