Package org.jboss.cache

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


   protected void createAndActivateRegion(CacheSPI<Object, Object> c, Fqn f)
   {
      Region r = c.getRegion(f, true);
      r.registerContextClassLoader(getClass().getClassLoader());
      r.activate();
   }

   /**
    * Provides a hook for multiplexer integration. This default implementation
    * is a no-op; subclasses that test mux integration would override
View Full Code Here


      if (useRegionBased)
      {
         Region r = cache.getRegion(Fqn.ROOT, true);
         r.registerContextClassLoader(loader);
         r.activate();
      }

      Class clazz = loader.loadFoo();
      Object obj = clazz.newInstance();
View Full Code Here

      URLClassLoader ucl1 = createOrphanClassLoader();
      Thread.currentThread().setContextClassLoader(ucl1);

      Region region = cache.getRegion(fqn("/"), true);
      region.registerContextClassLoader(Thread.currentThread().getContextClassLoader());
      region.activate();

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

      region.deactivate();
View Full Code Here

         if (cache.getConfiguration().isUseRegionBasedMarshalling())
         {
            Region region =cache.getRegion(Fqn.fromElements(SSO), true);
            try
            {
               region.activate();
            }
            catch (RegionNotEmptyException e)
            {
               log.debug(SSO + " region already active", e);
            }
View Full Code Here

               plainCache_.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
               root.addChild(pathFqn);
            }
            Region region = plainCache_.getRegion(pathFqn, true);
            region.registerContextClassLoader(webAppClassLoader_);
            region.activate();
         }
         catch (Exception ex)
         {
            throw new RuntimeException("Can't register class loader", ex);
         }
View Full Code Here

               plainCache_.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
               root.addChild(pathFqn);
            }
            Region region = plainCache_.getRegion(pathFqn, true);
            region.registerContextClassLoader(webAppClassLoader_);
            region.activate();
         }
         catch (Exception ex)
         {
            throw new RuntimeException("Can't register class loader", ex);
         }
View Full Code Here

         if (cache.getConfiguration().isUseRegionBasedMarshalling())
         {
            Region region =cache.getRegion(Fqn.fromElements(SSO), true);
            try
            {
               region.activate();
            }
            catch (RegionNotEmptyException e)
            {
               log.debug(SSO + " region already active", e);
            }
View Full Code Here

      System.out.println("Cache dump BEFORE activation");
      System.out.println("cache1 " + CachePrinter.printCacheDetails(cache1));
      System.out.println("cache2 " + CachePrinter.printCacheDetails(cache2));

      c2.activate();

      System.out.println("Cache dump AFTER activation");
      System.out.println("cache1 " + CachePrinter.printCacheDetails(cache1));
      System.out.println("cache2 " + CachePrinter.printCacheDetails(cache2));
View Full Code Here

      Fqn backupFqn = fqnTransformer.getBackupFqn(cache1.getLocalAddress(), A_B);
      Fqn A = Fqn.fromString("/a");

      Region regionA = cache1.getRegion(A, true);
      regionA.registerContextClassLoader(getClass().getClassLoader());
      regionA.activate();

      // Activate the buddy backup subtree in the recipient so any
      // repl message doesn't get rejected due to that tree being inactive
      cache2.getRegionManager().activate(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN);
      cache2.getRegionManager().deactivate(A);
View Full Code Here

   {
      CacheSPI cache1 = createCache("cache1", true, true, true);
      Fqn A = Fqn.fromString("/a");
      Region regionA = cache1.getRegion(A, true);
      regionA.registerContextClassLoader(getClass().getClassLoader());
      regionA.activate();

      Fqn fqn = Fqn.fromRelativeElements(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN, "test");
      fqn = Fqn.fromRelativeFqn(fqn, A_B);
      cache1.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
      cache1.put(fqn, "name", JOE);
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.