I have an ESB (Aqualogic) that have a proxy.
开发者_如何学JAVAThis proxy will call 3 different services, and i have to put those 3 services in a transaction scope...
ESB doesn't have support to transactions...
Someone know any solution to that?
I am not familiar with Aqualogic, but in general I can say that what you want to do is very, very difficult.
If Aqualogic uses MSMQ for transport then you may have some form of support for transactions by using transactional queues. But that's only the start.
If you want to integrate WCF services with a transactional context, you need to set up support for the WS-Atomic protocol (see http://msdn.microsoft.com/en-us/library/ms729784.aspx and http://social.msdn.microsoft.com/Forums/en/wcf/thread/cae32545-6536-4631-b89f-54f55da62199). This is a serious pain in the butt.
Not just to configure it, but also to use it. Using WS-Atomic across servers means you need to activate MSDTC on all machines, and coordination between these MSDTC's is very slow and prone to long timeouts.
It's a better bet to not expect to run everything in a single transaction, but to use a workflow that compensates for partial success/partial failure of your operation. See also http://msdn.microsoft.com/en-us/library/dd483319.aspx for an example.
精彩评论