[jboss-cvs] JBossAS SVN: r77598 - trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 28 09:54:36 EDT 2008


Author: kabir.khan at jboss.com
Date: 2008-08-28 09:54:35 -0400 (Thu, 28 Aug 2008)
New Revision: 77598

Added:
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/BeansDeploymentAopMetaDataDeployer.java
Modified:
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AOPAnnotationMetaDataParserDeployer.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AOPDeploymentAopMetaDataDeployer.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AbstractAopMetaDataDeployer.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AopMetaDataDeployerOutput.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java
Log:
[JBAS-5766] New deployers

Modified: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AOPAnnotationMetaDataParserDeployer.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AOPAnnotationMetaDataParserDeployer.java	2008-08-28 13:39:58 UTC (rev 77597)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AOPAnnotationMetaDataParserDeployer.java	2008-08-28 13:54:35 UTC (rev 77598)
@@ -33,7 +33,7 @@
 import org.jboss.aop.AspectAnnotationLoader;
 import org.jboss.aop.microcontainer.beans.metadata.AOPDeployment;
 import org.jboss.aop.microcontainer.beans.metadata.AspectManagerAwareBeanMetaDataFactory;
-//import org.jboss.aop.microcontainer.beans.metadata.MicrocontainerAnnotationLoaderStrategy;
+import org.jboss.aop.microcontainer.beans.metadata.MicrocontainerAnnotationLoaderStrategy;
 import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.deployer.DeploymentStages;
