Explain transactions in WCF.- Transactions in WCF allow several components to concurrently participate in an operation.
- It is a collection of one or more units of operation executed as a whole.
- Transactions are a group of operations that are atomic, consistent, isolated and durable.
- WCF has features that allow distributed transactions.
- Application config file can be used for setting transaction timeouts.
- It plays an important role in any business application that involved CRUD operations.
It has following four characteristics:
- Transaction must be atomic, it means either all the operations of the transactions succeed or none of them succeed.
- Consistent transaction means that the outcome is exactly what you expected it to be.
- Isolated transactions are private, it means that no else knows about the transaction until it is committed.
- Durable transaction must survive failures. In this, the changes have taken effect. For a transaction to be durable, it must maintain its committed state if there is a failure.