Can you explain in depth how prepare and commit phases work?

 Posted by articlesMaint on 9/14/2009 | Category: WCF Interview questions | Views: 2291

Let’s consider 3 computers as shown in the below figure. The client consuming the WCF service resides in computer ‘A’ while computer ‘B’ and ‘C’ have the WCF services. The transaction is initiated from the computer ‘A’. So as we said previously there are 2 phase one is the prepare phase and the other commit phase. In prepare phase computer ‘A’ sends messages to all the WCF services saying, are they ready to commit?. Once all WCF services respond saying that they are ready for commit it starts the second phase i.e. In the second phase the WCF client issues a commit command. All the WCF services start execution and once they are done they revert back saying they have committed. When all the WCF services revert saying they have committed the transaction is marked as successful.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response