@@ -56,131 +56,130 @@
  */
 public class AOPAnnotationMetaDataParserDeployer extends AbstractDeployer
 {
-//   public AOPAnnotationMetaDataParserDeployer(int xmlParserOrder)
-//   {
-//      super.setOutput(AOPDeployment.class);
-//      super.setStage(DeploymentStages.PARSE);
-//      //Make this come after the AOPXMLMetaDataParserDeployer
-//      super.setRelativeOrder(xmlParserOrder + 1);
-//   }
-//
+   public AOPAnnotationMetaDataParserDeployer(int xmlParserOrder)
+   {
+      super.setOutput(AOPDeployment.class);
+      super.setStage(DeploymentStages.PARSE);
+      //Make this come after the AOPXMLMetaDataParserDeployer
+      super.setRelativeOrder(xmlParserOrder + 1);
+   }
+
    public void deploy(DeploymentUnit unit) throws DeploymentException
    {
-//      // Ignore non-vfs deployments
-//      if (unit instanceof VFSDeploymentUnit == false)
-//      {
-//         log.trace("Not a vfs deployment: " + unit.getName());
-//         return;
-//      }
-//      // See if the suffix matches the .aop requirement
-//      if (unit.getSimpleName().endsWith(".aop") == false)
-//      {
-//         log.trace("Unit name does not end in .ear: " + unit.getSimpleName());
-//         return;
-//      }
-//      internalDeploy((VFSDeploymentUnit)unit);
+      // Ignore non-vfs deployments
+      if (unit instanceof VFSDeploymentUnit == false)
+      {
+         log.trace("Not a vfs deployment: " + unit.getName());
+         return;
+      }
+      // See if the suffix matches the .aop requirement
+      if (unit.getSimpleName().endsWith(".aop") == false)
+      {
+         log.trace("Unit name does not end in .aop: " + unit.getSimpleName());
+         return;
+      }
+      internalDeploy((VFSDeploymentUnit)unit);
    }
-//   
-//   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);
-//         }
-//      }
-//      
-//      List<AspectManagerAwareBeanMetaDataFactory> factories = strategy.getFactories();
-//      
-//      AOPDeployment deployment = unit.getAttachment(AOPDeployment.class);
-//      if (factories != null && factories.size() > 0)
-//      {
-//         if (deployment == null)
-//         {
-//            deployment = new AOPDeployment();
-//            unit.getTransientManagedObjects().addAttachment(AOPDeployment.class.getName(), deployment, AOPDeployment.class);
-//            deployment.setBeanFactories(new ArrayList<BeanMetaDataFactory>());
-//         }
-//         System.out.println(System.identityHashCode(deployment.getBeanFactories()));
-//         deployment.getBeanFactories().addAll(factories);
-//      }  
-//   }
-//
-//   private ClassFile loadClassFile(VirtualFile file)
-//   {
-//      DataInputStream din = null;
-//      ClassFile cf = null;
-//      try
-//      {
-//         InputStream in = file.openStream();
-//         din = new DataInputStream(new BufferedInputStream(in));
-//         cf = new ClassFile(din);
-//      }
-//      catch (IOException e)
-//      {
-//         throw new RuntimeException("Error reading " + file, e);
-//      }
-//      finally
-//      {
-//         try
-//         {
-//            din.close();
-//         }
-//         catch (IOException ignored)
-//         {
-//         }
-//      }
-//      
-//      return cf;
-//   }
-//
-//   private List<VirtualFile> getClasses(VFSDeploymentUnit unit)
-//   {
-//      VisitorAttributes va = new VisitorAttributes();
-//      va.setLeavesOnly(true);
-//      ClassFileFilter filter = new ClassFileFilter();
-//      SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
-//      va.setRecurseFilter(noJars);
-//      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
-//
-//      for (VirtualFile vf : unit.getClassPath())
-//      {
-//         try
-//         {
-//            vf.visit(visitor);
-//         }
-//         catch (IOException e)
-//         {
-//            throw new RuntimeException(e);
-//         }
-//      }
-//      return visitor.getMatched();
-//
-//   }
-//   
-//   private static class ClassFileFilter implements VirtualFileFilter
-//   {
-//      public boolean accepts(VirtualFile file)
-//      {
-//         try
-//         {
-//            return file.isLeaf() && file.getName().endsWith(".class");
-//         }
-//         catch (IOException e)
-//         {
-//            throw new RuntimeException("Error visiting file: " + file.getName(), e);
-//         }
-//      }
-//   }
+   
+   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);
+         }
+      }
+      
+      List<AspectManagerAwareBeanMetaDataFactory> factories = strategy.getFactories();
+      
+      AOPDeployment deployment = unit.getAttachment(AOPDeployment.class);
+      if (factories != null && factories.size() > 0)
+      {
+         if (deployment == null)
+         {
+            deployment = new AOPDeployment();
+            unit.getTransientManagedObjects().addAttachment(AOPDeployment.class.getName(), deployment, AOPDeployment.class);
+            deployment.setBeanFactories(new ArrayList<BeanMetaDataFactory>());
+         }
+         deployment.getBeanFactories().addAll(factories);
+      }  
+   }
+
+   private ClassFile loadClassFile(VirtualFile file)
+   {
+      DataInputStream din = null;
+      ClassFile cf = null;
+      try
+      {
+         InputStream in = file.openStream();
+         din = new DataInputStream(new BufferedInputStream(in));
+         cf = new ClassFile(din);
+      }
+      catch (IOException e)
+      {
+         throw new RuntimeException("Error reading " + file, e);
+      }
+      finally
+      {
+         try
+         {
+            din.close();
+         }
+         catch (IOException ignored)
+         {
+         }
+      }
+      
+      return cf;
+   }
+
+   private List<VirtualFile> getClasses(VFSDeploymentUnit unit)
+   {
+      VisitorAttributes va = new VisitorAttributes();
+      va.setLeavesOnly(true);
+      ClassFileFilter filter = new ClassFileFilter();
+      SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
+      va.setRecurseFilter(noJars);
+      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
+
+      for (VirtualFile vf : unit.getClassPath())
+      {
+         try
+         {
+            vf.visit(visitor);
+         }
+         catch (IOException e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+      return visitor.getMatched();
+
+   }
+   
+   private static class ClassFileFilter implements VirtualFileFilter
+   {
+      public boolean accepts(VirtualFile file)
+      {
+         try
+         {
+            return file.isLeaf() && file.getName().endsWith(".class");
+         }
+         catch (IOException e)
+         {
+            throw new RuntimeException("Error visiting file: " + file.getName(), e);
+         }
+      }
+   }
 }

Modified: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AOPDeploymentAopMetaDataDeployer.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AOPDeploymentAopMetaDataDeployer.java	2008-08-28 13:39:58 UTC (rev 77597)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AOPDeploymentAopMetaDataDeployer.java	2008-08-28 13:54:35 UTC (rev 77598)
@@ -29,11 +29,9 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 
 /**
- * Deployer for Aspects
+ * Deployer for Aspects in a -aop.xml or .aop
  *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @author adrian at jboss.org
  */
 public class AOPDeploymentAopMetaDataDeployer extends AbstractAopMetaDataDeployer<AOPDeployment>
 {

Modified: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AbstractAopMetaDataDeployer.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AbstractAopMetaDataDeployer.java	2008-08-28 13:39:58 UTC (rev 77597)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AbstractAopMetaDataDeployer.java	2008-08-28 13:54:35 UTC (rev 77598)
@@ -22,6 +22,7 @@
 package org.jboss.aop.asintegration.jboss5;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 
@@ -36,6 +37,7 @@
 import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
 import org.jboss.classloader.spi.ClassLoaderSystem;
 import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.dependency.spi.ScopeInfo;
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.deployer.DeploymentStages;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
@@ -45,8 +47,14 @@
 import org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.metadata.spi.scope.Scope;
+import org.jboss.metadata.spi.scope.ScopeKey;
 
 /**
+ * Deployer for deployments containing AOP metadata. It makes sure that the metadata is deployed to the 
+ * right aop domain in the case of scoped classloaders. The AOP metadata is stripped out of the deployment
+ * to avoid deploying it twice.
+ * 
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  * @version $Revision: 1.1 $
  */
@@ -147,8 +155,6 @@
       AopMetaDataDeployerOutput output = unit.getAttachment(AopMetaDataDeployerOutput.class);
       
       undeployBeans(unit, output);
-      
-      unregisterScopedManagerBean(output.getScopedAspectManagerBeanName(), true);
    }
 
    protected abstract List<BeanMetaDataFactory> getFactories(T deployment);
@@ -184,6 +190,7 @@
    {
       String name = "ScopedManager_" + getSequence() + "_" + unit.getName();
       BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(name, scopedManager.getClass().getName());
+      unit.getMutableMetaData().addMetaData(scopedManager, AspectManager.class);
       
       try
       {
@@ -192,7 +199,6 @@
       }
       catch (Throwable e)
       {
-         unregisterScopedManagerBean(name, false);
          throw new DeploymentException("Error registering scoped manager" + name + " " + scopedManager, e);
       }
    }
@@ -227,6 +233,7 @@
       log.debug("Massaging scoped deployment " + unit + " setting manager to " + scopedManagerName);
       String domainName = getDomainName(unit);
       output.setScopedInformation(scopedManagerName, domainName, sequence);
+      unit.getMutableMetaData().addAnnotation(output.getScopeAnnotation());
    }
    
    private String getDomainName(VFSDeploymentUnit unit)
