Added a catch for StaleObjectStateException wherever there is a catch for HibernateOptimisticLockingFailureException.