Package org.jboss.aop

Examples of org.jboss.aop.AspectManager


         return new Interceptor[]
         {};
      }

      // Obtain interceptors by stack name via Aspect Manager
      AspectManager manager = AspectManager.instance();
      AdviceStack stack = manager.getAdviceStack(stackName);
      assert stack != null : "Could not find Advice Stack with name: " + stackName;
      Advisor advisor = this.getAdvisor();
      Interceptor[] interceptors = stack.createInterceptors(advisor, null);
      return interceptors;
   }
View Full Code Here


  
   private void checkInstanceAdvisor(Advisor advisor)
   {
      if (advisor instanceof InstanceProxyContainer)
      {
         AspectManager manager = advisor.getManager();
         instanceAdvisorDomainName = manager.getManagerFQN();
      }
   }
View Full Code Here

            generatedClass= generatedJoinPointClassCache.get(infoAdviceString);
        
         else
         {
            //We need to do all the work again
            AspectManager manager = AspectManager.instance();
            ClassPool pool = manager.findClassPool(classloader);
            ProtectionDomain pd = advisorClass.getProtectionDomain();
            generatedClass = generateJoinpointClass(pool, info, classloader, pd);
            generatedJoinPointClassCache.put(infoAdviceString, generatedClass);
         }
         Object obj = generatedClass.createJoinPointInstance(classloader, info);
View Full Code Here

         // short cut, avoid cost of else block
         advisorClass = info.getAdvisor().getClass();
      }
      else
      {
         AspectManager manager = info.getAdvisor().getManager();
         try
         {
            advisorClass = manager.getAdvisor(info.getClazz()).getClass();
         }
         catch(ClassCastException e)
         {
            Advisor advisor = manager.findAdvisor(info.getClazz());
            if (advisor != null && !( advisor instanceof ClassAdvisor))
            {
               //The advisor is a ClassContainer or something like that, so ignore this joinpoint
               return;
            }
View Full Code Here

   protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
   {
      //Scoped AOP deployments are only available when deployed as part of a scoped sar, ear etc.
      //It can contain an aop.xml file, or it can be part of a .aop file

      AspectManager manager = aspectManager;
      Domain domain = AOPClassLoaderInitializer.initializeForUnit(unit);
      if (domain != null)
      {
         manager = domain;
      }
View Full Code Here

      AopMetaDataDeployerOutput output = new AopMetaDataDeployerOutput();
      unit.addAttachment(AopMetaDataDeployerOutput.class, output);
     
      if (extractAopBeanMetaDataFactories(unit, deployment, output))
      {
         AspectManager correctManager = unit.getAttachment(AspectManager.class);
         log.debug("Got AspectManager attachment " + correctManager + " for " + unit);
         if (correctManager != aspectManager)
         {
            int sequence = getSequence();
            String scopedManagerName = registerScopedManagerBean(sequence, unit, correctManager, output);
View Full Code Here

     
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      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");
View Full Code Here

  
         boolean parentDelegation = module.isJ2seClassLoadingCompliance();
         String name = String.valueOf(System.identityHashCode(loader));
        
         ScopedVFSClassLoaderDomain parentDomain = unit.isTopLevel() ? null : getDomain(registry, unit.getParent());
         AspectManager parent = parentDomain != null ? parentDomain : AspectManager.getTopLevelAspectManager();

         return new ScopedVFSClassLoaderDomain(loader, name, parentDelegation, parent, false, domain, registry);
      }
      return null;
   }
View Full Code Here

      return delegateClassPoolFactory.create(src, repository);
   }
  
   public void attachDeprecatedTranslator()
   {
      AspectManager mgr = AspectManager.instance();
      MBeanServer server = MBeanServerLocator.locateJBoss();
      try
      {
         server.setAttribute(DEFAULT_LOADER_REPOSITORY, new Attribute("Translator", mgr));
      }
View Full Code Here

  
   private void checkInstanceAdvisor(Advisor advisor)
   {
      if (advisor instanceof InstanceProxyContainer)
      {
         AspectManager manager = advisor.getManager();
         instanceAdvisorDomainName = manager.getManagerFQN();
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.aop.AspectManager

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.