At the page where the lock is requested... releaseAgedLocks(300); // Try to get the lock on a record $gotLock = $lockingMngr->getLock( // The record to lock. This can be any Doctrine_Record $myRecordToLock, // The unique identifier of the user who is trying to get the lock 'Bart Simpson' ); if($gotLock) { echo "Got lock!"; // ... proceed } else { echo "Sorry, someone else is currently working on this record"; } } catch(Doctrine_Locking_Exception $dle) { echo $dle->getMessage(); // handle the error } ?> At the page where the transaction finishes... releaseLock($myRecordToUnlock, 'Bart Simpson')) { echo "Lock released"; } else { echo "Record was not locked. No locks released."; } } catch(Doctrine_Locking_Exception $dle) { echo $dle->getMessage(); // handle the error } ?>