Results 1 to 4 of 4

Thread: Object scopes for WCF

  1. #1
    Join Date
    Nov 2008
    Posts
    4

    Default Object scopes for WCF

    Hi,

    I was wondering if there are any plans on introducing more object scopes for WCF? What I'm thinking about is a scope related to the InstanceContext and another related to the OperationContext.

    Or is there already something like that?

    Cheers,
    Mattias

  2. #2
    Join Date
    Oct 2005
    Location
    Toulouse, France
    Posts
    1,407

    Default

    Hi,

    The .NET Framework already allows you to do it.


    - Bruno
    My english is as poor as my taylor is rich

  3. #3
    Join Date
    Nov 2008
    Posts
    4

    Default

    Hi,
    I'm not sure exactly what you mean. The service objects will get scopes bound to the operation or instance contexts (depending on how you configure WCF) if they are configured as prototypes in Spring and "Spring.ServiceModel.Activation.ServiceHostFactory " is used.

    But for collaborators? I don't know of any non-invasive way of tying their life cycle to a WCF context. The least ugly way I've come up with is to use FactoryObjects to handle this but it clutters the Spring configuration and still requires me to do quite bit more plumbing than in an ASP.NET application.
    Last edited by mattias.ohrn@gmail.com; 04-12-2011 at 07:02 AM. Reason: fixed spelling

  4. #4
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    7

    Default

    Quote Originally Posted by gary2411 View Post
    WCF services

    This layer is the top most and will contain the endpoints for my services. Each service method will invoke a method in the Business services layer just below.

    Business services

    This layer contains all (ok, there not much to it yet, but it will be there later…trust me) business logic. A method within this layer also serves as a transaction demarcation. What I called “business transaction” in my previous post. So this is where the transaction handled by ObjectScope will get started and commited or rolled back. A business service method might invoke several repository methods in the Data access layer just below.

    Data access

    This layer contains all access to persistent objects. This is where LINQ queries will be executed and other CRUD like methods. So this is methods that uses and manipulates the persistence model.
    Did you post in the right thread?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •