#10 if something goes wrong, while locking, do not switch to edit mode
#10 throw proper exception in CidsBroker.lockEntity()
#10 use the proper unlock methods in CidsBroker