locking in ObjectRepo