Examples of RollbackException


Examples of com.alu.e3.prov.deployment.RollbackException

      if (oldApiJar != null) {
        try {
          // Deploy N-1 jar
          deploymentManager.deployApi(exchange, oldApiJar.getData());
          // throw this status for error mgmt 
          throw new RollbackException(ApplicationCodeConstants.ROUTE_CREATION_FAILED_ROLLBACK_OK, "Route edition failed, rollback ok.");

        } catch (DeploymentException e1) {         
          throw new RollbackException(ApplicationCodeConstants.ROLLBACK_FAILED, "Second try deployment, give up", e1);
        }
      } else {
        // Nothing to roll-back
        throw new RollbackException(ApplicationCodeConstants.ROUTE_CREATION_FAILED_ROLLBACK_KO, "Route creation failed, and no rollback could be done.");
      }

    }

  }
View Full Code Here

Examples of com.atomikos.icatch.RollbackException

        else if ( prepareCalled ) {
            throw new HeurHazardException ( ret );
        } else {
            // prepare NOT called -> subordinate timed out
            // and must have rolled back
            throw new RollbackException ();
        }
        return ret;
    }
View Full Code Here

Examples of com.persistit.exception.RollbackException

                            // version is from concurrent txn that already
                            // committed
                            // or timed out waiting to see. Either
                            // way, must abort.
                            _transaction.rollback();
                            throw new RollbackException();
                        }
                    } catch (final InterruptedException ie) {
                        throw new PersistitInterruptedException(ie);
                    }
                } catch (final RetryException re) {
View Full Code Here

Examples of com.sleepycat.je.rep.RollbackException

     */
    public RollbackException setupHardRecovery(VLSNRange range)
        throws IOException {

        /* Creating the exception invalidates the environment. */
        RollbackException r = new RollbackException(repImpl,
                                                    range.getLastTxnEnd(),
                                                    matchpointVLSN,
                                                    searchResults);
        LoggerUtils.severe(logger, repImpl,
                           "Limited list of transactions truncated for " +
View Full Code Here

Examples of javax.persistence.RollbackException

      if (! isActiveTransaction())
        throw new IllegalStateException("commit() cannot be called when the entity transaction is not active.");

      // jpa/1525
      if (getRollbackOnly())
        throw new RollbackException("commit() cannot be called when the entity transaction is marked for rollback only.");

      try {
        // jpa/11a7
        AmberConnection.this.beforeCommit();
View Full Code Here

Examples of javax.persistence.RollbackException

    public void testCreate(final UserTO userTO) {
        SyncopeUser user = new SyncopeUser();
        userDataBinder.create(user, userTO);
        userDAO.save(user);

        throw new RollbackException();
    }
View Full Code Here

Examples of javax.persistence.RollbackException

    public void testUpdate(final UserMod userMod) throws NotFoundException, UnauthorizedRoleException {
        SyncopeUser user = getUserFromId(userMod.getId());
        userDataBinder.update(user, userMod);
        userDAO.save(user);

        throw new RollbackException();
    }
View Full Code Here

Examples of javax.persistence.RollbackException

    @Transactional(rollbackFor = {Throwable.class})
    public void testDelete(final Long userId) throws NotFoundException, UnauthorizedRoleException {
        SyncopeUser user = getUserFromId(userId);
        userDAO.delete(user);

        throw new RollbackException();
    }
View Full Code Here

Examples of javax.persistence.RollbackException

        }
        performCommit();
      }

    } catch (Exception e) {
      throw new RollbackException(e);
     
    } finally {
      // these will not throw an exception
      deactivate();
      notifyCommit();     
View Full Code Here

Examples of javax.persistence.RollbackException

    if ( tx == null || !tx.isActive() ) {
      throw new IllegalStateException( "Transaction not active" );
    }
    if ( rollbackOnly ) {
      tx.rollback();
      throw new RollbackException( "Transaction marked as rollbackOnly" );
    }
    try {
      tx.commit();
    }
    catch (Exception e) {
      Exception wrappedException;
      if (e instanceof HibernateException) {
        wrappedException = entityManager.convert( (HibernateException)e );
      }
      else {
        wrappedException = e;
      }
      try {
        //as per the spec we should rollback if commit fails
        tx.rollback();
      }
      catch (Exception re) {
        //swallow
      }
      throw new RollbackException( "Error while committing the transaction", wrappedException );
    }
    finally {
      rollbackOnly = false;
    }
    //if closed and we commit, the mode should have been adjusted already
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.