Package org.jboss.cache

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


   {
      TreeCache cache = (TreeCache) caches.get(id);
      if (cache != null)
      {
         try {
            cache.stopService();
            cache.destroyService();
            caches.remove(id);
         }
         catch (Exception e) {
            System.out.println("Exception stopping cache " + e.getMessage());
View Full Code Here


        Assert.assertEquals("value2", cache1.get(fqn, "key2"));
        Assert.assertNull("Should have been invalidated!", cache2.get(fqn));

        // clean up.
        cache1.stopService();
        cache2.stopService();
        cache1 = null;
        cache2 = null;
    }

    public void testUnnecessaryEvictions() throws Exception
View Full Code Here

        assertEquals("world", cache2.get(fqn2, "hello"));
        assertNull(cache1.get(fqn1, "hello"));
        assertNull(cache1.get(fqn2, "hello"));

        cache1.stopService();
        cache2.stopService();
        cache1 = null;
        cache2 = null;

    }
View Full Code Here

        TestingUtil.sleepThread(500)// give it time to broadcast the evict call
        Assert.assertNull("Should have been invalidated!", cache2.get(fqn));

        // clean up.
        cache1.stopService();
        cache2.stopService();
        cache1 = null;
        cache2 = null;
    }

View Full Code Here

        Assert.assertEquals("value2", cache1.get(fqn, "key2"));
        Assert.assertNull("Should not have committed", cache2.get(fqn));

        // clean up.
        cache1.stopService();
        cache2.stopService();
        cache1 = null;
        cache2 = null;

    }
View Full Code Here

        {
            Assert.assertTrue("Ought to have failed!", true);
        }
        // clean up.
        cache1.stopService();
        cache2.stopService();
        cache1 = null;
        cache2 = null;
    }

    public void testPessTxSyncUnableToEvict() throws Exception
View Full Code Here

        {
            Assert.assertTrue("Ought to have succeeded!", false);
        }
        // clean up.
        cache1.stopService();
        cache2.stopService();
        cache1 = null;
        cache2 = null;
    }

    public void testPessTxAsyncUnableToEvict() throws Exception
View Full Code Here

        {

            assertTrue(true);
        }
        assertEquals(null, dummy.getCalled());
        cache.stopService();
    }

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

        {
            fail = true;
        }
        assertTrue(fail);
        assertEquals(null, dummy.getCalled());
        cache.stopService();
    }


}
View Full Code Here

        }
        catch (RollbackException re)
        {
            Assert.assertTrue("Expecting a rollback exception!", true);
        }
        c.stopService();
    }

    public void testImplicitTxFailure() throws Exception
    {
        final TreeCache c = createCache();
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.