Examples of AspectFactoryWithClassLoader


Examples of org.jboss.aop.advice.AspectFactoryWithClassLoader

      AspectFactory factory = def.getFactory();
     
      Object global = factory.createPerVM();
      assertSame(getClass().getClassLoader(), global.getClass().getClassLoader());

      AspectFactoryWithClassLoader factoryCl = assertInstanceOf(factory, AspectFactoryWithClassLoader.class);
      factoryCl.pushScopedClassLoader(loader);
      try
      {
         Object scoped = factory.createPerVM();
         ClassLoader scopedLoader = scoped.getClass().getClassLoader();
         assertSame(loader, scopedLoader);
      }
      finally
      {
         factoryCl.popScopedClassLoader();
      }
   }
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.