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

Bradley, Peter pbradley at uwic.ac.uk
Fri Sep 1 09:53:52 EDT 2006

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.


-----Original Message-----
From: mono-list-bounces at lists.ximian.com [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of "Andrés G. Aragoneses [ knocte ]"
Sent: 01 September 2006 14:36
To: Mono-list at lists.ximian.com
Subject: [Mono-list] Garbage-collecting a remoting singleton object in aservice?

I am interested in implementing a service (windows service in windows, 
and using mono-service on linux, I suppose) that hosts a singleton 
remoting object. As I have read on some docs, no leasing management is 
needed if no SAO/CAO hosting method is used (returning null in 
InitializeLifeTimeService method, as I will use a Singleton instance) 
but, how can I garbage-collect manually this server object on the 
OnStop() method of the service (so as to create a new instance again on 
the OnStart method)?

I have seen that the ILease.CurrentState property is read-only so I 
cannot manually set the Lease as Expired from an external (but not 
remote) object, am I right?

Thanks in advance,

	Andrés	[ knocte ]

P.S.: Is anyone in the list using the GenuineChannels library in Mono? 
Does it work? Is there any other stable alternatives? I think I read a 
message from Rafael Teixera where I understood he was using a similar 
solution but had scalability problems...? BTW, will Indigo support this 
kind of channels? Will it be implemented in Mono?


Mono-list maillist  -  Mono-list at lists.ximian.com

More information about the Mono-list mailing list