/** * {@inheritDoc} */ @Override public void doBeginUnitOfWork() { // This is to avoid having entities attached to 2 open sessions // and to periodically clear the noTxSession cache. if (noTxSession != null) { noTxSession.clear(); } super.doBeginUnitOfWork(); }
/** * {@inheritDoc} */ @Override public final void beginUnitOfWork() { if (isUnitOfWorkSuspended()) { return; } if (isUnitOfWorkActive()) { throw new BackendException("Cannot begin a new unit of work. Another one is already active."); } doBeginUnitOfWork(); }