Examples of registerContextClassLoader()


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

      RegionManager rm = cr.getComponent(RegionManager.class);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      final Fqn region = Fqn.fromString("/hello");
      Region r = rm.getRegion(region, true);
      r.registerContextClassLoader(this.getClass().getClassLoader());
      cm200.objectToObjectStream(new ClusteredGetCommand(false, null), oos, region);
      oos.close();

      final byte[] stream = baos.toByteArray();
      // so now the stream starts with the Fqn "/hello".
View Full Code Here

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

            {
               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

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

            {
               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

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

      ClassLoader clb = getClassLoader();

      if (!useMarshalledValues)
      {
         Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
         r1.registerContextClassLoader(cla);

         Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
         r2.registerContextClassLoader(clb);
      }
View Full Code Here

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

      {
         Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
         r1.registerContextClassLoader(cla);

         Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
         r2.registerContextClassLoader(clb);
      }

      if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
      cache1.put(Fqn.fromString("/aop/1"), "person", srtl.ben_);
      cache1.remove(Fqn.fromString("/aop/1"), "person");
View Full Code Here

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

      ClassLoader clb = getClassLoader();

      if (!useMarshalledValues)
      {
         Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
         r1.registerContextClassLoader(cla);

         Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
         r2.registerContextClassLoader(clb);
      }
View Full Code Here

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

      {
         Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
         r1.registerContextClassLoader(cla);

         Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
         r2.registerContextClassLoader(clb);
      }

      if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
      TransactionManager tm = beginTransaction();
      cache1.put(Fqn.fromString("/aop/1"), "person", srtl.ben_);
View Full Code Here

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

      ClassLoader cla = getClassLoader();
      if (!useMarshalledValues)
      {
         Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
         r1.registerContextClassLoader(cla);
      }
      ClassLoader clb = getClassLoader();
      if (!useMarshalledValues)
      {
         Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
View Full Code Here

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

      }
      ClassLoader clb = getClassLoader();
      if (!useMarshalledValues)
      {
         Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
         r2.registerContextClassLoader(clb);
      }

      TransactionManager tm = beginTransaction();
      if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
      cache1.put(aop, "person", srtl.ben_);
View Full Code Here

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

      CacheSPI<Object, Object> cache1 = srtl.cache1;
      CacheSPI<Object, Object> cache2 = srtl.cache2;

      FooClassLoader cl1 = new FooClassLoader(Thread.currentThread().getContextClassLoader());
      Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
      r1.registerContextClassLoader(cl1);
      FooClassLoader cl2 = new FooClassLoader(Thread.currentThread().getContextClassLoader());
      Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
      r2.registerContextClassLoader(cl2);

      Class clazz = cl1.loadFoo();
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.