/** * {@inheritDoc} */ public void performPendingOperations() { clearPendingOperations(); }
/** * {@inheritDoc} */ public void commitUnitOfWork() { if (!unitOfWork.isActive()) { throw new ApplicationSessionException( "Cannot commit a unit of work that has not begun."); } try { Map<IEntity, IEntity> alreadyMerged = new HashMap<IEntity, IEntity>(); for (IEntity entityToMergeBack : entitiesToMergeBack) { merge(entityToMergeBack, MergeMode.MERGE_CLEAN_LAZY, alreadyMerged); } } finally { unitOfWork.commit(); entitiesToMergeBack = null; clearPendingOperations(); } }