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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 3 11:28:40 EDT 2008


Author: kabir.khan at jboss.com
Date: 2008-10-03 11:28:39 -0400 (Fri, 03 Oct 2008)
New Revision: 79098

Removed:
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectAppParsingDeployer.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectDeployer.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectDeployment.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/DefaultTranslator.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/IntegrationStrategy.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPool.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5Integration.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/MetaDataClassLoaderScopingPolicy.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/RepositoryIntegrationStrategy.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedJBoss5ClassPool.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderDomainRegistry.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java
   trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSIntegrationStrategy.java
Log:
[JBAS-5894] Upgrade to AOP 2.0.0.CR18 while waiting for GA

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectAppParsingDeployer.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectAppParsingDeployer.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectAppParsingDeployer.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,77 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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 org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.vfs.spi.deployer.JAXPDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.mx.loading.LoaderRepositoryFactory;
-import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
-import org.jboss.virtual.VirtualFile;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * Deployer to read the loader-repository config from a .aop/META-INF/jboss-aop.xml
- * and populate the LoaderRepositoryConfig attachment. The main use-case is when 
- * deploying a standalone .aop file that we want to attach to a scoped deployment.
- * 
- * @deprecated Use the one from the aop project instead once that is released, and delete these from .classpath: jboss-deployers-vfs-spi.jar, jboss-deployers-spi.jar, jboss-managed.jar
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
- at Deprecated
-public class AspectAppParsingDeployer extends JAXPDeployer<AspectDeployment>
-{
-   public AspectAppParsingDeployer()
-   {
-      super(AspectDeployment.class);
-      setSuffix("-aop.xml");
-      setStage(DeploymentStages.DESCRIBE);
-   }
-
-   protected AspectDeployment parse(VFSDeploymentUnit unit, VirtualFile file, Document document) throws Exception
-   {
-      if (unit.getTopLevel() == unit)
-      {
-         // Check for a custom loader-repository for scoping
-         NodeList loaders = document.getElementsByTagName("loader-repository");
-         if( loaders.getLength() > 0 )
-         {
-            Element loader = (Element) loaders.item(0);
-            try
-            {
-               LoaderRepositoryConfig config = LoaderRepositoryFactory.parseRepositoryConfig(loader);
-               unit.addAttachment(LoaderRepositoryConfig.class, config);
-            }
-            catch (Exception e)
-            {
-               throw DeploymentException.rethrowAsDeploymentException("Unable to parse loader repository config", e);
-            }
-         }
-      }
-      return null;
-   }
-
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectDeployer.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectDeployer.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectDeployer.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,445 +0,0 @@
-/*
-* 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.io.BufferedInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import javassist.bytecode.ClassFile;
-
-import org.jboss.aop.AspectAnnotationLoader;
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.AspectXmlLoader;
-import org.jboss.aop.Domain;
-import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
-import org.jboss.classloader.spi.ClassLoaderDomain;
-import org.jboss.classloader.spi.ClassLoaderSystem;
-import org.jboss.classloading.spi.dependency.Module;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
-import org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter;
-import org.w3c.dom.Document;
-
-/**
- * Deployer for Aspects
- *
- * @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 AspectDeployer extends AbstractVFSRealDeployer
-{
-   private static final String AOP_JAR_SUFFIX = ".aop";
-   private static final String AOP_DD_SUFFIX = "-aop.xml";
-
-   /** The aspect manager */
-   private AspectManager aspectManager;
-   
-   /**
-    * Create a new AspectDeployer.
-    */
-   public AspectDeployer()
-   {
-      setStage(DeploymentStages.POST_CLASSLOADER);
-   }
-
-   /**
-    * Get the aspectManager.
-    * 
-    * @return the aspectManager.
-    */
-   public AspectManager getAspectManager()
-   {
-      return aspectManager;
-   }
-
-   /**
-    * Set the aspectManager.
-    * 
-    * @param aspectManager the aspectManager.
-    */
-   public void setAspectManager(AspectManager aspectManager)
-   {
-      this.aspectManager = aspectManager;
-   }
-
-   /**
-    * Validate the configuration
-    */
-   public void create()
-   {
-      if (aspectManager == null)
-         throw new IllegalStateException("No aspect manager configured");
-   }
-   
-   public void deploy(VFSDeploymentUnit unit) throws DeploymentException
-   {
-      AspectManager manager = getCorrectManager(unit);
-      
-      List<VirtualFile> files = unit.getMetaDataFiles(null, AOP_DD_SUFFIX);
-
-      if (isAopArchiveOrFolder(unit))
-      {
-         deployAnnotations(manager, unit);
-      }
-      
-      if (files.size() > 0)
-      {
-         deployXml(manager, unit, files);
-      }
-   }
-   
-   public void undeploy(VFSDeploymentUnit unit)
-   {
-      try
-      {
-         AspectManager manager = getCorrectManager(unit);
-         List<VirtualFile> files = unit.getMetaDataFiles(null, AOP_DD_SUFFIX);
-   
-         if (isAopArchiveOrFolder(unit))
-         {
-            undeployAnnotations(manager, unit);
-         }
-         
-         if (files.size() > 0)
-         {
-            undeployXml(manager, unit, files);
-         }
-      }
-      finally
-      {
-         if (unit.getTopLevel() == unit)
-         {
-            aspectManager.unregisterClassLoader(unit.getClassLoader());
-         }
-      }
-   }
-
-   private void deployXml(AspectManager manager, VFSDeploymentUnit unit, List<VirtualFile> files) throws DeploymentException
-   {
-      log.info("Deploying xml into " + manager + " for " + unit.getClassLoader());   
-      
-      ArrayList<VirtualFile> deployedFiles = new ArrayList<VirtualFile>(files.size());
-      for (VirtualFile vf : files)
-      {
-         deployedFiles.add(vf);
-         try
-         {
-            log.debug("deploying: " + vf.toURL() + " into " + manager);
-            InputStream is = vf.openStream();
-            try
-            {
-               Document doc = AspectXmlLoader.loadDocument(is);
-               AspectXmlLoader loader = new AspectXmlLoader();
-      
-               loader.setManager(manager);
-               loader.setClassLoader(unit.getClassLoader());
-               loader.deployXML(doc, vf.toURL(), unit.getClassLoader());
-            }
-            finally
-            {
-               is.close();
-            }
-         }
-         catch (Exception e)
-         {
-            //Unwind things already installed, in the reverse order
-            for (int i = deployedFiles.size() - 1 ; i >= 0 ; i--)
-            {
-               undeployXml(manager, deployedFiles.get(i));
-            }
-            
-            throw DeploymentException.rethrowAsDeploymentException("Error deploying xml " + vf.getName() + " into " + manager, e);
-         }
-      }
-   }
-
-   private void undeployXml(AspectManager manager, VFSDeploymentUnit unit, List<VirtualFile> files)
-   {
-      for (VirtualFile vf : files)
-      {
-         undeployXml(manager, vf);
-      }
-   }
-   
-   private void undeployXml(AspectManager manager, VirtualFile vf)
-   {
-      try
-      {
-         log.debug("undeploying: " + vf.toURL() + " from " + manager);
-         InputStream is = vf.openStream();
-         try
-         {
-            Document doc = AspectXmlLoader.loadDocument(is);
-            AspectXmlLoader loader = new AspectXmlLoader();
-            
-            loader.setManager(manager);
-            loader.undeployXML(doc, vf.toURL());
-         }
-         finally
-         {
-            try
-            {
-               is.close();
-            }
-            catch(IOException ignore)
-            {
-            }
-         }
-      }
-      catch (Exception e)
-      {
-         log.warn("Error undeploying xml " + vf.getName() + " from " + manager, e);
-      }
-   }
-
-   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-- )
-            {
-               undeployAnnotation(loader, deployedFiles.get(i));
-            }
-            throw new DeploymentException("Error reading annotations for " + file + " during deployment into " + manager, e);
-         }
-      }
-   }
-   
-   private void undeployAnnotations(AspectManager manager, VFSDeploymentUnit unit)
-   {
-      AspectAnnotationLoader loader = getAnnotationLoader(manager, unit); 
-      List<VirtualFile> files = getClasses(unit);
-      for(VirtualFile file : files)
-      {
-         undeployAnnotation(loader, file);
-      }
-   }
-
-   private void undeployAnnotation(AspectAnnotationLoader loader, VirtualFile file)
-   {
-      try
-      {
-         ClassFile cf = loadClassFile(file);
-         log.debug("Undeploying possibly annotated class " + cf.getName());
-         loader.undeployClassFile(cf);
-      }
-      catch (Exception e)
-      {
-         log.warn("Error reading annotations for " + file, e);
-      }
-   }
-   
-   private AspectAnnotationLoader getAnnotationLoader(AspectManager manager, VFSDeploymentUnit unit)
-   {
-      AspectAnnotationLoader loader = new AspectAnnotationLoader(manager);
-      loader.setClassLoader(unit.getClassLoader());
-      return loader;
-   }
-   
-   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 boolean isAopArchiveOrFolder(VFSDeploymentUnit unit)
-   {
-      String name = unit.getName();
-      
-      //If name is of format 'blah-blah.aop!/' get rid of the trailing '!' and '/', and see if it ends with .aop
-      int index = name.length();
-      if (name.charAt(name.length() - 1) == '/') 
-      {
-         index--;
-      }
-      if (name.charAt(name.length() - 2) == '!')
-      {
-         index--;
-      }
-      String realName = (index == name.length()) ? name : name.substring(0, index);
-      
-      return (realName.endsWith(AOP_JAR_SUFFIX));
-   }
-   
-   private AspectManager getCorrectManager(final VFSDeploymentUnit unit)
-   {
-      //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
-      //Linking a standalone -aop.xml file onto a scoped deployment is not possible at the moment
-      VFSClassLoaderScopingPolicy policy = null;
-      try
-      {
-         policy = (VFSClassLoaderScopingPolicy)AspectManager.getClassLoaderScopingPolicy();
-      }
-      catch(ClassCastException e)
-      {
-         throw new RuntimeException("Wrong policy configured " + policy);
-      }
-      
-      Domain domain = initializeDomain(policy, unit);
-      if (domain != null)
-      {
-         return domain;
-      }
-      
-      return aspectManager;
-   }
-   
-   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 Domain initializeDomain(VFSClassLoaderScopingPolicy policy, VFSDeploymentUnit unit)
-   {
-      Module module = unit.getTopLevel().getAttachment(Module.class);
-      ClassLoader loader = unit.getClassLoader();
-      ClassLoader topLoader = unit.getTopLevel().getClassLoader();
-      
-      VFSClassLoaderDomainRegistry registry = policy.getRegistry();
-      
-      boolean isWar = unit.isAttachmentPresent("org.jboss.metadata.web.jboss.JBossWebMetaData");
-
-      if (isWar && loader != topLoader)
-      {
-         ScopedVFSClassLoaderDomain scopedDomain = (ScopedVFSClassLoaderDomain)registry.getRegisteredDomain(loader);
-         if (scopedDomain == null) 
-         {
-            scopedDomain = (ScopedVFSClassLoaderDomain)registry.getRegisteredDomain(topLoader);
-         }
-         
-         if (scopedDomain != null)
-         {
-            registry.initMapsForLoader(loader, module, scopedDomain);
-         }
-
-         policy.registerClassLoader(module, isWar, loader);
-         
-         return scopedDomain;
-      }
-      else
-      {
-         ScopedVFSClassLoaderDomain scopedDomain = (ScopedVFSClassLoaderDomain)registry.getRegisteredDomain(loader);
-         if (scopedDomain == null)
-         {
-            if (!module.getDeterminedDomainName().equals(ClassLoaderSystem.DEFAULT_DOMAIN_NAME))
-            {
-               ClassLoaderSystem system = ClassLoaderSystem.getInstance();
-               String domainName = module.getDeterminedDomainName();
-               ClassLoaderDomain domain = system.getDomain(domainName);
-      
-               boolean parentDelegation = module.isJ2seClassLoadingCompliance();
-               String name = String.valueOf(System.identityHashCode(loader));
-               
-               scopedDomain = new ScopedVFSClassLoaderDomain(loader, name, parentDelegation, AspectManager.getTopLevelAspectManager(), false, domain, registry);
-            }
-      
-            registry.initMapsForLoader(loader, module, scopedDomain);
-            
-            policy.registerClassLoader(module, isWar, loader);
-         }
-         return scopedDomain;
-      }      
-   }
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectDeployment.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectDeployment.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/AspectDeployment.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,35 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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;
-
-/**
- * Here so that the AspectAppParsingDeployer can have an "output"
- * 
- * @deprecated Use the one from the aop project instead
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
- at Deprecated
-public class AspectDeployment
-{
-
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/DefaultTranslator.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/DefaultTranslator.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/DefaultTranslator.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,67 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.security.ProtectionDomain;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.util.loading.Translator;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class DefaultTranslator implements Translator
-{
-   AspectManager manager;
-   boolean translate;
-   
-   public DefaultTranslator(AspectManager manager)
-   {
-      this.manager = manager;
-   }
-
-   public void setTranslate(boolean translate)
-   {
-      this.translate = translate;
-   }
-   
-   public boolean getTranslate()
-   {
-      return translate;
-   }
-   
-   public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined,
-         ProtectionDomain protectionDomain, byte[] classfileBuffer) throws Exception
-   {
-      if (translate)
-      {
-         return manager.transform(loader, className, classBeingRedefined, protectionDomain, classfileBuffer);
-      }
-      return classfileBuffer;   
-   }
-
-   public void unregisterClassLoader(ClassLoader loader)
-   {
-   }
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/IntegrationStrategy.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/IntegrationStrategy.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/IntegrationStrategy.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.io.File;
-
-import javassist.scopedpool.ScopedClassPoolFactory;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public interface IntegrationStrategy
-{
-   void start();
-   void stop();
-   ScopedClassPoolFactory createScopedClassPoolFactory(File tmpDir) throws Exception;
-   void attachDeprecatedTranslator();
-   void detachDeprecatedTranslator();
-
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPool.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPool.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPool.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,120 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.net.URL;
-import java.security.ProtectionDomain;
-
-import javassist.CannotCompileException;
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.scopedpool.ScopedClassPoolRepository;
-
-import org.jboss.aop.classpool.AOPClassPool;
-import org.jboss.classloader.spi.base.BaseClassLoader;
-import org.jboss.logging.Logger;
-import org.jboss.virtual.plugins.context.memory.MemoryContextFactory;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class JBoss5ClassPool extends AOPClassPool
-{
-   Logger log = Logger.getLogger(JBoss5ClassPool.class);
-
-   protected URL tempURL = null;
-   // For loadClass tmpdir creation for UCL
-   protected final Object tmplock = new Object();
-   boolean closed;
-   
-   protected JBoss5ClassPool(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository, URL tmpURL)
-   {
-      super(cl, src, repository);
-      tempURL = tmpURL;
-   }
-
-   protected JBoss5ClassPool(ClassPool src, ScopedClassPoolRepository repository)
-   {
-      super(src, repository);
-   }
-
-   public boolean isUnloadedClassLoader()
-   {
-      return closed;
-   }
-
-   public void close()
-   {
-      closed = true;
-      super.close();
-   }
-
-   public Class toClass(CtClass cc, ClassLoader loader, ProtectionDomain domain) throws CannotCompileException
-   {
-      lockInCache(cc);
-      final ClassLoader myloader = getClassLoader();
-      if (myloader == null || tempURL == null)
-      {
-         return super.toClass(cc, loader, domain);
-      }
-      
-      try
-      {
-         String classFileName = getResourceName(cc.getName());
-         URL outputURL = new URL(tempURL.toString() + "/" + classFileName);
-         //Write the classfile to the temporary url
-         synchronized (tmplock)
-         {
-            ByteArrayOutputStream byteout = new ByteArrayOutputStream();
-            BufferedOutputStream out = new BufferedOutputStream(byteout);
-            out.write(cc.toBytecode());
-            out.flush();
-            out.close();
-            
-            byte[] classBytes = byteout.toByteArray();
-            MemoryContextFactory factory = MemoryContextFactory.getInstance();
-            factory.putFile(outputURL, classBytes);
-
-            if (myloader instanceof BaseClassLoader)
-            {
-               //Update check to RealClassLoader once integration project catches up
-               ((BaseClassLoader)myloader).clearBlackList(classFileName);
-               
-            }
-            
-            Class clazz = myloader.loadClass(cc.getName());
-
-            return clazz;
-         }
-      }
-      catch(Exception e)
-      {
-       ClassFormatError cfe = new ClassFormatError("Failed to load dyn class: " + cc.getName() + " on " + this + " loader:" + myloader);
-       cfe.initCause(e);
-       throw cfe;
-      }
-   }
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,77 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., 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.net.URL;
-import java.util.Map;
-
-import javassist.ClassPool;
-import javassist.scopedpool.ScopedClassPool;
-import javassist.scopedpool.ScopedClassPoolFactory;
-import javassist.scopedpool.ScopedClassPoolRepository;
-import org.jboss.aop.classpool.AOPClassPool;
-import org.jboss.aop.classpool.AbstractJBossClassPoolFactory;
-import org.jboss.aop.classpool.ExtraClassPoolFactoryParameters;
-import org.jboss.classloader.spi.ClassLoaderDomain;
-import org.jboss.classloader.spi.ClassLoaderSystem;
-import org.jboss.classloading.spi.RealClassLoader;
-import org.jboss.classloading.spi.dependency.Module;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision: 64815 $
- **/
-public class JBoss5ClassPoolFactory extends AbstractJBossClassPoolFactory implements ScopedClassPoolFactory
-{
-   public ScopedClassPool create(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository)
-   {      
-      ClassPool parent = getCreateParentClassPools(cl, src, repository);
-      Map props = ExtraClassPoolFactoryParameters.peekThreadProperties();
-      boolean isWebCl = props == null ? false : ((Boolean)props.get("IsWebCl")).booleanValue();
-      if (!isWebCl && cl instanceof RealClassLoader)
-      {
-         Module module = props == null ? null : (Module)props.get(Module.class);
-         if (module != null && module.getDeterminedParentDomainName() != null)
-         {
-            //It is scoped
-            ClassLoaderSystem sys = ClassLoaderSystem.getInstance();
-            ClassLoaderDomain domain = sys.getDomain(module.getDeterminedDomainName());
-            boolean parentFirst = module.isJ2seClassLoadingCompliance();
-            
-            return new ScopedJBoss5ClassPool(cl, parent, repository, getTempURL(module), parentFirst, domain);
-         }
-         return new JBoss5ClassPool(cl, parent, repository, getTempURL(module));
-      }
-      return new AOPClassPool(cl, parent, repository);
-   }
-   
-   private URL getTempURL(Module module)
-   {
-      if (module == null)
-         return null;
-      
-      return module.getDynamicClassRoot();
-   }
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5Integration.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5Integration.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/JBoss5Integration.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,159 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.io.File;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javassist.ClassPool;
-import javassist.scopedpool.ScopedClassPool;
-import javassist.scopedpool.ScopedClassPoolFactory;
-import javassist.scopedpool.ScopedClassPoolRepository;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
-import org.jboss.aop.asintegration.JBossIntegration;
-import org.jboss.classloading.spi.RealClassLoader;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class JBoss5Integration implements JBossIntegration, ScopedClassPoolFactory
-{
-   /** The delegate classpool factory */
-   private ScopedClassPoolFactory delegateClassPoolFactory;
-   private AOPClassLoaderScopingPolicy policy = new VFSClassLoaderScopingPolicy();
-   private AspectManager manager = AspectManager.getTopLevelAspectManager();
-   DefaultTranslator translator = new DefaultTranslator(manager);
-   
-   private static final Set<ClassLoader> bootstrapLoaders;
-   static 
-   {
-      final Set<ClassLoader> loaders = new HashSet<ClassLoader>();
-      
-      AccessController.doPrivileged(new PrivilegedAction<Object>() {
-
-         public Object run()
-         {
-            ClassLoader loader = JBoss5Integration.class.getClassLoader();
-            while (loader != null)
-            {
-               loaders.add(loader);
-               loader = loader.getParent();
-            }
-            return null;
-         }});
-      
-      bootstrapLoaders = Collections.unmodifiableSet(loaders);
-   }
-
-   public void start()
-   {
-      getIntegrationStrategy().start();
-   }
-
-   public void stop()
-   {
-      getIntegrationStrategy().stop();
-   }
-   
-   public boolean isValidClassLoader(ClassLoader loader)
-   {
-      if(loader instanceof RealClassLoader)
-      {
-         if (((RealClassLoader) loader).isValid())
-         {
-            return true;
-         }
-      }
-      
-      if (loader == null)
-      {
-         //Bootstrap classloader
-         return true;
-      }
-      
-      if (bootstrapLoaders.contains(loader))
-      {
-         return true;
-      }
-      
-      return false;
-   }
-
-   public AOPClassLoaderScopingPolicy createAOPClassLoaderScopingPolicy()
-   {
-      return policy;
-   }
-
-   public synchronized ScopedClassPoolFactory createScopedClassPoolFactory(File tmpDir) throws Exception
-   {
-      if (delegateClassPoolFactory == null)
-      {
-         delegateClassPoolFactory = getIntegrationStrategy().createScopedClassPoolFactory(tmpDir);
-      }
-      return this;
-   }
-   
-   public ScopedClassPool create(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository)
-   {
-      return delegateClassPoolFactory.create(cl, src, repository);
-   }
-
-   public ScopedClassPool create(ClassPool src, ScopedClassPoolRepository repository)
-   {
-      return delegateClassPoolFactory.create(src, repository);
-   }
-   
-   public void attachDeprecatedTranslator()
-   {
-      getIntegrationStrategy().attachDeprecatedTranslator();
-   }
-
-   public void detachDeprecatedTranslator()
-   {
-      getIntegrationStrategy().detachDeprecatedTranslator();
-   }
-   
-   private IntegrationStrategy integrationStrategy;
-   private synchronized IntegrationStrategy getIntegrationStrategy()
-   {
-      if (integrationStrategy == null)
-      {
-         if (policy.getClass().getName().endsWith("RepositoryClassLoaderScopingPolicy"))
-         {
-            integrationStrategy = new RepositoryIntegrationStrategy();
-         }
-         else
-         {
-            integrationStrategy = new VFSIntegrationStrategy(manager);
-         }
-      }
-      return integrationStrategy;
-   }
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/MetaDataClassLoaderScopingPolicy.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/MetaDataClassLoaderScopingPolicy.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/MetaDataClassLoaderScopingPolicy.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,101 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.Map;
-import java.util.WeakHashMap;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.Domain;
-import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.spi.MetaData;
-import org.jboss.metadata.spi.stack.MetaDataStack;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class MetaDataClassLoaderScopingPolicy implements AOPClassLoaderScopingPolicy
-{
-   static Logger log = Logger.getLogger(MetaDataClassLoaderScopingPolicy.class);
-   
-   //Several loaders may share the same domain
-   private Map<ClassLoader, Domain> domainsByLoader = new WeakHashMap<ClassLoader, Domain>();
-   
-   public Domain getDomain(ClassLoader classLoader, AspectManager parent)
-   {
-      //Check metadata stack for domain to use
-      MetaData metaData = MetaDataStack.peek();
-      if (metaData != null)
-      {
-         //There is metadata on the stack, so check there. No domain in this case means use the main AM
-         Domain domain = metaData.getMetaData(Domain.class);
-         if (domain != null)
-         {
-            registerDomain(classLoader, domain);
-            return domain;
-         }
-      }      
-      
-      //Check the stored domains
-      Domain domain = getRegisteredDomain(classLoader);
-      if (domain != null)
-      {
-         return domain;
-      }
-      
-      return null;
-   }
-
-   public Domain getTopLevelDomain(AspectManager parent)
-   {
-      Thread.currentThread().getContextClassLoader();
-      return null;
-   }
-
-   public boolean isScoped(ClassLoader classLoader)
-   {
-      //TODO come up with something here?
-      return false;
-   }
-
-   private synchronized void registerDomain(ClassLoader cl, Domain domain)
-   {
-      Domain found = domainsByLoader.get(cl);
-      if (found == null)
-      {
-         domainsByLoader.put(cl, domain);
-      }
-      
-      if (found != domain)
-      {
-         log.warn("Several domains being used for a particular classloader");
-      }
-   }
-   
-   private synchronized Domain getRegisteredDomain(ClassLoader cl)
-   {
-      return domainsByLoader.get(cl);
-   }
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/RepositoryIntegrationStrategy.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/RepositoryIntegrationStrategy.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/RepositoryIntegrationStrategy.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,122 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.io.File;
-
-import javax.management.Attribute;
-import javax.management.AttributeNotFoundException;
-import javax.management.InstanceNotFoundException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.MBeanException;
-import javax.management.MBeanServer;
-import javax.management.ReflectionException;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.asintegration.jboss4.JBossClassPoolFactory;
-import org.jboss.aop.deployment.AspectManagerService;
-import org.jboss.mx.util.MBeanServerLocator;
-
-import javassist.scopedpool.ScopedClassPoolFactory;
-
-/**
- * Takes care of the specifics in JBoss 5 when the RepositoryClassLoaders are used.
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class RepositoryIntegrationStrategy implements IntegrationStrategy
-{
-   public void start()
-   {
-   }
-   
-   public void stop()
-   {
-   }
-
-   public ScopedClassPoolFactory createScopedClassPoolFactory(File tmpDir) throws Exception
-   {
-      //This is the classpool factory from jboss-aop-jboss4-jdk50.jar
-      return new JBossClassPoolFactory(tmpDir);
-   }
-
-   public void attachDeprecatedTranslator()
-   {
-      AspectManager mgr = AspectManager.instance();
-      MBeanServer server = MBeanServerLocator.locateJBoss();
-      try
-      {
-         server.setAttribute(AspectManagerService.DEFAULT_LOADER_REPOSITORY, new Attribute("Translator", mgr));
-      }
-      catch (InstanceNotFoundException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (AttributeNotFoundException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (InvalidAttributeValueException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (MBeanException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (ReflectionException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public void detachDeprecatedTranslator()
-   {
-      MBeanServer server = MBeanServerLocator.locateJBoss();
-      try
-      {
-         server.setAttribute(AspectManagerService.DEFAULT_LOADER_REPOSITORY, new Attribute("Translator", null));
-      }
-      catch (InstanceNotFoundException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (AttributeNotFoundException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (InvalidAttributeValueException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (MBeanException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (ReflectionException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedJBoss5ClassPool.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedJBoss5ClassPool.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedJBoss5ClassPool.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,308 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.lang.ref.WeakReference;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.NotFoundException;
-import javassist.scopedpool.ScopedClassPoolRepository;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.classpool.AOPClassPool;
-import org.jboss.aop.classpool.AOPClassPoolRepository;
-import org.jboss.classloader.spi.ClassLoaderDomain;
-import org.jboss.classloader.spi.Loader;
-import org.jboss.classloading.spi.RealClassLoader;
-import org.jboss.logging.Logger;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class ScopedJBoss5ClassPool extends JBoss5ClassPool
-{
-   Logger log = Logger.getLogger(ScopedJBoss5ClassPool.class);
-   
-   ThreadLocal<ClassPool> lastPool = new ThreadLocal<ClassPool>();
-   WeakReference<ClassLoaderDomain> domainRef;
-
-   public ScopedJBoss5ClassPool(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository, 
-         URL tmpURL, boolean parentFirst, ClassLoaderDomain domain)
-   {
-      super(cl, src, repository, tmpURL);
-      super.childFirstLookup = !parentFirst;
-      this.domainRef = new WeakReference<ClassLoaderDomain>(domain);
-   }
-
-   private URL getResourceUrlForClass(String resourcename)
-   {
-      ClassLoaderDomain domain = domainRef.get();
-      return domain.getResource(resourcename);
-   }
-
-   private boolean isMine(URL myURL, String resourceName)
-   {
-      if (myURL == null)
-      {
-         return false;
-      }
-      
-      ClassLoaderDomain domain = domainRef.get();
-      Loader parent = domain.getParent();
-      URL parentURL = parent.getResource(resourceName);
-      
-      if (parentURL == null)
-      {
-         return true;
-      }
-      
-      if (!myURL.equals(parentURL))
-      {
-         return true;
-      }
-      
-      return false;
-   }
-   
-   public CtClass getCached(String classname)
-   {
-      boolean trace = log.isTraceEnabled();
-      
-      if (trace)
-      {
-         log.trace("getCached() " + classname);
-      }
-      
-      if (classname == null)
-      {
-         if (trace)
-         {
-            log.trace("getCached() returning null (classname == null)");
-         }
-         return null;
-      }
-      if (isUnloadedClassLoader())
-      {
-         if (trace)
-         {
-            log.trace("getCached() returning null (unloaded)");
-         }
-         return null;
-      }
-
-      if (generatedClasses.get(classname) != null)
-      {
-         //It is a new class, and this callback is probably coming from the frozen check when creating a new nested class
-         if (trace)
-         {
-            log.trace("getCached() In generated classes - check super");
-         }
-         return super.getCached(classname);
-      }
-      
-      //Is this from the scoped classloader itself of from the parent?
-      String resourcename = getResourceName(classname);
-      URL url = getResourceUrlForClass(resourcename);
-      
-      if (isMine(url, resourcename))
-      {
-         if (super.childFirstLookup)
-         {
-            //Parent delegation is false, attempt to get this class out of ourselves
-            CtClass clazz = super.getCachedLocally(classname);
-            if (clazz == null)
-            {
-               if (trace)
-               {
-                  log.trace("getCached() Creating my class " + classname);
-               }
-               clazz = createCtClass(classname, false);
-               if (clazz != null)
-               {
-                  lockInCache(clazz);
-               }
-            }
-            if (clazz != null)
-            {
-               if (trace)
-               {
-                  log.trace("getCached() Returning my class " + classname);
-               }
-               return clazz;
-            }
-         }
-         if (trace)
-         {
-            log.trace("getCached() Checking super for my class " + classname);
-         }
-         return super.getCached(classname);
-      }
-      else if (url == null)
-      {
-         if (trace)
-         {
-            log.trace("getCached() Checking super for my class " + classname + " (no url)");
-         }
-         return super.getCached(classname);
-      }
-      
-
-      try
-      {
-         ClassPool pool = getCorrectPoolForResource(classname, resourcename, url, trace);
-         if (trace)
-         {
-            log.trace("getCached() Found pool for class " + classname + " " + pool);
-         }
-         if (pool != lastPool.get())
-         {
-            lastPool.set(pool);
-            CtClass found = pool.get(classname);
-            if (trace)
-            {
-               log.trace("getCached() Found clazz " + classname + " in " + pool + " : " + found);
-            }
-            return found;
-         }
-      }
-      catch (NotFoundException e)
-      {
-      }
-      catch(StackOverflowError e)
-      {
-         throw e;
-      }
-      finally
-      {
-         lastPool.set(null);
-      }
-
-      return null;
-   }
-   
-   @Override
-   protected boolean includeInGlobalSearch()
-   {
-      return false;
-   } 
-   
-   private ClassPool getCorrectPoolForResource(String classname, String resourceName, URL url, boolean trace)
-   {
-      synchronized(AspectManager.getRegisteredCLs())
-      {
-         //JBoss 5 has an extra NoAnnotationURLCLassLoader that is not on the default path, make sure that that is checked at the end
-         //FIXME This needs revisiting/removing once the 
-         ArrayList<ClassPool> noAnnotationURLClassLoaderPools = null;
-                 
-         for(Iterator it = AspectManager.getRegisteredCLs().values().iterator() ; it.hasNext() ; )
-         {
-            AOPClassPool candidate = (AOPClassPool)it.next();
-            if (candidate.isUnloadedClassLoader())
-            {
-               AspectManager.instance().unregisterClassLoader(candidate.getClassLoader());
-               continue;
-            }
-            
-            if (candidate.getClassLoader() instanceof RealClassLoader)
-            {
-               //Sometimes the ClassLoader is a proxy for MBeanProxyExt?!
-               RealClassLoader bcl = (RealClassLoader)candidate.getClassLoader();
-               URL foundUrl = bcl.getResourceLocally(resourceName);
-               if (foundUrl != null)
-               {
-                  if (url.equals(foundUrl))
-                  {
-                     if (trace)
-                     {
-                        log.trace("getCorrectPoolForResource() Candidate classloader " + bcl + " has local resource " + foundUrl);
-                     }
-                     return candidate;
-                  }
-               }
-            }
-            //FIXME Remove once we have the JBoss 5 version of pool
-            else if (isInstanceOfNoAnnotationURLClassLoader(candidate.getClassLoader()))
-            {
-               if (noAnnotationURLClassLoaderPools == null)
-               {
-                  noAnnotationURLClassLoaderPools = new ArrayList<ClassPool>(); 
-               }
-               noAnnotationURLClassLoaderPools.add(candidate);
-            }
-         }
-         
-         //FIXME Remove once we have the JBoss 5 version of pool
-         if (noAnnotationURLClassLoaderPools != null)
-         {
-            for (ClassPool pool : noAnnotationURLClassLoaderPools)
-            {
-               try
-               {
-                  pool.get(classname);
-                  if (trace)
-                  {
-                     log.trace("getCorrectPoolForResource(() Found  " + classname + " (no url)");
-                  }
-                  return pool;
-               }
-               catch(NotFoundException ignoreTryNext)
-               {
-               }
-            }
-         }
-      }
-      return createTempPool();
-   }
-   
-   private ClassPool createTempPool()
-   {
-      //Rememeber that the stuff in jboss5/lib goes in a child classloader of the default classloader. We need
-      //to make this the parent of the temp classloader
-      ClassLoader aopLoader = AspectManager.class.getClassLoader();
-      ClassPool pool = AspectManager.instance().registerClassLoader(aopLoader);
-      return AOPClassPool.createAOPClassPool(pool, AOPClassPoolRepository.getInstance());
-   }
-   
-   /**
-    * NoAnnotationURLCLassLoader lives in different packages in JBoss 4 and 5
-    */
-   private boolean isInstanceOfNoAnnotationURLClassLoader(ClassLoader loader)
-   {
-      Class parent = loader.getClass();
-      while (parent != null)
-      {
-         if ("NoAnnotationURLClassLoader".equals(parent.getSimpleName()))
-         {
-            return true;
-         }
-         parent = parent.getSuperclass();
-      }
-      return false;
-   }
-   
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,134 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., 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.lang.ref.WeakReference;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.advice.AspectDefinition;
-import org.jboss.aop.domain.ScopedClassLoaderDomain;
-import org.jboss.classloader.spi.ClassLoaderDomain;
-
-
-/**
- * A domain that is used for scoped classloaders with the new JBoss 5 classloaders 
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @author adrian at jboss.org
- * @version $Revision: 1.1 $
- */
-public class ScopedVFSClassLoaderDomain extends ScopedClassLoaderDomain
-{
-   WeakReference<ClassLoaderDomain> classLoaderDomainRef;
-   VFSClassLoaderDomainRegistry registry;
-   
-   public ScopedVFSClassLoaderDomain(ClassLoader loader, String name, boolean parentDelegation, AspectManager manager, boolean parentFirst, 
-         ClassLoaderDomain classLoaderDomain, VFSClassLoaderDomainRegistry registry)
-   {
-      super(loader, name, parentDelegation, manager, parentFirst);
-      classLoaderDomainRef = new WeakReference<ClassLoaderDomain>(classLoaderDomain);
-      this.registry = registry;
-   }
-
-   private ClassLoaderDomain getClassLoaderDomain()
-   {
-      if (classLoaderDomainRef != null)
-      {
-         return classLoaderDomainRef.get();
-      }
-      return null;
-   }
-   
-   // FIXME: JBAOP-107 REMOVE THIS HACK
-   public boolean isValid()
-   {
-      ClassLoader cl = getClassLoader();
-      if (cl == null)
-         return false;
-    
-      ClassLoaderDomain domain = getClassLoaderDomain();
-      if (domain == null)
-         return false;
-      
-      if (domain.hasClassLoaders())
-      {
-         return true;
-      }
-      
-      return false;
-//      return cl.getLoaderRepository() != null;
-   }
-
-   protected Object getPerVmAspectWithNoParentDelegation(String def)
-   {
-      Object aspect = myPerVMAspects.get(def);
-      if (aspect != null)
-      {
-         return aspect;
-      }
-
-      aspect = super.getSuperPerVmAspect(def);
-      if (aspect != null)
-      {
-         Class superAspectClass = aspect.getClass();
-         ClassLoaderDomain loadingDomain = getAspectRepository(superAspectClass);
-
-         ClassLoaderDomain myDomain = getClassLoaderDomain();
-         
-         if (loadingDomain == myDomain)
-         {
-            //The parent does not load this class
-            myPerVMAspects.put(def, aspect);
-         }
-         else
-         {
-            //The class has been loaded by a parent domain, find out if we also have a copy
-            Class myAspectClazz = myDomain.loadClass(aspect.getClass().getName());
-            
-            if (myAspectClazz == superAspectClass)
-            {
-               notMyPerVMAspects.put(def, Boolean.TRUE);
-            }
-            else
-            {
-               //We have a different version of the class deployed
-               AspectDefinition aspectDefinition = getAspectDefinition(def);
-               //Override the classloader to create the aspect instance
-               aspect = createPerVmAspect(def, aspectDefinition, getClassLoader());
-               myPerVMAspects.put(def, aspect);
-            }
-         }
-      }
-      
-      return aspect;
-   }
-   
-   
-   
-   private ClassLoaderDomain getAspectRepository(Class clazz)
-   {
-      ClassLoader cl = clazz.getClassLoader();
-      ClassLoaderDomain domain = registry.getClassLoaderDomainForLoader(cl);
-      return domain;
-   }
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderDomainRegistry.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderDomainRegistry.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderDomainRegistry.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,92 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.lang.ref.WeakReference;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import org.jboss.aop.Domain;
-import org.jboss.classloader.spi.ClassLoaderDomain;
-import org.jboss.classloader.spi.ClassLoaderSystem;
-import org.jboss.classloading.spi.dependency.Module;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class VFSClassLoaderDomainRegistry
-{
-   final static ClassLoaderDomain domain = new ClassLoaderDomain("NOT_USED_PLACEHOLDER");
-   
-   /** classloader domains by their classloaders */
-   private Map<ClassLoader, WeakReference<ClassLoaderDomain>> classLoaderDomainsByLoader = new WeakHashMap<ClassLoader, WeakReference<ClassLoaderDomain>>();
-
-   /** aopDomains by classloader domain */
-   private Map<ClassLoaderDomain, ScopedVFSClassLoaderDomain> aopDomainsByClassLoaderDomain = new WeakHashMap<ClassLoaderDomain, ScopedVFSClassLoaderDomain>();
-
-   synchronized void initMapsForLoader(ClassLoader loader, Module module, ScopedVFSClassLoaderDomain domain)
-   {
-      ClassLoaderSystem system = ClassLoaderSystem.getInstance();
-      
-      String domainName = module.getDeterminedDomainName();
-      ClassLoaderDomain clDomain = system.getDomain(domainName);
-      classLoaderDomainsByLoader.put(loader, new WeakReference<ClassLoaderDomain>(clDomain));
-      
-      if (domain != null)
-      {
-         aopDomainsByClassLoaderDomain.put(clDomain, domain);
-      }
-   }
-
-   synchronized Domain getRegisteredDomain(ClassLoader cl)
-   {
-      ClassLoaderDomain clDomain = getClassLoaderDomainForLoader(cl);
-      if (clDomain != null)
-      {
-         return aopDomainsByClassLoaderDomain.get(clDomain);
-      }
-      return null;
-   }
-   
-   synchronized ClassLoaderDomain getClassLoaderDomainForLoader(ClassLoader cl)
-   {
-      WeakReference<ClassLoaderDomain> clDomainRef = classLoaderDomainsByLoader.get(cl);
-      if (clDomainRef != null)
-      {
-         return clDomainRef.get();
-      }
-      
-      ClassLoader parent = cl.getParent();
-      if (parent != null)
-      {
-         ClassLoaderDomain domain = getClassLoaderDomainForLoader(parent);
-         if (domain != null)
-         {
-            classLoaderDomainsByLoader.put(parent, new WeakReference<ClassLoaderDomain>(domain));
-            return domain;
-         }
-      }
-      return null;
-   }
-}

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,85 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.HashMap;
-import java.util.Map;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.Domain;
-import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
-import org.jboss.aop.classpool.ExtraClassPoolFactoryParameters;
-import org.jboss.classloading.spi.dependency.Module;
-import org.jboss.logging.Logger;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class VFSClassLoaderScopingPolicy implements AOPClassLoaderScopingPolicy
-{
-   static Logger log = Logger.getLogger(VFSClassLoaderScopingPolicy.class);
-   VFSClassLoaderDomainRegistry registry = new VFSClassLoaderDomainRegistry();
-   
-   VFSClassLoaderDomainRegistry getRegistry()
-   {
-      return registry;
-   }
-
-   void registerClassLoader(Module module, boolean isWar, ClassLoader loader)
-   {
-      //Need to pass some data through to the classpoolfactory here
-      Map properties = new HashMap();
-      //The module is needed by the JBoss5ClassPoolFactory, the legacy JBossClassPoolFactory will ignore this
-      properties.put(Module.class, module);
-      properties.put("IsWebCl", isWar ? Boolean.TRUE : Boolean.FALSE);
-      ExtraClassPoolFactoryParameters.pushThreadProperties(properties);
-      try
-      {
-         AspectManager.instance().registerClassLoader(loader); //Ends up in classpool factory create method
-      }
-      finally
-      {
-         ExtraClassPoolFactoryParameters.popThreadProperties();
-      }
-   }
-   
-   public Domain getDomain(ClassLoader classLoader, AspectManager parent)
-   {
-      //Check the stored domains
-      Domain domain = registry.getRegisteredDomain(classLoader);
-      if (domain != null)
-      {
-         return domain;
-      }
-      
-      return null;
-   }
-
-   public Domain getTopLevelDomain(AspectManager parent)
-   {
-      Thread.currentThread().getContextClassLoader();
-      return null;
-   }
-}
-   

Deleted: trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSIntegrationStrategy.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSIntegrationStrategy.java	2008-10-03 15:26:57 UTC (rev 79097)
+++ trunk/aspects/src/main/org/jboss/aop/asintegration/jboss5/VFSIntegrationStrategy.java	2008-10-03 15:28:39 UTC (rev 79098)
@@ -1,71 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.io.File;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.classloader.spi.ClassLoaderSystem;
-
-import javassist.scopedpool.ScopedClassPoolFactory;
-
-/**
- * Takes care of the specifics in JBoss 5 when the RepositoryClassLoaders are used.
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class VFSIntegrationStrategy implements IntegrationStrategy
-{
-   DefaultTranslator translator;
-
-   public VFSIntegrationStrategy(AspectManager manager)
-   {
-      this.translator = new DefaultTranslator(manager);
-   }
-   
-   public void start()
-   {
-      ClassLoaderSystem.getInstance().setTranslator(translator);      
-   }
-
-   public void stop()
-   {
-      ClassLoaderSystem.getInstance().setTranslator(null);
-   }
-
-   public ScopedClassPoolFactory createScopedClassPoolFactory(File tmpDir) throws Exception
-   {
-      return new JBoss5ClassPoolFactory();
-   }
-
-   public void attachDeprecatedTranslator()
-   {
-      translator.setTranslate(true);      
-   }
-
-   public void detachDeprecatedTranslator()
-   {
-      translator.setTranslate(false);      
-   }
-
-}




More information about the jboss-cvs-commits mailing list