@@ -250,8 +257,19 @@
          {
             for (BeanMetaData bean : aopBeans)
             {
-               beanMetaDataDeployer.deploy(unit, bean);
-               done.add(bean);
+               //Register the component deployment context so we get the correct mutable metadata scope
+               DeploymentUnit componentUnit = deployComponentDeploymentContext(unit, bean);
+               try
+               {
+                  beanMetaDataDeployer.deploy(componentUnit, bean);
+                  done.add(bean);
+               }
+               finally
+               {
+                  //Unregister the component deployment context so that this bean does not get deployed
+                  //again by the real BeanMetaDataDeployer
+                  undeployComponentDeploymentContext(unit, bean);
+               }
             }
          }
       }
@@ -275,17 +293,38 @@
    
    private void undeployBeans(VFSDeploymentUnit unit, AopMetaDataDeployerOutput output)
    {
-      List<BeanMetaData> aopBeans = output.getBeans();
-      if (aopBeans != null && aopBeans.size() > 0)
+      if (output != null)
       {
-         for (int i = aopBeans.size() - 1 ; i >= 0 ; i--)
+         List<BeanMetaData> aopBeans = output.getBeans();
+         if (aopBeans != null && aopBeans.size() > 0)
          {
-            BeanMetaData bean = aopBeans.get(i);
-            beanMetaDataDeployer.undeploy(unit, bean);
+            for (int i = aopBeans.size() - 1 ; i >= 0 ; i--)
+            {
+               BeanMetaData bean = aopBeans.get(i);
+               beanMetaDataDeployer.undeploy(unit, bean);
+            }
          }
-      }      
+      }
    }
    
