Today's content is the design specification for WCF transactions and concurrency management. WCF Service Programming Design Specification (5): Transaction and concurrency management design. Transactions and concurrency Management in WCF Service.
The following section is a queue service and security.
Transactions
Transaction
1. Never Manage transactions directly.
Do not directly manage transactions
2. Apply the TransactionFlow attribute on the contract and not the service class.
TransactionFlow attributes are annotated on the contract rather than on the service class.
3. Don't perform transactional work in the service constructor.
Do not perform transaction operations in the service's constructor
4. Using This book ' s terminology, configure services for either Client or Client/service transactions. Avoid None or Service transactions.
Use the terms in this book to configure the service for the client or client/server transaction mode. Avoid using None or service transaction mode.
5. Using This book ' s terminology, configure callbacks for either Service or Service/callback transactions. Avoid None or Callback transactions.
Use the terms in this book to configure callbacks for a service or service/callback transaction pattern. Avoid using None or callback transaction mode.
6. When using the Client/service or Service/callback mode, constrain the binding to flow transactions using the Bindingreq Uirement attribute.
Bind propagate Transaction by Bindingrequirement property when using client/service or service/callback mode
7. On the client, always catch all exceptions thrown by a service configured for None or service transactions.
At the client, always captures none or all exceptions thrown in the service transaction.
8. Enable reliability and ordered delivery even when using transactions.
Enable reliability and sequential delivery even when transactions are used