题目内容

You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. The client applications call the service in a transaction. The service contract is defined as follows. (Line numbers are included for reference only.) 01 [ServiceContract] 02 public interface IDataUpdate 03 { 04 [OperationContract] 05 [TransactionFlow(TransactionFlowOption.Mandatory)] 06 void Update(string accountNumber, double amount); 07 } 08 09 ... 10 class UpdateService : IDataUpdate 11 { 12 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]13 public void Update(string accountNumber, double amount) 14 { 15 try 16 { 17 ... 18 } 19 catch(Exception ex) 20 { 21 WriteErrorLog(ex); 22 ... 23 } 24 } 25 } 26Customers report that the transaction completes successfully even if the Update method throws an exception.You need to ensure that the transaction is aborted if the Update method is not successful. What should you do? ()

A. Insert the following line at line 22: throw;
B. Insert the following line at line 09: [ServiceBehavior(TransactionAutoCompleteOnSessionClose=false)]
C. Replace line 12 with the following line: [OperationBehavior(TransactionScopeRequired=true, TransactionAutoComplete= false)]
D. Insert the following line at line 09.: [ServiceBehavior(TransactionAutoCompleteOnSessionClose=true)]

查看答案
更多问题

铸铁管石棉水泥接口,水泥标号不得低于()。

A. 225
B. 325
C. 425
D. 525

高选择性迷走神经切断术中被称为"罪恶支,易遗漏而造成术后溃疡复发的是指()

A. 迷走神经后干
B. 迷走神经前干
C. 迷走神经终末"鸦爪"支
D. 迷走神经腹腔支
E. 迷走神经高位分布到胃底的分支

超限运输车辆行驶公路前,其承运人应按什么规定向公路管理机构提出书面申请?

高炉内煤气流速远远超过临界速度,所以煤气流速对炉内矿石还原过程没有影响。

A. 正确
B. 错误

答案查题题库