Re: C# ServicedComponent Singleton
From: Willy Denoyette [MVP] (willy.denoyette_at_pandora.be)
Date: 12/08/04
- Next message: Bradley1234: "Doing I/O to the Printer port and legacy IO space in C# ?"
- Previous message: Lowell Heddings: "Re: Registration Confirmation Page"
- In reply to: David Browne: "Re: C# ServicedComponent Singleton"
- Next in thread: David Browne: "Re: C# ServicedComponent Singleton"
- Reply: David Browne: "Re: C# ServicedComponent Singleton"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 8 Dec 2004 21:07:27 +0100
"David Browne" <davidbaxterbrowne no potted meat@hotmail.com> wrote in
message news:uLDIgaV3EHA.3908@TK2MSFTNGP12.phx.gbl...
>
> "David" <nospam@sympatico.ca> wrote in message
> news:Ox6G6JV3EHA.3452@TK2MSFTNGP14.phx.gbl...
>> What do you mean by serialized singleton?
>
> If you have two different threads, or two different processes trying to
> access the object, they will be serialized. One will wait until the other
> has released the reference to the object. Not just the method calls will
> be serialized, but whole sequence of client code using the object
>
> obj = CreateObject(...)
> obj.MethodA
> obj.MethodB
> set obj = null
>
> will be strictly serialized. A second thread or process will block on
> CreateObject until the previous thread has released the reference with set
> obj=null.
This is not exactly true, that's the purpose of the JITA mechanism and
ContextUtil.SetComplete (or [AutoComplete(true)]), as soon as a method ends
the object returns to the pool where it waits to be re-activated.
Any number of clients (subject to scalability) can CREATE and KEEP a
reference a COM+ singleton object.
Each client creation call will get a reference to the same instance provided
no single client is currently executing a method, when that's the case the
activation request will be suspended for a max. of the configured
"activation time-out".
Method calls are automatically synchronized (implied by JITA), each method
call will be suspended (activation time-out) whenever another client is
executing a method.
Willy.
- Next message: Bradley1234: "Doing I/O to the Printer port and legacy IO space in C# ?"
- Previous message: Lowell Heddings: "Re: Registration Confirmation Page"
- In reply to: David Browne: "Re: C# ServicedComponent Singleton"
- Next in thread: David Browne: "Re: C# ServicedComponent Singleton"
- Reply: David Browne: "Re: C# ServicedComponent Singleton"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|