Package org.jboss.cache

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


           assertEquals(0, cache.getNumberOfLocksHeld());

       }
       finally
       {
           cache.stopService();
       }
   }

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


            assertEquals(0, cache.getNumberOfLocksHeld());

        }
        finally
        {
            cache.stopService();
        }
    }

}
View Full Code Here

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

        assertEquals(null, mgr.getTransaction());
        cache.stopService();
    }

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

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

        assertEquals(null, mgr.getTransaction());
        cache.stopService();
    }

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

        assertNull(table.getLocalTransaction(remoteGtx));

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

    }

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

        assertNull(table.get(remoteGtx));
        assertNull(table.getLocalTransaction(remoteGtx));

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

    }


    public void testSequentialTransactionExists() throws Exception
View Full Code Here

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

        assertEquals(MethodDeclarations.optimisticPrepareMethod, calls.get(2));
        assertEquals(MethodDeclarations.commitMethod, calls.get(3));
        cache.stopService();
    }

}
View Full Code Here

        {
            threads[i].join();
        }

        assertEquals((2 * numThreads), listener.getNodesAdded());
        cache.stopService();
    }

    public void testDifferentThreadsSameTransaction() throws Exception
    {
        int numThreads = 100;
View Full Code Here

        mgr.commit();

        TestingUtil.sleepThread((long)4000);

        assertEquals(2, listener.getNodesAdded());
        cache.stopService();
    }

    public static Test suite()
    {
        return new TestSuite(ThreadedOptimisticCreateIfNotExistsInterceptorTest.class);
View Full Code Here

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

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

    }

    public void testRollbackTransaction() throws Exception
    {
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.