Tech Off Thread

6 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

WCF ConcurrencyMode.Reentrant Confusion

Back to Forum: Tech Off
  • User profile image
    footballism

       The MSDN docs says that ConcurrencyMode.Reentrant enabls the situation that when the current service operation calls out, it will silently release the lock on this service object, so other thread can require the lock, and do any interesting things on this service object. But the code sample just shows us that the callout is actually a call to another service. so does any normal callout will release the lock such as calling into another normal .net methods rather than calling into another service operation?

    Sheva

  • User profile image
    justinjsmith

    The call has to be through the WCF infrastructure to unlock the service object. Calling into a method on a type does not unlock the service object. If you need this kind of behavior, then you can set the ConcurrencyMode to ConcurrencyMode.Multiple and lock state yourself.


    --Justin Smith
    http://blogs.msdn.com/justinjsmith

  • User profile image
    footballism

    justinjsmith wrote:
    The call has to be through the WCF infrastructure to unlock the service object. Calling into a method on a type does not unlock the service object. If you need this kind of behavior, then you can set the ConcurrencyMode to ConcurrencyMode.Multiple and lock state yourself.


    --Justin Smith
    http://blogs.msdn.com/justinjsmith


       Thanks for your clarification Justin, you know the documentation should be more speficic to it.

    Sheva

  • User profile image
    justinjsmith

    No worries. Happy to help.

    IRT MSDN documentation, I agree that we should add another sentence or two that clarify the point. I'll certainly pass that feedback on.

    --Justin Smith
    http://blogs.msdn.com/justinjsmith

  • User profile image
    justinjsmith

    I've submitted a new paragraph to the MSDN folks. As a result of your feedback, new verbiage that is more precise will/should appear in the .NET Framework 3.5 documentation.

    These changes go through an approval process, but I don't see any roadblocks.


    --Justin Smith
    http://blogs.msdn.com/justinjsmith


  • User profile image
    Suhas.​Chatekar

    justinjsmith said:
    I've submitted a new paragraph to the MSDN folks. As a result of your feedback, new verbiage that is more precise will/should appear in the .NET Framework 3.5 documentation.

    These changes go through an approval process, but I don't see any roadblocks.


    --Justin Smith
    http://blogs.msdn.com/justinjsmith


    Hey Justin,

    I thought, you may be able to help me with this.
    We have setup a SCF service which runs with a ConcurrencyMode.Single
    Till a few days back we were only a few connecting to that service. Now there are more clients connecting to this service and service has stopped accepting the clients.
    I tried changing the concurrency modes to different values and nothing helped.
    We are hosting this service into a Windows NT Service.

    Let me know if there is something that I need to set on the service to handle more concurrent calls or its altogether a different problem?

    Thanks
    Suhas

    suhas dot chatekar at gmail dot com

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.