Package org.jboss.aop

Examples of org.jboss.aop.AspectAnnotationLoader


   }
  
   private void internalDeploy(VFSDeploymentUnit unit) throws DeploymentException
   {
      MicrocontainerAnnotationLoaderStrategy strategy = new MicrocontainerAnnotationLoaderStrategy();
      AspectAnnotationLoader loader = new AspectAnnotationLoader(null, strategy);
     
      List<VirtualFile> files = getClasses(unit);
      for(VirtualFile file : files)
      {
         try
         {
            ClassFile cf = loadClassFile(file);
            log.debug("Deploying possibly annotated class " + cf.getName());
            loader.deployClassFile(cf);
         }
         catch (Exception e)
         {
            throw new DeploymentException("Error reading annotations for " + file, e);
         }
View Full Code Here


         AspectManager manager = (scl != null) ? AspectManager.instance(scl) : AspectManager.instance();
         if (!di.isXML)
         {
            @SuppressWarnings("unchecked")
            Iterator it = ArchiveBrowser.getBrowser(di.localUrl, new ClassFileFilter());
            AspectAnnotationLoader loader = new AspectAnnotationLoader(manager);
            loader.setClassLoader(scl);
            loader.deployInputStreamIterator(it);
         }

         AspectXmlLoader.deployXML(docURL, scl, manager);
         Notification msg = new Notification("AOP Deploy", this, getNextNotificationSequenceNumber());
         sendNotification(msg);
View Full Code Here

         Thread.currentThread().setContextClassLoader(di.ucl);
         if (!di.isXML)
         {
            @SuppressWarnings("unchecked")
            Iterator it = ArchiveBrowser.getBrowser(di.localUrl, new ClassFileFilter());
            AspectAnnotationLoader loader = new AspectAnnotationLoader(AspectManager.instance());
            loader.undeployInputStreamIterator(it);

         }

         URL docURL = getDocUrl(di);
         //long start = System.currentTimeMillis();
View Full Code Here

   @SuppressWarnings("unchecked")
   protected void deployAOP() throws Exception
   {
      log.debug("Deploying annotations from " + tempDir);
      MicrocontainerAnnotationLoaderStrategy strategy = new MicrocontainerAnnotationLoaderStrategy();
      AspectAnnotationLoader loader = new AspectAnnotationLoader(AspectManager.instance(), strategy);
      URL url = tempDir.toURL();
      Iterator<InputStream> it = ArchiveBrowser.getBrowser(url, new ClassFileFilter());
      loader.deployInputStreamIterator(it);
      List<AspectManagerAwareBeanMetaDataFactory> factories = strategy.getFactories();
     
      if (factories != null && factories.size() > 0)
      {
         deployedBeans = new ArrayList<KernelControllerContext>();
View Full Code Here

   private void deployAnnotations(AspectManager manager, VFSDeploymentUnit unit) throws DeploymentException
   {
      log.info("Deploying AOP annotations into " + manager + " for " + unit.getClassLoader());  

      AspectAnnotationLoader loader = getAnnotationLoader(manager, unit);
      List<VirtualFile> files = getClasses(unit);
      ArrayList<VirtualFile> deployedFiles = new ArrayList<VirtualFile>(files.size());
      for(VirtualFile file : files)
      {
         try
         {
            ClassFile cf = loadClassFile(file);
            log.debug("Deploying possibly annotated class " + cf.getName() + " into " + manager);
            loader.deployClassFile(cf);
         }
         catch (Exception e)
         {
            //Unwind things already installed, in the reverse order
            for (int i = deployedFiles.size() - 1; i >= 0 ; i-- )
View Full Code Here

      }
   }
  
   private void undeployAnnotations(AspectManager manager, VFSDeploymentUnit unit)
   {
      AspectAnnotationLoader loader = getAnnotationLoader(manager, unit);
      List<VirtualFile> files = getClasses(unit);
      for(VirtualFile file : files)
      {
         undeployAnnotation(loader, file);
      }
View Full Code Here

      }
   }
  
   private AspectAnnotationLoader getAnnotationLoader(AspectManager manager, VFSDeploymentUnit unit)
   {
      AspectAnnotationLoader loader = new AspectAnnotationLoader(manager);
      loader.setClassLoader(unit.getClassLoader());
      return loader;
   }
View Full Code Here

   }
  
   private void internalDeploy(VFSDeploymentUnit unit) throws DeploymentException
   {
      MicrocontainerAnnotationLoaderStrategy strategy = new MicrocontainerAnnotationLoaderStrategy();
      AspectAnnotationLoader loader = new AspectAnnotationLoader(null, strategy);
     
      List<VirtualFile> files = getClasses(unit);
      for(VirtualFile file : files)
      {
         try
         {
            ClassFile cf = loadClassFile(file);
            log.debug("Deploying possibly annotated class " + cf.getName());
            loader.deployClassFile(cf);
         }
         catch (Exception e)
         {
            throw new DeploymentException("Error reading annotations for " + file, e);
         }
View Full Code Here

   private void deployAnnotations(AspectManager manager, VFSDeploymentUnit unit) throws DeploymentException
   {
      log.info("Deploying AOP annotations into " + manager + " for " + unit.getClassLoader());  

      AspectAnnotationLoader loader = getAnnotationLoader(manager, unit);
      List<VirtualFile> files = getClasses(unit);
      ArrayList<VirtualFile> deployedFiles = new ArrayList<VirtualFile>(files.size());
      for(VirtualFile file : files)
      {
         try
         {
            ClassFile cf = loadClassFile(file);
            log.debug("Deploying possibly annotated class " + cf.getName() + " into " + manager);
            loader.deployClassFile(cf);
         }
         catch (Exception e)
         {
            //Unwind things already installed, in the reverse order
            for (int i = deployedFiles.size() ; i >= 0 ; i-- )
View Full Code Here

      }
   }
  
   private void undeployAnnotations(AspectManager manager, VFSDeploymentUnit unit)
   {
      AspectAnnotationLoader loader = getAnnotationLoader(manager, unit);
      List<VirtualFile> files = getClasses(unit);
      for(VirtualFile file : files)
      {
         undeployAnnotation(loader, file);
      }
View Full Code Here

TOP

Related Classes of org.jboss.aop.AspectAnnotationLoader

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.