1) fixed hibernate session flush. 2) fixed commit failure to rollback error that resulted in a deadlock