Examples of AspectDefinition


Examples of org.jboss.aop.advice.AspectDefinition

      internalRemoveAspectDefintion(name);
   }

   protected AspectDefinition internalRemoveAspectDefintion(String name)
   {
      AspectDefinition def = aspectDefinitions.remove(name);
      if (def != null)
      {
         def.undeploy();
         if (def.getScope() == Scope.PER_VM) perVMAspects.remove(def.getName());
      }
      return def;
   }
View Full Code Here

Examples of org.jboss.aop.advice.AspectDefinition

      if (s != null)
      {
         scope = ScopeUtil.parse(s);
         if (scope == null) throw new RuntimeException("Illegal scope attribute value: " + s);
      }
      AspectDefinition def = manager.getAspectDefinition(name);

      // if interceptor definition already exists, then just check to see if scopes are the same
      // todo deprecate <interceptor> within an advice stack
      if (def != null)
      {
         if (scope == null) scope = Scope.PER_VM;
         if (scope != def.getScope()) throw new RuntimeException("multiple definitions of <interceptor> " + name + " with different scopes is illegal");
      }
      else
      {
         AspectFactory aspectFactory;
         if (clazz != null)
         {
            aspectFactory = new GenericAspectFactory(clazz, element);
            ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
         }
         else
         {
            aspectFactory = new AspectFactoryDelegator(factory1, element);
            ((AspectFactoryWithClassLoader)aspectFactory).setClassLoader(cl);
         }
        
         def = new AspectDefinition(name, scope, aspectFactory);
         manager.addAspectDefinition(def);
      }
      InterceptorFactory factory = manager.getInterceptorFactory(name);
      if (factory == null)
      {
View Full Code Here

Examples of org.jboss.aop.advice.AspectDefinition

   {
      String name = element.getAttribute("name");
      String aspect = element.getAttribute("aspect");
      if(aspect == null || aspect.length() < 1)
         throw new RuntimeException("Aspect couldnt be found for element: "+element.getNodeName()+", typo perhaps?");
      AspectDefinition def = manager.getAspectDefinition(aspect);
      if (def == null) throw new RuntimeException("advice " + name + " cannot find aspect " + aspect);
     
      AdviceFactory factory = null;
      if (type == null)
      {
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.