1. A method in a data processing system having a client and a server, comprising the steps of: requesting a lease by the client from the server to use a resource managed by the server, the lease request containing a first recovery routine; granting the lease by the server so that the client can utilize the resource for a period of time and sending a second recovery routine to the client; utilizing the resource by the client; determining by the client when the period of time is near expiration; sending a request to the server to renew the lease when the client determines that the lease is near expiration; determining whether the renew request is successful; invoking the second recovery routine by the client to perform failure recovery for the server when the client determines that the renew request is unsuccessful; determining by the server when the lease has expired; invoking the first recovery routine by the server when the lease has expired to perform failure recovery for the client.