Results 1 to 3 of 3

Thread: Object lifetime

  1. #1
    Join Date
    Jan 2008

    Default Object lifetime

    I was wondering how you can control the object lifetime using Dependency Injection. I found that I can create objects as singletons or prototype (creating a new instance each time), however how do I handle situations where I would like to define a scope for a singleton object, and when it is out of scope a new object is created...

    Can someone point me to the right direction regarding object lifetime using

  2. #2
    Join Date
    Jun 2007



    In general I would like to have something like "session" and "request" copes in contexts other than web app context. I have a need to have complete context object hierarchy (where some objects are possibly singletons) instantiated in WCF per call mode.

    Is this doable at all? Where I need to look to create such context?

  3. #3
    Join Date
    Jul 2010


    Unfortunately, this isn't do-able at all (and object lifecycle isn't a pluggable behavior in SPRNET so you cannot 'define your own').

    -Steve B.

Posting Permissions

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