WCF Service Programming Design Specification (5): Transaction and concurrency management design

Source: Internet
Author: User
Tags constructor

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.