Package org.jboss.cache.transaction

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


        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(pojo2, workspace.getNode(Fqn.fromString("/one/two")).get("key1"));
        assertTrue(entry.getLocks().isEmpty());
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(null, workspace.getNode(Fqn.fromString("/one/two")).get("key1"));
        assertTrue(entry.getLocks().isEmpty());
View Full Code Here

        Assert.assertNull(loader.get(fqn));

        // evict from cache
        mgr.begin();
        cache.evict(fqn);
        mgr.commit();

        mgr.begin();
        // should now be passivated in the loader
        // don't do a cache.get() first as this will activate this node from the loader again!
        // Assert.assertNull( cache.get( fqn ) );
View Full Code Here

        // now do a cache.get()...
        Assert.assertEquals(value, cache.get(fqn, key));

        // and the object should now be removed from the loader
        Assert.assertNull(loader.get(fqn));
        mgr.commit();

        // clean up
        mgr.begin();
        cache.remove(fqn);
        loader.remove(fqn);
View Full Code Here

        // clean up
        mgr.begin();
        cache.remove(fqn);
        loader.remove(fqn);
        mgr.commit();

    }
}
View Full Code Here

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

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

        mgr.commit();

        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();

        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();

        assertNull(mgr.getTransaction());

        boolean fail = false;
        try
View Full Code Here

        assertNull(mgr.getTransaction());

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

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

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

        mgr.commit();

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

        mgr.resume(tx);
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.