Package org.jboss.aop.advice

Examples of org.jboss.aop.advice.GenericAspectFactory


      Class<?> beanClass = MockBean.class;
      String beanClassName = beanClass.getName();
      String ejbName = beanClass.getSimpleName();
      Domain domain = new Domain(new AspectManager(), "Test", false);

      GenericAspectFactory aspectFactory = new GenericAspectFactory(CurrentInvocationInterceptor.class.getName(), null);
      AspectDefinition def = new AspectDefinition("CurrentInvocationInterceptor", Scope.PER_VM, aspectFactory);
      domain.addAspectDefinition(def);
      AdviceFactory factory = new AdviceFactory(def, "invoke");
      GenericAspectFactory aspectFactory2 = new GenericAspectFactory(CurrentInvocationContextInterceptor.class.getName(), null);
      AspectDefinition def2 = new AspectDefinition("CurrentInvocationContextInterceptor", Scope.PER_VM, aspectFactory2);
      domain.addAspectDefinition(def2);
      AdviceFactory factory2 = new AdviceFactory(def2, "invoke");
      AdviceStack stack = new AdviceStack("InjectionCallbackStack", new ArrayList<InterceptorFactory>(Arrays.asList(factory, factory2)));
      domain.addAdviceStack(stack);
View Full Code Here


      else
      {
         AspectFactory aspectFactory;
         if (clazz != null)
         {
            aspectFactory = new GenericAspectFactory(clazz, element);
            ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
         }
         else
         {
            aspectFactory = new AspectFactoryDelegator(factory1, element);
View Full Code Here

         if (scope == null) throw new RuntimeException("Illegal scope attribute value: " + s);
      }
      AspectFactory aspectFactory;
      if (clazz != null)
      {
         aspectFactory = new GenericAspectFactory(clazz, element);
         ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
      }
      else
      {
         aspectFactory = new AspectFactoryDelegator(factory, element);
View Full Code Here

      else
      {
         AspectFactory aspectFactory;
         if (clazz != null)
         {
            aspectFactory = new GenericAspectFactory(clazz, element);
            ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
         }
         else
         {
            aspectFactory = new AspectFactoryDelegator(factory1, element);
View Full Code Here

         if (scope == null) throw new RuntimeException("Illegal scope attribute value: " + s);
      }
      AspectFactory aspectFactory;
      if (clazz != null)
      {
         aspectFactory = new GenericAspectFactory(clazz, element);
         ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
      }
      else
      {
         aspectFactory = new AspectFactoryDelegator(factory, element);
View Full Code Here

            factory = new AspectFactoryDelegator(cf.getName(), null);
            ((AspectFactoryWithClassLoader)factory).setClassLoader(cl);
         }
         else
         {
            factory = new GenericAspectFactory(cf.getName(), null);
            ((AspectFactoryWithClassLoader)factory).setClassLoader(cl);
         }
         AspectDefinition def = new AspectDefinition(cf.getName(), scope, factory);
         manager.addAspectDefinition(def);
         if (!isFactory)
View Full Code Here

            aspectFactory = new AspectFactoryDelegator(cf.getName(), null);
            ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
         }
         else
         {
            aspectFactory = new GenericAspectFactory(cf.getName(), null);
            ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
         }

         AspectDefinition def = new AspectDefinition(cf.getName(), scope, aspectFactory);
         manager.addAspectDefinition(def);
View Full Code Here

      else
      {
         AspectFactory aspectFactory;
         if (clazz != null)
         {
            aspectFactory = new GenericAspectFactory(clazz, element);
            ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
         }
         else
         {
            aspectFactory = new AspectFactoryDelegator(factory1, element);
View Full Code Here

         if (scope == null) throw new RuntimeException("Illegal scope attribute value: " + s);
      }
      AspectFactory aspectFactory;
      if (clazz != null)
      {
         aspectFactory = new GenericAspectFactory(clazz, element);
         ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
      }
      else
      {
         aspectFactory = new AspectFactoryDelegator(factory, element);
View Full Code Here

      addAspectBinding(manager, index, scope, aspectClass, null, pointcut);
   }
  
   protected void addAspectBinding(AspectManager manager, int index, Scope scope, String aspectClass, String adviceName, String pointcut) throws ParseException
   {
      AspectDefinition def = new AspectDefinition("aspect" + index, scope, new GenericAspectFactory(aspectClass, null));
     
      InterceptorFactory advice = (adviceName != null) ? new AdviceFactory(def, "advice") : new ScopedInterceptorFactory(def);
      PointcutExpression pc = new PointcutExpression("pc2" + index, pointcut);
      InterceptorFactory[] interceptors = {advice};
      AdviceBinding binding = new AdviceBinding("binding" + index, pc, null, null, interceptors);
View Full Code Here

TOP

Related Classes of org.jboss.aop.advice.GenericAspectFactory

Copyright © 2018 www.massapicom. 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.