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

Examples of org.apache.openjpa.persistence.event.common.apps.RuntimeTest1


        timeToAMD.start();

        // create objects
        RuntimeTest1[] persistables = new RuntimeTest1[numObjects];
        for (int i = 0; i < persistables.length; i++) {
            persistables[i] = new RuntimeTest1("foo #" + i, i);
        }

        // add them
        for (int i = 0; i < persistables.length; i++) {
            startTx(pm);
View Full Code Here


        timeToAMD.start();

        // create objects
        RuntimeTest1[] persistables = new RuntimeTest1[numObjects];
        for (int i = 0; i < persistables.length; i++) {
            persistables[i] = new RuntimeTest1("foo #" + i, i);
        }

        // add them, a commit per object
        for (int i = 0; i < persistables.length; i++) {
            startTx(pm);
View Full Code Here

        // deletes, and udpates

        // create objects
        RuntimeTest1[] persistables = new RuntimeTest1[numObjects];
        for (int i = 0; i < persistables.length; i++) {
            persistables[i] = new RuntimeTest1("foo #" + i, i);
        }

        // add them
        for (int i = 0; i < persistables.length; i++) {
            startTx(pm);
View Full Code Here

        timeToAMD.start();

        // create objects
        RuntimeTest1[] persistables = new RuntimeTest1[numObjects];
        for (int i = 0; i < persistables.length; i++) {
            persistables[i] = new RuntimeTest1("foo #" + i, i);
        }

        // add them
        for (int i = 0; i < persistables.length; i++) {
            startTx(pm);
View Full Code Here

        OpenJPAEntityManager pm = (OpenJPAEntityManager) factory
            .createEntityManager();

        // get an object id
        RuntimeTest1 t1 = new RuntimeTest1("foo", 5);
        startTx(pm);
        pm.persist(t1);
        Object oid = pm.getObjectId(t1);
        rollbackTx(pm);
View Full Code Here

            pm = (OpenJPAEntityManager) factory.createEntityManager();
            provider = currentProvider;
        }

        // get an object id
        RuntimeTest1 t1 = new RuntimeTest1("foo", 5);
        startTx(pm);
        pm.persist(t1);
        Object oid = pm.getObjectId(t1);
        endTx(pm);
View Full Code Here

        timeToAMD.start();

        // create objects
        RuntimeTest1[] persistables = new RuntimeTest1[numObjects];
        for (int i = 0; i < persistables.length; i++) {
            persistables[i] = new RuntimeTest1("foo #" + i, i);
        }

        // add them
        // This will generate a larger number of transaction in a very
        // short amount of time (old socket-per-transaction would
View Full Code Here

    }

    public void setUp() {
        deleteAll(RuntimeTest1.class);

        RuntimeTest1 pc = new RuntimeTest1();
        pc.setIntField(1);
        RuntimeTest1 pc2 = new RuntimeTest1();
        pc2.setIntField(2);
        pc.setSelfOneOne(pc2);

        OpenJPAEntityManager pm =
            (OpenJPAEntityManager) currentEntityManager();
        startTx(pm);
View Full Code Here

        BufferedLogFactory logFactory = (BufferedLogFactory)
            ((OpenJPAEntityManagerSPI) pm).getConfiguration().getLogFactory();
        logFactory.clear();

        RuntimeTest1 pc = (RuntimeTest1) pm.find(RuntimeTest1.class, _oid);
        logFactory.assertNoLogMessage("*orphan*");
        assertNull(pc.getSelfOneOne());
        logFactory.assertLogMessage("*orphan*");
        endEm(pm);
        pmf.close();
    }
View Full Code Here

        BufferedLogFactory logFactory = (BufferedLogFactory)
            ((OpenJPAEntityManagerSPI) pm).getConfiguration().getLogFactory();
        logFactory.clear();

        RuntimeTest1 pc = (RuntimeTest1) pm.find(RuntimeTest1.class, _oid);
        try {
            pc.getSelfOneOne();
            fail("Did not throw expected exception for orphaned key.");
        } catch (EntityNotFoundException onfe) {
            logFactory.assertNoLogMessage("*orphan*");
        } catch (OpenJPAException ke) {
            bug(1138, ke, "Wrong exception type.");
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.event.common.apps.RuntimeTest1

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.