Package org.jboss.cache

Examples of org.jboss.cache.TreeCache.stopService()


        assertEquals(MethodDeclarations.rollbackMethod, calls.get(0));


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

    }

    public void testEmptyLocalTransaction() throws Exception
    {
View Full Code Here


        assertNull(mgr.getTransaction());

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

        cache.stopService();
    }

    public void testEmptyRollbackLocalTransaction() throws Exception
    {
View Full Code Here

        assertNull(mgr.getTransaction());

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

    }

    public void testLocalRollbackAftercommitTransaction() throws Exception
    {
View Full Code Here

        }
        assertTrue(failed);
        assertNull(mgr.getTransaction());
        assertEquals(0, cache.getTransactionTable().getNumGlobalTransactions());
        assertEquals(0, cache.getTransactionTable().getNumLocalTransactions());
        cache.stopService();
    }


    public void testgtxTransactionExists() throws Exception
    {
View Full Code Here


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

        cache.stopService();
    }


    public void testRemotePrepareTransaction() throws Exception
    {
View Full Code Here

        assertEquals(MethodDeclarations.optimisticPrepareMethod, calls.get(2));

        //assert we have the tx in th table
        assertEquals(1, cache.getTransactionTable().getNumGlobalTransactions());
        assertEquals(1, cache.getTransactionTable().getNumLocalTransactions());
        cache.stopService();
    }

    public void testRemotePrepareSuspendTransaction() throws Exception
    {
View Full Code Here

        assertNull(table.get(gtx));
        assertNull(table.getLocalTransaction(gtx));
        //assert we are no longer associated
        assertEquals(null, mgr.getTransaction());
        cache.stopService();
    }

    public void testRemoteCommitSuspendTransaction() throws Exception
    {
View Full Code Here

        List calls = dummy.getAllCalled();

        assertEquals(MethodDeclarations.optimisticPrepareMethod, calls.get(0));
        assertEquals(MethodDeclarations.commitMethod, calls.get(1));

        cache.stopService();


    }

    public void testRollbackTransaction() throws Exception
View Full Code Here

        List calls = dummy.getAllCalled();

        assertEquals(1, calls.size());
        assertEquals(MethodDeclarations.rollbackMethod, calls.get(0));

        cache.stopService();


    }

    public void testRemotePrepareTransaction() throws Exception
View Full Code Here


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

        cache.stopService();


    }

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.