Package org.jboss.cache

Examples of org.jboss.cache.Region.deactivate()


           
         try {
            Region region = plainCache_.getRegion(pathFqn, false);
            if (region != null)
            {
               region.deactivate();
               region.unregisterContextClassLoader();
            }
         }
         catch (Exception e)
         {
View Full Code Here


           
         try {
            Region region = plainCache_.getRegion(pathFqn, false);
            if (region != null)
            {
               region.deactivate();
               region.unregisterContextClassLoader();
            }
         }
         catch (Exception e)
         {
View Full Code Here

      region.activate();

      Class clazz1 = ucl1.loadClass(INSTANCE_CLASS_NAME);
      cache.put(fqn("/a"), "key", clazz1.newInstance());

      region.deactivate();
      region.unregisterContextClassLoader();

      Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());

      region.registerContextClassLoader(Thread.currentThread().getContextClassLoader());
View Full Code Here

      {
//         cce.printStackTrace();
         fail("Should not have produced a ClassCastException");
      }

      region.deactivate();
      region.unregisterContextClassLoader();
   }

   @SuppressWarnings("deprecation")
   private URLClassLoader createOrphanClassLoader() throws MalformedURLException
View Full Code Here

      cache1.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
      cache1.put(fqn, "name", JOE);

      assertEquals("Put should have been OK", JOE, cache1.get(fqn, "name"));

      regionA.deactivate();

      assertNull("Inactivation should have cleared region", cache1.get(fqn, "name"));
   }

   protected CacheSPI<?, ?> createCache(String cacheID,
View Full Code Here

            // and enabling the stressors
            for (int i = 0; i < count; i++)
            {
               Region r = cacheA.getRegion(Fqn.fromString("/" + names[i]), true);
               r.registerContextClassLoader(getClass().getClassLoader());
               r.deactivate();
               System.out.println("Run " + x + "-- /" + names[i] + " deactivated on A");
               stressors[i].startPuts();
            }

            // Release the semaphore to allow the threads to start work
View Full Code Here

      // restart c1 so that it forces a state transfer from c2
      c1.destroy();
      c1.create();
      Region r = c1.getRegion(fqn.getParent(), true);
      r.registerContextClassLoader(getClass().getClassLoader());
      r.deactivate();
      c1.start();

      TestingUtil.blockUntilViewsReceived(60000, c1, c2);

      // assert that the state has been transferred to C1
View Full Code Here

      assertTrue("Should be active by default", region1.isActive());
      // make sure this newly created region is "recognised" as a marshalling region.
      assertTrue(caches[1].getRegionManager().getAllRegions(Region.Type.MARSHALLING).contains(region1));

      // now deactivate the region on cache 1.
      region1.deactivate();
      assertFalse("Should be have deactivated", region1.isActive());

      caches[0].put(f, "k", "v2");
      assertEquals("v2", caches[0].get(f, "k"));
      assertNull(caches[1].get(f, "k"));
View Full Code Here

      Region region = cache.getRegion(regionFqn, false);
      if (region != null && region.isActive())
      {
         try
         {
            region.deactivate();
            region.unregisterContextClassLoader();
         }
         catch (Exception e)
         {
            throw SecondLevelCacheUtil.convertToHibernateException(e);
View Full Code Here

           
         try {
            Region region = plainCache_.getRegion(pathFqn, false);
            if (region != null)
            {
               region.deactivate();
               region.unregisterContextClassLoader();
            }
         }
         catch (Exception e)
         {
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.