WCF provide the functionality of transactions based on WS specification which allow other language like JAVA to take advantage of this transaction that is the best part of WCF embracing other languages. Under transactions, every activity in the unit must either all succeed or all should fail.
This is achieved by using [TransactionFlow] attribute with different options like:
- TransactionFlowOption.NotAllowed: This is a default option. Using this option no transaction is applied.
- TransactionFlowOption.Allowed: This means client can use transaction but it is not compulsory.
- TransactionFlowOption.Mandatory: This option specifies that client must call the WCF service in a transaction mode. If the WCF service is called without transaction, ‘FaultException’ will be raised.