Package org.jboss.cache

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


      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 = caches.get(0);
      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

      //      cache2.registerClassLoader(A, cl2);
      Region r = cache2.getRegion(A, true);
      r.registerContextClassLoader(cl2);

      r.activate();

      assertEquals("Correct state from loader for /a/b", ben.toString(), getUnmarshalled(loader.get(A_B).get("person")).toString());

      assertEquals("Correct state from cache for /a/b", ben.toString(), getUnmarshalled(cache2.get(A_B, "person")).toString());
View Full Code Here

      cache = createCache(true);
      cache.start();

      Region r = cache.getRegion(Fqn.fromString(rootRegionName), true);
      r.registerContextClassLoader(Thread.currentThread().getContextClassLoader());
      r.activate();

      cache.put(rootRegionName, "a key", "a value");
      cache.put(hereFqn, "another key", "another value");

      r.deactivate();
View Full Code Here

      cache.start();

      r = cache.getRegion(Fqn.fromString(rootRegionName), true);
      r.registerContextClassLoader(Thread.currentThread().getContextClassLoader());
      r.activate();

      Node<Object, Object> rootRegionNode = cache.getNode(rootRegionName);
      Node<Object, Object> hereNode = cache.getNode(hereFqn);
      assertNotNull(rootRegionNode);
      assertNotNull(hereNode);
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

         cache1.put("/region1/blah2", "blah", "blah");

         assertEquals(null, cache2.get("/region1/blah", "blah"));
         assertEquals(null, cache2.get("/region1/blah2", "blah"));

         region.activate();

         assertEquals("blah", cache2.get("/region1/blah", "blah"));
         assertEquals("blah", cache2.get("/region1/blah2", "blah"));

         verifyInitialData(cache2);
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.fromString("/" + 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

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.