Skip to Content
Programming WCF Services, 2nd Edition
book

Programming WCF Services, 2nd Edition

by Juval Lowy
November 2008
Intermediate to advanced
784 pages
23h 28m
English
O'Reilly Media, Inc.
Content preview from Programming WCF Services, 2nd Edition

Concurrency Management

As with a connected service, the ConcurrencyMode property governs concurrent playback of queued messages. With a per-call service, all queued messages are played at once to different instances as fast as they come off the queue, up to the limit of the configured throttle. There is no need to configure for reentrancy to support callbacks, because the operation contexts can never have callback references. There is also no need to configure for multiple concurrent access, because no two messages will ever share an instance. In short, with a queued per-call service, the concurrency mode is ignored.

When it comes to a sessionful queued service, you are required to configure the service with ConcurrencyMode.Single. The reason is that it is the only concurrency mode that allows you to turn off auto-completion, which is essential to maintain the session semantic. The calls in the message are always played to the same service instance, one at a time.

A queued singleton is really the only instancing mode that has any leeway with its concurrency mode. If the singleton is configured with ConcurrencyMode.Single, WCF will retrieve the messages all at once from the queue (up to the thread pool and throttling limits) and then queue up the calls in the internal queue the context lock maintains. Calls will be dispatched to the singleton one at a time. If the singleton is configured with ConcurrencyMode.Multiple, WCF will retrieve the messages all at once from the queue (up to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming WCF Services

Programming WCF Services

Juval Lowy

Publisher Resources

ISBN: 9780596157210Supplemental ContentErrata