I'm not familiar with ILease, but can you set LifetimeServices.LeaseTime
to a very large value?  That affects all newly-created leases within the
appdomain.
 
Alternatively, take a look at the ISponsor interface - it looks like you
could create a per-appdomain sponsor which extended all leases all of
the time.
 
Barry
This posting is provided "AS IS" with no warranties, and confers no
rights.
 
________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ricardo Mendes
Sent: Thursday, September 11, 2003 3:37 AM
To: dotnet-sscli
Cc: [EMAIL PROTECTED]
Subject: [Dotnet-sscli] Turning off leases (Again...)


Hello,
 
I am sorry for asking this again, but how can I turn off the lease
mechanism in Rotor in a transparent way, ie, without having to force the
programmer to override functions or create config files? The solution
posted before forced the programmer to write a config file, and I don't
want that.
 
If I change the following functions
 
internal static ILease GetLeaseInitial(MarshalByRefObject obj)
internal static ILease GetLease(MarshalByRefObject obj)
internal static ILease CreateLease(MarshalByRefObject obj)
internal static ILease CreateLease(TimeSpan leaseTime, TimeSpan
renewOnCallTime, TimeSpan sponsorshipTimeout, MarshalByRefObject obj)
 
in lifetimeservices.cs to have them return null, what will happen? I
believe that the leasemanager will still exist but will never have any
leases to manage. Any object being used remotly will not have a lease
and may be collected if not protected in any other way. If this is what
happens then returning null is the answer to my question... can anyone
confirm this?
 
Thanks in advance for any help,
 
Ricardo Mendes
Distributed Systems Group
INESC-ID Lisbon, Portugal  

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to