[Mono-list] Garbage-collecting a remoting singleton object in aservice?

"Andrés G. Aragoneses [ knocte ]" knocte at gmail.com
Mon Sep 4 04:17:52 EDT 2006


Carlos Ble escribió:
> Hi,
> 
> El vie, 01-09-2006 a las 14:53 +0100, Bradley, Peter escribió:
>> Just a query...
>>
>> Why do you need to use a singleton object?  We've always used SingleCall objects, and these die after each call.  I take it you're talking about a SAO, as the term "singleton" is usually used to refer to an SAO.  We've never found a justification for using a singleton object.
>>
> 
> And what happend when you want to have (in server side) a shared struct
> or shared hash hosted in memory for all calls?. For example to keep an
> array of client sessions at the server. Do you prefer a SingleCall
> object with static variables instead of singleton object?

Thanks for the intervention Carlos :)

Indeed, I was going to reply with a similar explanation. Perhaps Peter 
Bradley has never had the need to use a Singleton type object because 
all of his remoting methods are stateless, so in his case the 
implementation could be converted into webservices I guess.

In my case I need to save a state between calls. In fact, I need a 
similar scenario than the one explained by Carlos: some clients, when 
invoking the server methods, need to contact other client already 
connected and send them parameters.

I hope this has clarified your doubts ;)

Regards,

	Andrés	[ knocte ]

-- 



More information about the Mono-list mailing list