Shivprasad Koirala
WCF interview questions - What are the 3 ways of implementing WCF(Windows Communication Foundation) concurrency?
By Shivprasad Koirala in ASP.NET on Jun 27 2011
  • sushil kumar
    Jul, 2017 8

    3 ways to implement concurrency in WCF :- 1.) Sinlge 2.) Multiple 3.) Reentrant

    • 0
  • Shivprasad Koirala
    Jun, 2011 27

    Three ways by which you can handle concurrency in WCF is Single, multiple and reentrant. To specify WCF concurrency we need to use the ‘ServiceBehavior’ tag as shown below with appropriate ‘ConCurrencyMode’ property value.

    Single: - A single request has access to the WCF service object at a given moment of time. So only one request will be processed at any given moment of time. The other requests have to wait until the request processed by the WCF service is not completed.

    Multiple: - In this scenario multiple requests can be handled by the WCF service object at any given moment of time. In other words request are processed at the same time by spawning multiple threads on the WCF server object. So you have great a throughput here but you need to ensure concurrency issues related to WCF server objects.

    Reentrant: - A single request thread has access to the WCF service object, but the thread can exit the WCF service to call another WCF service or can also call WCF client through callback and reenter without deadlock.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS