Which attribute should you apply to the MessageProcessor class?

You are modifying an existing Windows Communication Foundation (WCF) service that is
defined as follows. [ServiceContract] public interface IMessageProcessor {
[OperationContract] void ProcessMessage (); } public class MessageProcessor :
IMessageProcessor { public void ProcessMessage () { & Sub mitOrder (); & } } SubmitOrder
makes a call to another service. The ProcessMessage method does not perform as
expected under a heavy load. You need to enable processing of multiple messages. New
messages must only be processed when the ProcessMessage method is not processing
requests, or when it is waiting for calls to SubmitOrder to return. Which attribute should you
apply to the MessageProcessor class?

You are modifying an existing Windows Communication Foundation (WCF) service that is
defined as follows. [ServiceContract] public interface IMessageProcessor {
[OperationContract] void ProcessMessage (); } public class MessageProcessor :
IMessageProcessor { public void ProcessMessage () { & Sub mitOrder (); & } } SubmitOrder
makes a call to another service. The ProcessMessage method does not perform as
expected under a heavy load. You need to enable processing of multiple messages. New
messages must only be processed when the ProcessMessage method is not processing
requests, or when it is waiting for calls to SubmitOrder to return. Which attribute should you
apply to the MessageProcessor class?

A.
CallbackBehavior ( ConcurrencyMode = ConcurrencyMode.Multiple )

B.
ServiceBehavior ( ConcurrencyMode = ConcurrencyMode.Reentrant )

C.
ServiceBehavior ( ConcurrencyMode = ConcurrencyMode.Multiple )

D.
CallbackBehavior ( ConcurrencyMode = ConcurrencyMode.Reentrant )



Leave a Reply 0

Your email address will not be published. Required fields are marked *