Package javax.jdo

Examples of javax.jdo.Transaction.rollback()


            tx.commit();
            tx = null;
        }
        finally {
            if ((tx != null) && tx.isActive())
                tx.rollback();
        }
    }

    /**
     * @see JDO_Test#localSetUp()
View Full Code Here


                else {
                    Transaction tx = pm.currentTransaction();
                    if (tx.isActive()) {
                        if (debug)
                            logger.debug("Found active transaction; rolling back.");
                        tx.rollback();
                    }
                    else {
                        fail(ASSERTION_FAILED,
                             "Unexpectedly, this transaction is not active: " + tx);
                    }
View Full Code Here

           tx3.commit();
           tx3 = null;
        }
        finally {
            if ((tx3 != null) && tx3.isActive())
                tx3.rollback();
            if ((tx2 != null) && tx2.isActive())
                tx2.rollback();
            if ((tx1 != null) && tx1.isActive())
                tx1.rollback();
        }
View Full Code Here

        Transaction t = pm.currentTransaction();
        t.begin();
        Extent e = pm.getExtent(StateTransitionObj.class, false);
        Iterator iter = e.iterator();
        ret = iter.hasNext();
        t.rollback();
        return ret;
    }

    /** */
    public void prepareTransactionAndJDOSettings(Transaction transaction) {
View Full Code Here

      getPM().flush();

      tx.commit();
    } finally {
      if (tx.isActive()) {
        tx.rollback();
        return false;
      }
    }
    return true;
  }
View Full Code Here

      getPM().flush();
      trans.commit();

    } finally {
      if (trans.isActive()) {
        trans.rollback();
        return false;
      }
    }
    return true;
  }
View Full Code Here

      getPM().flush();

      tx.commit();
    } finally {
      if (tx.isActive()) {
        tx.rollback();
        return false;
      }
    }
    return true;
  }
View Full Code Here

      tx.commit();
    } catch (Exception e) {
      log.error("insertar " + e.getMessage());
    } finally {
      if (tx.isActive()) {
        tx.rollback();
      }
      if (!pm.isClosed()) {
        pm.close();
      }
    }
View Full Code Here

        tx.commit();
      } catch (Exception e) {
        log.error("insertar " + e.getMessage());
      } finally {
        if (tx.isActive()) {
              tx.rollback();
          }
        if (!pm.isClosed()) {
                pm.close();
            }
View Full Code Here

     
    } catch (Exception e) {
      log.error(e.getMessage());
    } finally {
      if (tx.isActive()) {
        tx.rollback();
      }
      if (!pm.isClosed()) {
        pm.close();
      }
    }
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.