Examples of rollbackToSavePoint()


Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

        pc.setStringField("s1");
        pm.setSavepoint("s1");
        pc.setStringField("s2");
        pm.setSavepoint("s2");
        pc.setStringField("diff");
        pm.rollbackToSavepoint();
        assertEquals("s2", pc.getStringField());
        pm.releaseSavepoint();
        try {
            pm.rollbackToSavepoint("s1");
            fail("Exhausted.");
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

        pc.setStringField("diff");
        pm.rollbackToSavepoint();
        assertEquals("s2", pc.getStringField());
        pm.releaseSavepoint();
        try {
            pm.rollbackToSavepoint("s1");
            fail("Exhausted.");
        } catch (Exception e) {
        }
        rollbackTx(pm);
        endEm(pm);
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

        for (int i = 0; i < after; i++) {
            pm.persist(new ModRuntimeTest1());
            pm.setSavepoint("after" + i);
        }

        pm.rollbackToSavepoint("test");
        assertEquals("orig", pc.getStringField());
        assertFalse(pm.isPersistent(pc));
        assertEquals(before, pm.getTransactionalObjects().size());
        endTx(pm);
        endEm(pm);
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

        for (int i = 0; i < after; i++) {
            pc.setSelfOneOne(new ModRuntimeTest1());
            pm.setSavepoint("after" + i);
        }

        pm.rollbackToSavepoint("test");
        assertEquals("orig", pc.getStringField());
        assertFalse(pm.isPersistent(pc2));
        if (before > 0)
            assertEquals("before" + (before - 1),
                pc.getSelfOneOne().getStringField());
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

        for (int i = 0; i < after; i++) {
            pc.setSelfOneOne(new ModRuntimeTest1());
            pm.setSavepoint("after" + i);
        }

        pm.rollbackToSavepoint("test");
        assertEquals("orig", pc.getStringField());
        if (before > 0)
            assertEquals("before" + (before - 1),
                pc.getSelfOneOne().getStringField());
        else
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

        for (int i = 0; i < after; i++) {
            newElement(pc, "after" + i, (i + 1) * -10);
            pm.setSavepoint("after" + i);
        }

        pm.rollbackToSavepoint("test");

        assertEquals("orig", pc.getStringField());
        assertFalse(pm.isRemoved(pc2));
        for (Iterator it = pc.getSelfOneMany().iterator(); it.hasNext();) {
            temp = (ModRuntimeTest1) it.next();
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

            //FIXME jthomas - setDateField
            //pc.setDateField(randomDate());
            pm.setSavepoint("after" + i);
        }

        pm.rollbackToSavepoint("test");
        assertEquals("value", pc.getStringField());
        assertEquals(333, pc.getIntField());
        //FIXME jthomas - setDateField
        //assertEquals(date, pc.getDateField());
        endTx(pm);
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

        pc = pm.find(ModRuntimeTest1.class, oid);
        assertTrue(pm.isTransactional(pc));
        pc.setStringField("test");
        pm.setSavepoint("s2");
        pc.setStringField("bar");
        pm.rollbackToSavepoint("s2");
        assertTrue(pm.isTransactional(pc));

        rollbackTx(pm);
        endEm(pm);
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

        pc.setStringField("s1");
        pm.setSavepoint("s1");
        pc.setStringField("s2");
        pm.setSavepoint("s2");
        pc.setStringField("diff");
        pm.rollbackToSavepoint();
        assertEquals("s2", pc.getStringField());
        pm.releaseSavepoint();
        try {
            pm.rollbackToSavepoint("s1");
            fail("Exhausted.");
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.rollbackToSavepoint()

        pc.setStringField("diff");
        pm.rollbackToSavepoint();
        assertEquals("s2", pc.getStringField());
        pm.releaseSavepoint();
        try {
            pm.rollbackToSavepoint("s1");
            fail("Exhausted.");
        } catch (Exception e) {
        }
        rollbackTx(pm);
        endEm(pm);
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.