handle pessimistic locking exceptions