Package org.conserve.connection

Examples of org.conserve.connection.ConnectionWrapper.commitAndDiscard()


    else
    {
      System.out.println("No result.");
    }
    stmt.close();
    cw.commitAndDiscard();
    persist.close();
  }

}
View Full Code Here


    ConnectionWrapper cw = connectionPool.getConnectionWrapper();
    int res = 0;
    try
    {
      res = deleteObjects(cw, clazz, where);
      cw.commitAndDiscard();
    }
    catch (Exception e)
    {
      cw.rollbackAndDiscard();
      throw new SQLException(e);
View Full Code Here

  {
    ConnectionWrapper cw = getConnectionWrapper();
    try
    {
      saveObject(cw, object, true, null);
      cw.commitAndDiscard();
    }
    catch (Exception e)
    {
      // cancel the operation
      cw.rollbackAndDiscard();
View Full Code Here

    List<T> res = null;
    ConnectionWrapper cw = getConnectionWrapper();
    try
    {
      res = getObjects(cw, clazz, clause);
      cw.commitAndDiscard();
    }
    catch (Exception e)
    {
      cw.rollbackAndDiscard();
      throw new SQLException(e);
View Full Code Here

          LOGGER.log(Level.WARNING, "ClassNotFoundException: ", e);
        }

      }
      ps.close();
      cw.commitAndDiscard();
    }
    catch (Exception e)
    {
      cw.rollbackAndDiscard();
      throw new SQLException(e);
View Full Code Here

        cw = getConnectionWrapper();
        PreparedStatement ps = cw.prepareStatement(adapter
            .getShutdownCommand());
        ps.execute();
        ps.close();
        cw.commitAndDiscard();
      }
      catch (Exception e)
      {
        LOGGER.log(Level.WARNING, "Exception: ", e);
        try
View Full Code Here

    T res = null;
    ConnectionWrapper cw = getConnectionWrapper();
    try
    {
      res = refresh(cw, obj);
      cw.commitAndDiscard();
    }
    catch (IllegalArgumentException iae)
    {
      // rethrow
      throw iae;
View Full Code Here

  {
    ConnectionWrapper cw = getConnectionWrapper();
    try
    {
      dropTable(cw, c);
      cw.commitAndDiscard();
    }
    catch (Exception e)
    {
      // cancel the operation
      cw.rollbackAndDiscard();
View Full Code Here

  {
    ConnectionWrapper cw = getConnectionWrapper();
    try
    {
      persist.getTableManager().updateTableForClass(klass, cw);
      cw.commitAndDiscard();
    }
    catch (Exception e)
    {
      // cancel the operation
      cw.rollbackAndDiscard();
View Full Code Here

  {
    ConnectionWrapper cw = getConnectionWrapper();
    try
    {
      persist.getTableManager().setTableName(oldClass, newClass, cw);
      cw.commitAndDiscard();
    }
    catch (Exception e)
    {
      // cancel the operation
      cw.rollbackAndDiscard();
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.