Package org.apache.openjpa.persistence.kernel.common.apps

Examples of org.apache.openjpa.persistence.kernel.common.apps.TransactionalClassPC


    public TestEJBTransactionalClass(String name) {
        super(name, "kernelcactusapp");
    }

    public void testTransactional() {
        TransactionalClassPC pc = new TransactionalClassPC();
        pc.setIntField(1);

        EntityManager pm = currentEntityManager();
        startTx(pm);
        //pm.makeTransactional (pc);
        pc.setIntField(2);
        endTx(pm);

        assertEquals(2, pc.getIntField());

        startTx(pm);
        pc.setIntField(3);
        pm.getTransaction().rollback();

        assertEquals(3, pc.getIntField());
        endEm(pm);
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.kernel.common.apps.TransactionalClassPC

Copyright © 2018 www.massapicom. 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.