Package javax.jdo

Examples of javax.jdo.Transaction.rollback()


        tx.commit();
      }catch(Exception e){
        log.log(Level.INFO,
            "[StatisticsManager#retrieveSummary()] exception " +
            "during getting summary", e);
        if(tx!=null && tx.isActive()) tx.rollback();
        summary = null;
      }
    }finally{
      if(pm!=null){
        pm.close();
View Full Code Here


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

    /* test deletePersistent (Object pc) */
    private void runTestDeletePersistent(PersistenceManager pm) {
View Full Code Here

                     "pm.deletePersistent(Object) with pc instance managed by another pm should throw exception");
            }
            catch (JDOUserException ex) {
                // expected exception
            }
            tx.rollback();
        }
        finally {
            if (tx.isActive())
                tx.rollback();
        }
View Full Code Here

            }
            tx.rollback();
        }
        finally {
            if (tx.isActive())
                tx.rollback();
        }
    }
   
    /* test deletePersistentAll (Collection pcs) */
    private void runTestDeletePersistentAll1(PersistenceManager pm) {
View Full Code Here

                     "pm.deletePersistent(Collection) with pc instance(s) managed by another pm should throw exception");
            }
            catch (JDOUserException ex) {
                // expected exception
            }
            tx.rollback();
        }
        finally {
            if (tx.isActive())
                tx.rollback();
        }
View Full Code Here

            }
            tx.rollback();
        }
        finally {
            if (tx.isActive())
                tx.rollback();
        }
    }

    /* test deletePersistentAll (Object[] o) */
    private void runTestDeletePersistentAll2(PersistenceManager pm) {
View Full Code Here

                     "pm.deletePersistent(Object[]) with pc instance(s) managed by another pm should throw exception");
            }
            catch (JDOUserException ex) {
                // expected exception
            }
            tx.rollback();
        }
        finally {
            if (tx.isActive())
                tx.rollback();
        }
View Full Code Here

            }
            tx.rollback();
        }
        finally {
            if (tx.isActive())
                tx.rollback();
        }
    }
}
View Full Code Here

                catchNumber++;
                complete();
            }
            finally {
                if ((tx != null) && tx.isActive()) {
                    tx.rollback();
                }
                pm.close();
            }
        }    // run
    // class PMThread
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;
    }

    /** */
    void checkTransitions()
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.