Package org.jboss.cache.transaction

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


        // assert we can see this outside the existing tx
        assertEquals(pojo2, cache.get("/one/two", "key2"));
        System.out.println("Current TX " + mgr.getTransaction());
        // resume the suspended one
        mgr.resume(tx);
        System.out.println("Current TX " + mgr.getTransaction());
        // assert we can't see the change from tx2 as we already touched the node
        assertEquals(null, cache.get("/one/two", "key2"));
        mgr.commit();
        destroyCache(cache);
View Full Code Here


        // assert we can see this outsode the existing tx
        assertEquals(2, cache.getKeys("/one/two").size());

        // resume the suspended one
        mgr.resume(tx);
        // assert we can't see thge change from tx2 as we already touched the node
        assertEquals(1, cache.getKeys("/one/two").size());
        mgr.commit();
        destroyCache(cache);
View Full Code Here

        keys = cache.getKeys("/one/two");
        System.out.println("keys after TX #3 committed: " + keys);
        assertEquals(2, keys.size());

        // resume the suspended one
        mgr.resume(tx);
        // assert we can't see the change from tx2 as we already touched the node
        keys = cache.getKeys("/one/two");
        System.out.println("keys after TX #2 resumed (in private workspace of TX #2): " + keys);
        assertEquals(2, keys.size()); // we will see key1 and key2, but *not* key3

 
View Full Code Here

        mgr.begin();
        Assert.assertNull(cache.get(fqn, key));
        mgr.commit();

        mgr.resume(tx);
        Assert.assertEquals(value, cache.get(fqn, key));
        mgr.commit();

        Assert.assertEquals(value, cache.get(fqn, key));
View Full Code Here

        mgr.begin();
        Assert.assertEquals(value, cache.get(fqn, key));
        mgr.commit();

        mgr.resume(tx);
        Assert.assertNull(cache.get(fqn));
        mgr.commit();

        Assert.assertNull(cache.get(fqn));
    }
View Full Code Here

        mgr.begin();
        Assert.assertEquals(value, cache.get(fqn, key));
        mgr.commit();

        mgr.resume(tx);
        Assert.assertNull(cache.get(fqn));
        mgr.commit();

        Assert.assertNull(cache.get(fqn));
    }
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")));
View Full Code Here

        mgr.commit();

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

        mgr.resume(tx);

        boolean fail = false;
        try
        {
            mgr.commit();
View Full Code Here

        mgr.commit();

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

        mgr.resume(tx);

        boolean fail = false;
        try
        {
            mgr.commit();
View Full Code Here

        // start a new tx
        mgr.begin();
        Assert.assertEquals(value, cache.get(fqn, key));
        mgr.commit();

        mgr.resume(tx);
        Assert.assertEquals(value, cache.get(fqn, key));
        mgr.commit();

        // cleanup
        loader.remove(fqn);
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.