Package org.exolab.castor.jdo

Examples of org.exolab.castor.jdo.Database.rollback()


                            + address.getStreet()
                            + ", expected: " + expectedStreet);
                    valid = false;
                }
            }
            db.rollback();
            db.close();
        } catch (Exception e) {
            if (db != null) {
                try {
                    db.close();
View Full Code Here


        Container container;
        try {
            container = (Container) db.load(Container.class, "200");
            db.commit();
        } catch (Exception ex) {
            db.rollback();
            throw ex;
        } finally {
            db.close();
        }
        return container;
View Full Code Here

        Derived derived;
        try {
            derived = (Derived) db.load(Derived.class, "100");
            db.commit();
        } catch (Exception ex) {
            db.rollback();
            throw ex;
        } finally {
            db.close();
        }
        return derived;
View Full Code Here

        try {
            container = (Container) db.load(Container.class, "200");
            db.load(Derived.class, "100");
            db.commit();
        } catch (Exception ex) {
            db.rollback();
            throw ex;
        } finally {
            db.close();
        }
        return container;
View Full Code Here

        assertEquals(6, folder.getId().intValue());
        assertEquals("Test Update", folder.getName());
        assertNotNull(folder.getParent());
        assertNotNull(folder.getChildren());
        assertEquals(1, folder.getChildren().size());
        db.rollback();
       
        db.close();
    }
}
View Full Code Here

        assertEquals(6, folder.getId().intValue());
        assertEquals("Test Update", folder.getName());
        assertNotNull(folder.getParent());
        assertNotNull(folder.getChildren());
        assertEquals(1, folder.getChildren().size());
        db.rollback();
       
        db.close();
    }
}
View Full Code Here

        assertNotNull(entity);

        db.commit();

        if (db != null) {
            if (db.isActive()) { db.rollback(); }

            db.close();
            db = null;
        }
    }
View Full Code Here

        while (qrs.hasMore()) {
            assertTrue(qrs.next() instanceof Subscription);
        }
        qrs.close();
       
        db.rollback();
    }
}
View Full Code Here

                assertNotNull(obj);
                assertNotNull(obj.getDependent());
                db.close();

            } catch (ClassCastException e) {
                db.rollback();
                db.close();
                fail();
            }
        } catch (PersistenceException e) {
            e.printStackTrace();
View Full Code Here

                db.commit();
                db.close();

            } catch (ClassCastException e) {
                e.printStackTrace();
                db.rollback();
                db.close();
                fail();
            }
        } catch (PersistenceException e) {
            e.printStackTrace();
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.