+   /**
+    * Wrap the deployment unit in a component deployment unit similar to what the KernelDeploymentDeployer does
+    */
+   private DeploymentUnit deployComponentDeploymentContext(DeploymentUnit unit, BeanMetaData deployment)
+   {
+      DeploymentUnit componentUnit = unit.addComponent(deployment.getName());
+      componentUnit.addAttachment(BeanMetaData.class.getName(), deployment);
+      return componentUnit;
+   }
+   
+   /**
+    * Undeploy the component deployment unit similar to what the KernelDeploymentDeployer does 
+    */
+   private void undeployComponentDeploymentContext(DeploymentUnit unit, BeanMetaData bean)
+   {
+      unit.removeComponent(bean.getName());
+   }
+   
    private class MyBeanMetaDataDeployer
    {   
       /**
@@ -309,19 +348,52 @@
             }
          }
          KernelControllerContext context = new AbstractKernelControllerContext(null, deployment, null);
+         //Make sure that the metadata from the deployment gets put into the context
+         ScopeInfo scopeInfo = context.getScopeInfo();
+         if (scopeInfo != null)
+         {
+            mergeScopes(scopeInfo.getScope(), unit.getScope());
+            mergeScopes(scopeInfo.getMutableScope(), unit.getMutableScope());
+         }
+         
          try
          {
+            //System.out.println("==============> Installing " + context.getName());
             controller.install(context);
          }
          catch (Throwable t)
          {
             throw DeploymentException.rethrowAsDeploymentException("Error deploying: " + deployment.getName(), t);
          }
+         
+         
       }
    
       /**
        * Copied from the real org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer
+       * Merge scope keys.
+       *
+       * @param contextKey the context key
+       * @param unitKey the unit key
        */
+      protected void mergeScopes(ScopeKey contextKey, ScopeKey unitKey)
+      {
+         if (contextKey == null)
+            return;
+         if (unitKey == null)
+            return;
+
+         Collection<Scope> unitScopes = unitKey.getScopes();
+         if (unitScopes == null || unitScopes.isEmpty())
+            return;
+
+         for (Scope scope : unitScopes)
+            contextKey.addScope(scope);
+      }
+
+      /**
+       * Copied from the real org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer
+       */
       private void undeploy(DeploymentUnit unit, BeanMetaData deployment)
       {
          try

Modified: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AopMetaDataDeployerOutput.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AopMetaDataDeployerOutput.java	2008-08-28 13:39:58 UTC (rev 77597)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AopMetaDataDeployerOutput.java	2008-08-28 13:54:35 UTC (rev 77598)
@@ -23,9 +23,12 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
 
+import org.jboss.aop.microcontainer.beans.Aspect;
 import org.jboss.aop.microcontainer.beans.metadata.AspectManagerAwareBeanMetaDataFactory;
 import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.PropertyMetaData;
 import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
 
 /**
@@ -41,6 +44,7 @@
    String scopedAspectManagerBeanName;
    String domainName;
    int sequence;
+   ClassLoaderDomainScope scopeAnnotation;
    
    AopMetaDataDeployerOutput()
    {
@@ -52,6 +56,11 @@
       return scopedAspectManagerBeanName;
    }
 
+   ClassLoaderDomainScope getScopeAnnotation()
+   {
+      return scopeAnnotation;
+   }
+   
    void setFactories(List<AspectManagerAwareBeanMetaDataFactory> factories)
    {
       this.factories = factories;
@@ -63,6 +72,11 @@
       this.scopedAspectManagerBeanName = scopedAspectManagerBeanName;
       this.domainName = domainName;
       this.sequence = sequence;
+      if (domainName == null)
+      {
+         throw new IllegalStateException("Should not have null domainName for scoped bean");
+      }
+      scopeAnnotation = new ClassLoaderDomainScopeImpl("domainName");
    }
    
    List<BeanMetaData> getBeans()
@@ -106,14 +120,24 @@
          builder.addAnnotation(new AliasesImpl(name));
          
          //Set the domain name
-         if (domainName == null)
-         {
-            throw new IllegalStateException("Should not have null domainName for scoped bean");
-         }
-         builder.addAnnotation(new ClassLoaderDomainScopeImpl(domainName));
+         builder.addAnnotation(scopeAnnotation);
       
          //set the new name used by the controller for managing beans
          builder.setName(newName);
+         
+         //Debug stuff
+         if (bean.getBean().equals(Aspect.class.getName()))
+         {
+            Object scope = null;
+            Set<PropertyMetaData> properties = bean.getProperties();
+            for (PropertyMetaData property : properties)
+            {
+               if (property.getName().equals("scope"))
+               {
+                  scope = property.getValue().getUnderlyingValue();
+               }
+            }
+         }
       }
    }
 }

Added: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/BeansDeploymentAopMetaDataDeployer.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/BeansDeploymentAopMetaDataDeployer.java	                        (rev 0)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/BeansDeploymentAopMetaDataDeployer.java	2008-08-28 13:54:35 UTC (rev 77598)
@@ -0,0 +1,62 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, Red Hat Middleware LLC., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.asintegration.jboss5;
+
+import java.util.List;
+
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+
+/**
+ * Deployer for Aspects in a -beans.xml
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ */
+public class BeansDeploymentAopMetaDataDeployer extends AbstractAopMetaDataDeployer<KernelDeployment>
+{
+   public BeansDeploymentAopMetaDataDeployer()
+   {
+      super(KernelDeployment.class);
+   }
+
+   @Override
+   public void deploy(VFSDeploymentUnit unit, KernelDeployment kernelDeployment) throws DeploymentException
+   {
+      super.deploy(unit, kernelDeployment);
+   }
+   
+   @Override
+   public void undeploy(VFSDeploymentUnit unit, KernelDeployment kernelDeployment)
+   {
+      super.undeploy(unit, kernelDeployment);
+   }
+
+
+   @Override
+   protected List<BeanMetaDataFactory> getFactories(KernelDeployment kernelDeployment)
+   {
+      return kernelDeployment.getBeanFactories();
+   }
+   
+}

Modified: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java	2008-08-28 13:39:58 UTC (rev 77597)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java	2008-08-28 13:54:35 UTC (rev 77598)
@@ -131,20 +131,4 @@
       ClassLoaderDomain domain = registry.getClassLoaderDomainForLoader(cl);
       return domain;
    }
-   
-//   private HeirarchicalLoaderRepository3 getScopedRepository()
-//   {
-//      ClassLoader classloader = getClassLoader();
-//      if (classloader == null)
-//         throw new IllegalStateException("ClassLoader no longer exists: " + classLoaderString);
-//      if (classloader instanceof RepositoryClassLoader == false)
-//         throw new IllegalStateException("ClassLoader is not an instanceof RepositoryClassLoader " + classLoaderString);
-//      RepositoryClassLoader repositoryClassLoader = (RepositoryClassLoader) classloader;
-//      LoaderRepository loaderRepository = repositoryClassLoader.getLoaderRepository();
-//      if (loaderRepository == null)
-//         throw new IllegalStateException("ClassLoader has been undeployed: " + classLoaderString);
-//      if (loaderRepository instanceof HeirarchicalLoaderRepository3 == false)
-//         throw new IllegalStateException("Repository " + loaderRepository + " for classlaoder " + classLoaderString + " is not an HeirarchicalLoaderRepository3");
-//      return (HeirarchicalLoaderRepository3) loaderRepository;
-//   }
 }




More information about the jboss-cvs-commits mailing list