Tuesday, July 12, 2005

Important points regarding Sponsors in .NET remoting

  • The lease manager calls ISponsor's single method, Renewal, when the lease expires, asking for new lease time. Because the sponsor is called across an AppDomain boundary, the sponsor must be a remotable object, i.e. extend from MarshalByRef object.
  • We need to override the InitializeLifetimeService() method to return null, so that the sponsor object itself has infinite lease.
  • Also the client needs to register a channel so that the server can make the lease renewal calls.

No comments:

Post a Comment