News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
01 [ServiceContract(SessionMode = SessionMode.Required)]
02 public interface IContosoService
03 {
04 [OperationContract(IsOneWay = true, IsInitiating = true)]
05 void OperationOne(string value);
06
07 [OperationContract(IsOneWay = true, IsInitiating = false)]
08 void OperationTwo(string value);
09 }

The service is implemented as follows.

10 class ContosoService: IContosoService
11 {
12 public void OperationOne(string value) {...}
13
14 public void OperationTwo(string value) {...}
15 }

ContosoService uses NetMsmqBinding to listen for messages. The queue was set up to use transactions for adding and removing messages. You need to ensure that OperationOne and OperationTwo execute under the same transaction context when they are invoked in the same session. What should you do?

  1. Insert the following attribute to OperationOne on lContosoService

    [TransactionFlow(TransactionFlowOption.Mandatory)]

    Insert the following attribute to OperationTwo on IContosoService

    [TransactionFlow(TransactionFlowOption.Mandatory)]
  2. Insert the following attribute to OperationOne on ContosoSeivice

    [OperationBehavior(TransactonScopeRequired=true, TransactionAutoComplete=false)]

    Insert the following attribute to OperationTwo on ContosoService.

    [OperationBehavior(TransactionScopeRequired=true, TransactionAutoComplete=true)]
  3. Add the following XML segment to the application config file in the system serviceModel/bindings configuration section

    <netMsmqBinding>
    <binding name="contosoTx" durable="true" receiveContextEnabled="true" />
    </netMsmqBinding>

    Then use the NetMsmqBinding named contosoTx to listen for messages from the clients

  4. Add the following XML segment to the application config file in the systemserviceModel/bindings configuration section.

    <customBinding>
    <binding name="contosoTx">
    <transactionFlow />
    <binaryMessageEncoding />
    <msmqTransport durable="true" />
    </binding>
    </customBinding>

     Then use the CustommiBinding named contosoTx to listen fcw messages from the clierts.

Answer: Answer is b
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;