Examples of wasRolledBack()


Examples of org.hibernate.Transaction.wasRolledBack()

  }
 
  public static void commitTransaction() {
    Transaction tx = threadTransaction.get();
    try {
      if ( tx != null && !tx.wasCommitted() && !tx.wasRolledBack() )
        tx.commit();
      threadTransaction.set(null);
    } catch (HibernateException e) {
      logger.error("Exception " + e.getMessage(), e);
     
View Full Code Here

Examples of org.hibernate.Transaction.wasRolledBack()

 
  public static void rollbackTransaction() {
    Transaction tx = (Transaction) threadTransaction.get();
    try {
      threadTransaction.set(null);
      if ( tx != null && !tx.wasCommitted() && !tx.wasRolledBack() ) {
        tx.rollback();
      }
    } catch (HibernateException e) {
      logger.error("Exception " + e.getMessage(), e);
      throw new PersistException(e);
View Full Code Here

Examples of org.hibernate.Transaction.wasRolledBack()

   
    public static void commit() throws HibernateException {
        Transaction t = TRANSACTION.get();
        TRANSACTION.set(null);
        try {
            if (t != null && !t.wasCommitted() && !t.wasRolledBack()) {
                t.commit();
            }
        } catch (HibernateException e) {
            t.rollback();
            throw e;
View Full Code Here

Examples of org.hibernate.Transaction.wasRolledBack()

   
    public static void rollback() throws HibernateException {
        Transaction t = TRANSACTION.get();
        TRANSACTION.set(null);
       
        if (t != null && !t.wasCommitted() && !t.wasRolledBack()) {
            t.rollback();
        }
    }

    @SuppressWarnings("unchecked")
View Full Code Here

Examples of org.springframework.data.transaction.ChainedTransactionManagerTests.TestPlatformTransactionManager.wasRolledBack()

    public boolean matchesSafely(PlatformTransactionManager platformTransactionManager) {
      TestPlatformTransactionManager ptm = (TestPlatformTransactionManager) platformTransactionManager;
      if (commitCheck) {
        return ptm.isCommitted();
      } else {
        return ptm.wasRolledBack();
      }

    }

    public void describeTo(Description description) {
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.