Examples of rollback()


Examples of org.apache.ibatis.session.SqlSession.rollback()

            for (String statement : statements) {
                session.update(statement.trim(), data);
            }
            session.commit();
        } catch (Exception e) {
            session.rollback();
            throw e;
        } finally {
            session.close();
        }
    }
View Full Code Here

Examples of org.apache.ibatis.transaction.Transaction.rollback()

    TransactionFactory tf = new ManagedTransactionFactory();
    tf.setProperties(new Properties());
    Transaction tx = tf.newTransaction(conn, false);
    assertEquals(conn, tx.getConnection());
    tx.commit();
    tx.rollback();
    tx.close();
    mockery.assertIsSatisfied();
  }

View Full Code Here

Examples of org.apache.jackrabbit.core.UserTransactionImpl.rollback()

                        " version is still referenced.");
            } catch (ReferentialIntegrityException e) {
                // expected
            }
        } finally {
            tx.rollback();
        }
    }
}
View Full Code Here

Examples of org.apache.jackrabbit.data.core.TransactionContext.rollback()

        TransactionContext tx = txGlobal.get(xid);
        if (tx == null) {
            throw new XAException(XAException.XAER_NOTA);
        }
        try {
          tx.rollback();
        } finally {
          txGlobal.remove(xid);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.ocm.transaction.jackrabbit.UserTransactionImpl.rollback()

      utx = new UserTransactionImpl(session);
      utx.begin();
      Node test = (Node) session.getItem("/test");
      test.remove();
      session.save();
      utx.rollback();
     
      assertTrue("test node doesn't exist", session.itemExists("/test"));     

      utx = new UserTransactionImpl(session);
      utx.begin();
View Full Code Here

Examples of org.apache.jetspeed.components.persistence.store.Transaction.rollback()

            pr.setProfilingRule(rule);
            persistentStore.lockForWrite(pr);
        }
        catch (LockFailedException e)
        {
            tx.rollback();
            e.printStackTrace();
            // TODO: throw appropriate exception
        }
        persistentStore.getTransaction().commit();
        principalRules.put(makePrincipalRuleKey(principal.getName(), locatorName), pr);
View Full Code Here

Examples of org.apache.juddi.datastore.DataStore.rollback()

      assertions.setPublisherAssertionVector(savedAssertionsVector);
      return assertions;
    }
    catch(InvalidKeyPassedException ivkex)
    {
      try { dataStore.rollback(); } catch(Exception e) { }
      log.error(ivkex);
      throw (RegistryException)ivkex;
    }
    catch(RegistryException regex)
    {
View Full Code Here

Examples of org.apache.juddi.util.jdbc.Transaction.rollback()

        // commit the transaction
        txn.commit();
      }
      catch(Exception ex)
      {
        try { txn.rollback(); }
        catch(java.sql.SQLException sqlex) { sqlex.printStackTrace(); }
        throw ex;
      }
    }
  }
View Full Code Here

Examples of org.apache.lenya.cms.repository.Node.rollback()

        int revision = getParameterAsInteger("rollbackRevision", -1);

        Document document = getSourceDocument();
        Node node = document.getRepositoryNode();
        node.rollback(revision);
       
        WorkflowUtil.invoke(this.manager, getSession(), getLogger(), getSourceDocument(),
                getEvent());
    }
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.rollback()

  public void testRollback() throws Exception {
    // Verifies that if callback is called, DTW is closed.
    Directory dir = newDirectory();
    DirectoryTaxonomyWriter dtw = new DirectoryTaxonomyWriter(dir);
    dtw.addCategory(new CategoryPath("a"));
    dtw.rollback();
    try {
      dtw.addCategory(new CategoryPath("a"));
      fail("should not have succeeded to add a category following rollback.");
    } catch (AlreadyClosedException e) {
      // expected
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.