Package org.jboss.cache.transaction

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


        mgr.resume(tx);

        boolean fail = false;
        try
        {
            mgr.commit();
        }
        catch (Exception e)
        {
            fail = true;
View Full Code Here


        SamplePojo pojo = new SamplePojo(21, "test");

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

        mgr.commit();

        // cache asserts
        assertNull(mgr.getTransaction());
        assertEquals(0, cache.getTransactionTable().getNumGlobalTransactions());
        assertEquals(0, cache.getTransactionTable().getNumLocalTransactions());
View Full Code Here

        SamplePojo pojo = new SamplePojo(21, "test");

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

        mgr.commit();

        // cache asserts
        assertNull(mgr.getTransaction());
        assertEquals(0, cache.getTransactionTable().getNumGlobalTransactions());
        assertEquals(0, cache.getTransactionTable().getNumLocalTransactions());
View Full Code Here

        SamplePojo pojo2 = new SamplePojo(22, "test2");

        cache2.put("/one/two", "key1", pojo2);

        mgr.commit();

        assertEquals(1, cache.getTransactionTable().getNumGlobalTransactions());
        assertEquals(1, cache.getTransactionTable().getNumLocalTransactions());

        mgr.resume(tx);
View Full Code Here

        mgr.resume(tx);

        boolean fail = false;
        try
        {
            mgr.commit();
        }
        catch (Exception e)
        {
            fail = true;
View Full Code Here

        assertEquals(0, cache.getTransactionTable().getNumGlobalTransactions());
        assertEquals(0, cache.getTransactionTable().getNumLocalTransactions());

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

        mgr.commit();

        mgr.begin();
        Transaction tx = mgr.getTransaction();
        System.out.println("Current TX " + mgr.getTransaction());
        assertEquals(pojo1, cache.get("/one/two", "key1"));
View Full Code Here

        cache.getInvocationContext().setTransaction(tx);
        cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));


        cache.remove("/one/two");
        mgr.commit();
        assertEquals(null, dummy.getCalled());
        TransactionTable table = cache.getTransactionTable();

        GlobalTransaction gtx = table.get(tx);
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")));
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")));
View Full Code Here

        assertEquals(null, workspace.getNode(Fqn.fromString("/")).getChild("one"));

        assertEquals(null, dummy.getCalled());


        mgr.commit();

        //assert what should be the results of our call
        assertEquals(3, workspace.getNodes().size());

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.