Added acquireLock function in Middleware to handle lock verification.
Added commit and abort in RM to register or discard changes.
Added a case to handle object deletion from RM.