Package org.jboss.cache.transaction

Examples of org.jboss.cache.transaction.DummyTransactionManager.commit()


        assertEquals(1, entry.getModifications().size());
        assertTrue(!cache.exists("/one/two"));
        assertEquals(null, dummy.getCalled());


        mgr.commit();

        destroyCache(cache);
    }

    public void testTransactionValidateFailureMethod() throws Exception
View Full Code Here


        {
            assertTrue(true);
        }


        mgr.commit();

        destroyCache(cache);
    }

    public void testTransactionValidateCommitMethod() throws Exception
View Full Code Here

        assertTrue(cache.exists(node.getFqn()));
        assertEquals(new DefaultDataVersion(1), node.getVersion());

        assertEquals(pojo, node.get("key1"));

        mgr.commit();

        destroyCache(cache);
    }

View Full Code Here

        assertTrue(cache.exists(node.getFqn()));
        assertEquals(new DefaultDataVersion(1), node.getVersion());

        assertEquals(pojo, node.get("key1"));

        mgr.commit();

        destroyCache(cache);
    }

    public void testTransactionValidateRollbackMethod() throws Exception
View Full Code Here

        assertNull(workspace.getNode(Fqn.fromString("/one/two")));
        assertNull(workspace.getNode(Fqn.fromString("/one")));
        assertTrue(entry.getLocks().isEmpty());
        assertEquals(1, entry.getModifications().size());

        mgr.commit();

        destroyCache(cache);
    }

}
View Full Code Here

        OptimisticTransactionEntry entry2 = (OptimisticTransactionEntry) table.get(gtx2);

        TransactionWorkspace workspace2 = entry2.getTransactionWorkSpace();

        //commit both tx
        mgr.commit();
        mgr.resume(tx);
        mgr.commit();

        //assert that our keys are in one space
        assertEquals(3, workspace.getNodes().size());
View Full Code Here

        TransactionWorkspace workspace2 = entry2.getTransactionWorkSpace();

        //commit both tx
        mgr.commit();
        mgr.resume(tx);
        mgr.commit();

        //assert that our keys are in one space
        assertEquals(3, workspace.getNodes().size());
        assertNotNull(workspace.getNode(Fqn.fromString("/one/two")));
        assertEquals(pojo, workspace.getNode(Fqn.fromString("/one/two")).get("key1"));
View Full Code Here

        cache.put("/one/two", "key1", pojo);

        //GlobalTransaction gtx = cache.getCurrentTransaction(tx);
        TransactionTable table = cache.getTransactionTable();
        assertNotNull(mgr.getTransaction());
        mgr.commit();


        assertNull(mgr.getTransaction());

        //assert that the local cache is in the right state
View Full Code Here

        cache.put("/one/two", "key1", pojo);

        GlobalTransaction gtx = cache.getCurrentTransaction(tx);
        TransactionTable table = cache.getTransactionTable();
        assertNotNull(mgr.getTransaction());
        mgr.commit();


        assertNull(mgr.getTransaction());

        //assert that the local cache is in the right state
View Full Code Here

        OptimisticTransactionEntry entry = (OptimisticTransactionEntry) table.get(gtx);

        TransactionWorkspace workspace = entry.getTransactionWorkSpace();

        mgr.commit();

        //assert what should be the results of our call
        assertEquals(3, workspace.getNodes().size());
        assertNotNull(workspace.getNode(Fqn.fromString("/one/two")));
        assertEquals(pojo, workspace.getNode(Fqn.fromString("/one/two")).get("key1"));
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.