[Mono-list] remoting lease timeout issues

brendan powers brendan0powers at gmail.com
Fri Jul 22 12:04:45 EDT 2005


Hello,
I am having touble with lease timeout with remoting objects.
The exception i get is 

Unhandled Exception: System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. --->
System.Runtime.Remoting.RemotingException: Requested service not
found. No receiver for uri
ebf2e96a_79ae_4ba4_af0b_6f8d6dc27b3f/990464496_3.rem

However, when i atach a sponsor object, the sponsor object is not alwasy called
Here is my sponsor object

//GENERIC SPONSOR
public class GenericSponsor : MarshalByRefObject,ISponsor
{
	public TimeSpan Renewal(ILease lease)
	{
		Console.WriteLine("Sponsor: lease is {0}",lease.CurrentState);
		Console.WriteLine("Renewing Lease");
		return(TimeSpan.FromDays(10));
	}
}

and here is the code i use to atach it to an object
ISponsor sponsor = new GenericSponsor();
ILease lease = (ILease)RemotingServices.GetLifetimeService(hwmp);
lease.Register(sponsor);

I have several object this sponsor is atached to, sometimes i get the
"Renewing Lease" message for all the objects, and sometimes i don't. I
always get at least 1


Also, some object that i use have actually been registered as
services, some have not. For example object a has been registered to
url tcp://somhost/object, however object a is just used to access
object b, with is not directly register. So object b is accesed via
object a (object b = a.getobjectb). Don't know if this matters.

Any ideas?


More information about the Mono-list mailing list