偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

WCF Transaction各種類型及設置方法介紹

開發(fā) 開發(fā)工具
我們今天主要為大家講解的就是針對WCF Transaction的一些分類,以及各種參數(shù)的設置方法,希望本文介紹的內(nèi)容能給大家?guī)硪恍椭?/div>

WCF通過其強大的功能優(yōu)勢,為我們實現(xiàn)了一個全新的跨平臺的企業(yè)級互聯(lián)應用平、解決方案。在WCF中實現(xiàn)多事務協(xié)調(diào),需要多方面的協(xié)調(diào)。既涉及到binding協(xié)議的設置,又涉及到ServiceBehavior和OperationBehavior的設置。

我們知道,關于binging protocal涉及到WCF Transaction的有2個值,即TransactionFlow=true|false。在ServiceBehavior-level,涉及到Transaction的是TransactionFlowOption,其值有Allowed,NotAllowed,Mandatory共3個option。在OperationBehavior-level,涉及到Transaction的是TransactionScopeRequired,其值有True|false共2個。 因此,將其全部組合起來的話,產(chǎn)生的可能配置為2*3*2=12種。

用一個簡單的公式表示為:

 

  1. Transaction = TransactionFlow[True|false](binding protocal)   
  2. +TransactionFlowOption[Allowed|NotAllowed|Mandatory](ServiceBehavior)   
  3. +TransactionScopeRequired[True|false](OperationBehavior) 

實際上,在這12種可能的配置中,有4種是相互矛盾的,因此剩下8種可能的配置。 My god,要配置一個事務還有8種可能的配置 :#t#

為了便于記憶,我們將剩余8種可能的配置分為4類,分別為:客戶/服務型事務(client/service transaction),客戶型事務(client transaction),服務型事務,非事務。

下面給出每種WCF中事務類型的典型配置

1.客戶/服務型事務

TransactionFlow=true(binding) + TransactionFlowOption=Allowed(ServiceBehavior) + TransactionScopeRequired=true(OperationBevior)

2.客戶型事務

TransactionFlow=true(binding) + TransactionFlowOption=Mandatory(ServiceBehavior) + TransactionScopeRequired=true(OperationBevior)

3 服務型事務

TransactionFlow=false(binding) + TransactionFlowOption=NotAllowed(ServiceBehavior) + TransactionScopeRequired=true(OperationBevior)

4 非事務

TransactionFlow=false(binding) + TransactionFlowOption=NotAllowed(ServiceBehavior) + TransactionScopeRequired=false(OperationBevior) 。簡單的講,如果發(fā)布一個service,不做任何WCF Transaction方面的設置,該Service就是nontransactional

責任編輯:曹凱 來源: 博客園
相關推薦

2010-02-26 14:58:14

WCF單例模式

2009-12-24 17:19:13

WPF觸發(fā)器

2010-01-18 11:13:59

光纖交換機接口

2010-02-04 11:32:01

數(shù)據(jù)交換技術

2020-12-01 10:24:48

人工智能機器學習技術

2020-12-01 16:21:06

人工智能深度學習機器學習

2021-04-20 08:32:56

蘋果AppStore違規(guī)

2010-02-24 17:47:05

WCF集合類型

2010-01-19 16:56:46

交換機光纖端口

2023-10-27 07:03:22

字符串String類型

2024-03-08 12:04:22

PythonPillow驗證碼

2009-12-21 17:40:25

WCF會話

2010-01-14 12:50:26

光纖以太網(wǎng)交換機

2021-10-20 06:02:41

網(wǎng)絡釣魚漏洞安全工具

2011-07-28 15:16:23

Oracle數(shù)據(jù)庫聯(lián)機日志spfile

2009-12-22 17:30:47

WCF Address

2009-12-21 16:04:45

WCF Dispose

2010-02-22 11:02:06

WCF元數(shù)據(jù)

2010-03-01 17:35:29

WCF協(xié)定

2010-02-25 16:07:28

WCF REST
點贊
收藏

51CTO技術棧公眾號