[jboss-cvs] JBossAS SVN: r102785 - in projects/aop/branches/Branch_2_2: aop/src/main/java/org/jboss/aop and 21 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 23 09:47:55 EDT 2010


Author: flavia.rainone at jboss.com
Date: 2010-03-23 09:47:52 -0400 (Tue, 23 Mar 2010)
New Revision: 102785

Added:
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPDomainRegistry.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPVFSClassLoaderDomainRegistry.java
Removed:
   projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/classpool/
   projects/aop/branches/Branch_2_2/asintegration-core/src/test/
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBossClassPool.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBossClassPoolFactory.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/LoaderRepositoryUrlUtil.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ScopedJBossClassPool.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ScopedRepositoryClassLoaderHelper.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/SecurityActions.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ToClassInvoker.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ToClassInvokerPoolReference.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/classpool/ucl/
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/test/
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/DomainRegistry.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5ClassPool.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/RegisterModuleCallback.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ScopedJBoss5ClassPool.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ToClassInvoker.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ToClassInvokerPoolReference.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderDomainRegistry.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/classpool/jbosscl/
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/deployers/temp/
   projects/aop/branches/Branch_2_2/asintegration-mc/src/test/java/org/jboss/aop/integration/junit/NotWovenAOPIntegrationTest.java
Modified:
   projects/aop/branches/Branch_2_2/aop/.classpath
   projects/aop/branches/Branch_2_2/aop/src/main/java/org/jboss/aop/Domain.java
   projects/aop/branches/Branch_2_2/aophelper/.classpath
   projects/aop/branches/Branch_2_2/asintegration-core/.classpath
   projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/asintegration/JBossIntegration.java
   projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java
   projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/deployment/AbstractAspectManagerService.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/.classpath
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBoss4Integration.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/RepositoryClassLoaderScopingPolicy.java
   projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/deployment/AspectDeployer.java
   projects/aop/branches/Branch_2_2/asintegration-mc/.classpath
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPClassLoaderInitializer.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPClassLoaderScopingPolicyWithRegistry.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5Integration.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java
   projects/aop/branches/Branch_2_2/asintegration-mc/src/test/java/org/jboss/aop/integration/junit/AOPIntegrationTest.java
   projects/aop/branches/Branch_2_2/aspects/.classpath
   projects/aop/branches/Branch_2_2/build/.classpath
   projects/aop/branches/Branch_2_2/deployers/.classpath
   projects/aop/branches/Branch_2_2/pluggable-instrumentor/.classpath
Log:
[JBAOP-772]Ported the rest of major changes

Modified: projects/aop/branches/Branch_2_2/aop/.classpath
===================================================================
--- projects/aop/branches/Branch_2_2/aop/.classpath	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/aop/.classpath	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,10 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry excluding="org/jboss/aop/hook/JRockit*" kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="docs"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/etc"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="docs" including="jboss-aop_1_0.dtd|jboss-aop_2_0.xsd" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/etc" including="jbossorg-eula.txt" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/aop/src/main/java/org/jboss/aop/Domain.java
===================================================================
--- projects/aop/branches/Branch_2_2/aop/src/main/java/org/jboss/aop/Domain.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/aop/src/main/java/org/jboss/aop/Domain.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -88,6 +88,11 @@
       manager.addSubDomainByName(this);
    }
 
+   public AspectManager getParent()
+   {
+      return parent;
+   }
+   
    /**
     * Creates the binding collection to be used as the collection by this domain
     * @return a {@link DomainClassifiedBindingAndPointcutCollection}

Modified: projects/aop/branches/Branch_2_2/aophelper/.classpath
===================================================================
--- projects/aop/branches/Branch_2_2/aophelper/.classpath	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/aophelper/.classpath	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/asintegration-core/.classpath
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/.classpath	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-core/.classpath	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,10 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/asintegration/JBossIntegration.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/asintegration/JBossIntegration.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/asintegration/JBossIntegration.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,32 +1,31 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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;
 
 import java.io.File;
 
-import javassist.scopedpool.ScopedClassPoolFactory;
-
 import org.jboss.aop.ClassLoaderValidation;
 import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
+import org.jboss.classpool.scoped.ScopedClassPoolFactory;
 
 /**
  * AOPIntegration.<p>

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,24 +1,24 @@
 /*
-* 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.
-*/ 
+ * 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.core;
 
 import java.io.BufferedInputStream;
@@ -33,9 +33,6 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 
-import javassist.ClassPool;
-import javassist.scopedpool.ScopedClassPoolFactory;
-
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.jboss.aop.AspectManager;
@@ -56,6 +53,8 @@
 import org.jboss.aop.instrument.TransformerCommon;
 import org.jboss.aop.introduction.InterfaceIntroduction;
 import org.jboss.aop.pointcut.Pointcut;
+import org.jboss.classpool.scoped.ScopedClassPool;
+import org.jboss.classpool.scoped.ScopedClassPoolFactory;
 import org.jboss.logging.Logger;
 import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
@@ -728,7 +727,7 @@
 
    public String registeredClassLoaders()
    {
-      Map<ClassLoader, ClassPool> loaders = AspectManager.getRegisteredCLs();
+      Map<ClassLoader, ScopedClassPool> loaders = AspectManager.getRegisteredCLs();
       StringBuffer buffer = new StringBuffer("");
       for (ClassLoader loader : loaders.keySet())
       {

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/deployment/AbstractAspectManagerService.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/deployment/AbstractAspectManagerService.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/main/java/org/jboss/aop/deployment/AbstractAspectManagerService.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,35 +1,34 @@
 /*
-* 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.
-*/
+ * 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.deployment;
 
 import java.io.File;
 
-import javassist.scopedpool.ScopedClassPoolFactory;
-
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.AspectNotificationHandler;
 import org.jboss.aop.ClassLoaderValidation;
 import org.jboss.aop.asintegration.JBossIntegration;
 import org.jboss.aop.asintegration.core.AspectManagerServiceDelegate;
+import org.jboss.classpool.scoped.ScopedClassPoolFactory;
 import org.jboss.logging.Logger;
 
 /**

Modified: projects/aop/branches/Branch_2_2/asintegration-jmx/.classpath
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/.classpath	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/.classpath	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,10 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBoss4Integration.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBoss4Integration.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBoss4Integration.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,33 +1,30 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.jboss4;
 
 import java.io.File;
 import java.lang.reflect.Constructor;
 
 import javassist.ClassPool;
-import javassist.scopedpool.ScopedClassPool;
-import javassist.scopedpool.ScopedClassPoolFactory;
-import javassist.scopedpool.ScopedClassPoolRepository;
 
 import javax.management.Attribute;
 import javax.management.AttributeNotFoundException;
@@ -41,8 +38,18 @@
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.asintegration.JBossIntegration;
 import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
-import org.jboss.aop.classpool.ucl.JBossUclDelegatingClassPoolFactory;
 import org.jboss.aop.domain.ScopedRepositoryClassLoaderDomain;
+import org.jboss.classpool.plugins.ucl.JBossClassPool;
+import org.jboss.classpool.plugins.ucl.JBossClassPoolFactory;
+import org.jboss.classpool.plugins.ucl.LoaderRepositoryUrlUtil;
+import org.jboss.classpool.plugins.ucl.ScopedJBossClassPool;
+import org.jboss.classpool.plugins.ucl.ScopedRepositoryClassLoaderHelper;
+import org.jboss.classpool.plugins.ucl.UclDelegatingClassPoolFactory;
+import org.jboss.classpool.scoped.ScopedClassPool;
+import org.jboss.classpool.scoped.ScopedClassPoolFactory;
+import org.jboss.classpool.scoped.ScopedClassPoolRepository;
+import org.jboss.classpool.spi.AbstractClassPoolFactory;
+import org.jboss.classpool.spi.ClassPoolRepository;
 import org.jboss.logging.Logger;
 import org.jboss.mx.loading.HeirarchicalLoaderRepository3;
 import org.jboss.mx.loading.RepositoryClassLoader;
@@ -124,13 +131,14 @@
    public ScopedClassPoolFactory createScopedClassPoolFactory(File tmpDir) throws Exception
    {
       String classname = getClassPoolFactoryClassName();
+      AbstractClassPoolFactory abstractClassPoolFactory = null;
       if (classname.equals(JBossClassPoolFactory.class.getName()))
       {
-         delegateClassPoolFactory = new JBossClassPoolFactory(tmpDir);
+         abstractClassPoolFactory = new JBossClassPoolFactory(tmpDir);
       }
-      else if (classname.equals(JBossUclDelegatingClassPoolFactory.class.getName()))
+      else if (classname.equals(UclDelegatingClassPoolFactory.class.getName()))
       {
-         delegateClassPoolFactory = new JBossUclDelegatingClassPoolFactory(tmpDir);
+         abstractClassPoolFactory = new UclDelegatingClassPoolFactory(tmpDir);
       }
       else
       {
@@ -139,16 +147,18 @@
          {
             Class<?> clazz = Class.forName(classname);
             Constructor<?> ctor = clazz.getConstructor(File.class);
-            delegateClassPoolFactory = (ScopedClassPoolFactory)ctor.newInstance(tmpDir);
+            abstractClassPoolFactory = (AbstractClassPoolFactory)ctor.newInstance(tmpDir);
          }
          catch(Exception e)
          {
             logger.warn("Error instantiating " + classname + " defaulting to " + JBossClassPoolFactory.class.getName());
             classPoolFactoryClassName = classname;
             createScopedClassPoolFactory(tmpDir);
+            return this;
          }
       }
-         
+      ClassPoolRepository.getInstance().setClassPoolFactory(abstractClassPoolFactory);
+      delegateClassPoolFactory = abstractClassPoolFactory;
       return this;
    }
    

Deleted: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBossClassPool.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBossClassPool.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBossClassPool.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,84 +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.jboss4;
-
-import java.io.File;
-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.mx.loading.RepositoryClassLoader;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision$
- */
-public class JBossClassPool extends AOPClassPool implements ToClassInvokerPoolReference
-{
-   ToClassInvoker toClassInvoker = null;
-   
-   protected JBossClassPool(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository, File tmp, URL tmpURL)
-   {
-      super(cl, src, repository);
-      toClassInvoker = new ToClassInvoker(tmp);
-   }
-
-   protected JBossClassPool(ClassPool src, ScopedClassPoolRepository repository)
-   {
-      super(src, repository);
-   }
-
-   public boolean isUnloadedClassLoader()
-   {
-      if (getClassLoader() instanceof RepositoryClassLoader)
-      {
-         RepositoryClassLoader rcl = (RepositoryClassLoader) getClassLoader();
-         return rcl.getLoaderRepository() == null;
-      }
-      return false;
-   }
-
-   public Class<?> toClass(CtClass cc, ClassLoader loader, ProtectionDomain domain) throws CannotCompileException
-   {
-      return toClassInvoker.toClass(this, cc, getResourceName(cc.getName()), loader, domain);
-   }
-
-   public Class<?> superPoolToClass(CtClass cc, ClassLoader loader, ProtectionDomain domain) throws CannotCompileException
-   {
-      return super.toClass(cc, loader, domain);
-   }
-
-   @Override
-   public void lockInCache(CtClass clazz)
-   {
-      super.lockInCache(clazz);
-      localResources.put(getResourceName(clazz.getName()), Boolean.TRUE);
-   }
-}

Deleted: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBossClassPoolFactory.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBossClassPoolFactory.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/JBossClassPoolFactory.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,129 +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.jboss4;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.aop.classpool.AOPClassPool;
-import org.jboss.aop.classpool.AbstractJBossClassPoolFactory;
-import org.jboss.mx.loading.RepositoryClassLoader;
-import javassist.ClassPool;
-import javassist.scopedpool.ScopedClassPool;
-import javassist.scopedpool.ScopedClassPoolFactory;
-import javassist.scopedpool.ScopedClassPoolRepository;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @author adrian at jboss.org
- * @version $Revision$
- **/
-public class JBossClassPoolFactory extends AbstractJBossClassPoolFactory implements ScopedClassPoolFactory
-{
-   protected File tmpClassesDir;
-
-   public JBossClassPoolFactory(File tmpClassesDir) throws IOException
-   {
-      this.tmpClassesDir = tmpClassesDir;
-
-   }
-   public ScopedClassPool create(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository)
-   {
-      ClassPool parent = getCreateParentClassPools(cl, src, repository);
-      if (cl instanceof RepositoryClassLoader)
-      {
-         File tempdir = getTempDirectory(cl);
-         URL tmpCP;
-         try
-         {
-            tmpCP = createURLAndAddToLoader(cl, tempdir);
-         }
-         catch (IOException e)
-         {
-            throw new RuntimeException(e);
-         }
-         if (ScopedRepositoryClassLoaderHelper.isScopedClassLoader(cl))
-         {
-            //It is scoped
-            return new ScopedJBossClassPool(cl, parent, repository, tempdir, tmpCP);
-         }
-         return new JBossClassPool(cl, parent, repository, tempdir, tmpCP);
-      }
-      return new AOPClassPool(cl, parent, repository);
-   }
-
-   protected File getTempDirectory(ClassLoader cl)
-   {
-      File tempdir = null;
-      int attempts = 0;
-      IOException ex = null;
-      while (tempdir == null && attempts < 5)
-      {
-         //Workaround for JBAOP-254, retry a few times
-         try
-         {
-            tempdir = createTempDir(cl);
-         }
-         catch (IOException e)
-         {
-            ex = e;
-         }
-      }
-      
-      if (tempdir == null)
-      {
-         throw new RuntimeException("", ex);
-      }
-      
-      return tempdir;
-   }
-
-   public File createTempDir(ClassLoader cl) throws IOException
-   {
-      File tempdir = File.createTempFile("ucl", "", tmpClassesDir);
-      tempdir.delete();
-      tempdir.mkdir();
-      tempdir.deleteOnExit();
-
-      return tempdir;
-   }
-   
-   private URL createURLAndAddToLoader(ClassLoader cl, File tempdir) throws IOException
-   {
-      URL tmpURL = tempdir.toURL();
-      URL tmpCP = new URL(tmpURL, "?dynamic=true");
-
-      RepositoryClassLoader ucl = (RepositoryClassLoader) cl;
-
-      // We may be undeploying.
-      if (ucl.getLoaderRepository() != null)
-      {
-         ucl.addURL(tmpCP);
-      }
-      
-      return tmpCP;
-   }
-
-}

Deleted: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/LoaderRepositoryUrlUtil.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/LoaderRepositoryUrlUtil.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/LoaderRepositoryUrlUtil.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,173 +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.jboss4;
-
-import java.net.URL;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanServer;
-import javax.management.Notification;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-
-import org.jboss.mx.loading.HeirarchicalLoaderRepository3;
-import org.jboss.mx.loading.LoaderRepository;
-import org.jboss.mx.util.MBeanServerLocator;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class LoaderRepositoryUrlUtil implements NotificationListener
-{
-   final static MBeanServer SERVER;
-   final static ObjectName MAIN_LOADER_REPOSITORY_OBJECT_NAME;
-   final static LoaderRepository MAIN_LOADER_REPOSITORY;
-   static
-   {
-      SERVER = MBeanServerLocator.locateJBoss();
-      try
-      {
-         MAIN_LOADER_REPOSITORY_OBJECT_NAME = new ObjectName("JMImplementation:name=Default,service=LoaderRepository");
-         MAIN_LOADER_REPOSITORY = (LoaderRepository)SERVER.invoke(MAIN_LOADER_REPOSITORY_OBJECT_NAME, "getInstance", new Object[0], new String[0]);
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-   
-   long currentSequenceNumber;
-   long lastSequenceNumber = -1;
-   URL[] urls;
-   
-   public LoaderRepositoryUrlUtil()
-   {
-      try
-      {
-         SERVER.addNotificationListener(MAIN_LOADER_REPOSITORY_OBJECT_NAME, this, null, null);
-      }
-      catch (InstanceNotFoundException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public synchronized void handleNotification(Notification notification, Object handback)
-   {
-      if (notification.getType().equals(LoaderRepository.CLASSLOADER_ADDED))
-      {
-         currentSequenceNumber = notification.getSequenceNumber();
-      }
-      else if (notification.getType().equals(LoaderRepository.CLASSLOADER_REMOVED))
-      {
-         currentSequenceNumber = notification.getSequenceNumber();
-      }
-   }
-   
-   public synchronized UrlInfo getURLInfo(HeirarchicalLoaderRepository3 scopedLoader, UrlInfo urlInfo)
-   {
-      boolean changed = false;
-      if (lastSequenceNumber != currentSequenceNumber)
-      {
-         urls = MAIN_LOADER_REPOSITORY.getURLs();
-         lastSequenceNumber = currentSequenceNumber;
-         changed = true;
-      }
-      if (!changed)
-      {
-         changed = urlInfo != null && (urlInfo.getSequenceNumber() != lastSequenceNumber);
-      }
-      if (urlInfo == null || changed)
-      {
-         URL[] localUrls = getLocalUrls(scopedLoader, urls);
-         urlInfo = new UrlInfo(urls, localUrls, lastSequenceNumber);
-      }
-      return urlInfo;
-   }
-   
-   public long getCurrentSequenceNumber()
-   {
-      return currentSequenceNumber;
-   }
-   
-   private URL[] getLocalUrls(HeirarchicalLoaderRepository3 scopedRepository, URL[] globalUrls)
-   {
-      URL[] scopedRepositoryUrls = scopedRepository.getURLs();
-
-      //This is a bit of a hack, since this relies on the order of the urls returned by HeirarchicalLoaderRepository3
-      //My urls, followed by parent urls.
-      int scopedLength = 0;
-      for (int i = 0 ; i < scopedRepositoryUrls.length ; i++)
-      {
-         for (int j = 0 ; j < globalUrls.length ; j ++)
-         {
-            if (scopedRepositoryUrls[i].equals(globalUrls[j]))
-            {
-               scopedLength = i;
-               break;
-            }
-         }
-         if (scopedLength > 0)
-         {
-            break;
-         }
-      }
-      
-      URL[] localUrls = new URL[scopedLength];
-      System.arraycopy(scopedRepositoryUrls, 0, localUrls, 0, scopedLength);
-      return localUrls;
-   }
-   
-   public class UrlInfo
-   {
-      
-      URL[] globalUrls;
-      URL[] localUrls;
-      long sequenceNumber;
-
-      public UrlInfo(URL[] globalUrls, URL[] localUrls, long sequenceNumber)
-      {
-         super();
-         this.globalUrls = globalUrls;
-         this.localUrls = localUrls;
-         this.sequenceNumber = sequenceNumber;
-      }
-      
-      public URL[] getGlobalUrls()
-      {
-         return globalUrls;
-      }
-      
-      public URL[] getLocalUrls()
-      {
-         return localUrls;
-      }
-
-      public long getSequenceNumber()
-      {
-         return sequenceNumber;
-      }
-   }
-   
-}

Modified: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/RepositoryClassLoaderScopingPolicy.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/RepositoryClassLoaderScopingPolicy.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/RepositoryClassLoaderScopingPolicy.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,24 +1,24 @@
 /*
-* 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.
-*/ 
+ * 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.jboss4;
 
 import java.util.Map;
@@ -27,8 +27,9 @@
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.Domain;
 import org.jboss.aop.classpool.AOPClassLoaderScopingPolicy;
-import org.jboss.aop.classpool.AOPClassPoolRepository;
 import org.jboss.aop.domain.ScopedRepositoryClassLoaderDomain;
+import org.jboss.classpool.plugins.ucl.ScopedRepositoryClassLoaderHelper;
+import org.jboss.classpool.spi.ClassPoolRepository;
 import org.jboss.logging.Logger;
 import org.jboss.mx.loading.HeirarchicalLoaderRepository3;
 import org.jboss.mx.loading.RepositoryClassLoader;
@@ -51,7 +52,7 @@
       if (scopedClassLoader != null)
       {
          Domain scopedManager = null;
-         synchronized (AOPClassPoolRepository.getInstance().getRegisteredCLs())
+         synchronized (ClassPoolRepository.getInstance().getRegisteredCLs())
          {
             Object loaderRepository = getLoaderRepository(classLoader);
             scopedManager = scopedClassLoaderDomains.get(loaderRepository);

Deleted: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ScopedJBossClassPool.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ScopedJBossClassPool.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ScopedJBossClassPool.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,273 +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.jboss4;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.classpool.AOPClassPool;
-import org.jboss.aop.classpool.AOPClassPoolRepository;
-import org.jboss.aop.asintegration.jboss4.LoaderRepositoryUrlUtil.UrlInfo;
-import org.jboss.mx.loading.HeirarchicalLoaderRepository3;
-import org.jboss.mx.loading.LoaderRepository;
-import org.jboss.mx.loading.RepositoryClassLoader;
-
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.NotFoundException;
-import javassist.scopedpool.ScopedClassPoolRepository;
-
-/**
- * A classpool in JBoss backed by a scoped (HierarchicalLoaderRepository) loader repository
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class ScopedJBossClassPool extends JBossClassPool 
-{
-   final static LoaderRepositoryUrlUtil LOADER_REPOSITORY_UTIL = new LoaderRepositoryUrlUtil();
-   
-   private UrlInfo urlInfo;
-   private ThreadLocal<ClassPool> lastPool = new ThreadLocal<ClassPool>();
-
-   public ScopedJBossClassPool(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository, File tmp, URL tmpURL)
-   {
-      super(cl, src, repository, tmp, tmpURL);
-      
-      boolean parentFirst = false;
-      LoaderRepository loaderRepository = null;
-      ClassLoader prnt = cl;
-      while (prnt != null)
-      {
-         if (prnt instanceof RepositoryClassLoader)
-         {
-            loaderRepository = ((RepositoryClassLoader)prnt).getLoaderRepository();
-            if (loaderRepository instanceof HeirarchicalLoaderRepository3)
-            {
-               parentFirst = ((HeirarchicalLoaderRepository3)loaderRepository).getUseParentFirst();
-            }
-            break;
-         }
-         prnt = SecurityActions.getParent(cl);
-      }
-      
-      super.childFirstLookup = !parentFirst;
-   }
-   
-
-   private HeirarchicalLoaderRepository3 getRepository()
-   {
-      ClassLoader cl = getClassLoader0();
-      if (cl != null)
-      {
-         return (HeirarchicalLoaderRepository3)((RepositoryClassLoader)cl).getLoaderRepository();
-      }
-      return null;
-   }
-
-   private URL getResourceUrlForClass(String resourcename)
-   {
-      HeirarchicalLoaderRepository3 repo = getRepository();
-      return repo.getResource(resourcename, super.getClassLoader());
-   }
-   
-   private boolean isMine(URL url)
-   {
-      HeirarchicalLoaderRepository3 repo = getRepository();
-      if (repo != null)
-      {
-         //The URL of the class loaded with my scoped classloader
-         if (url != null)
-         {
-            urlInfo = LOADER_REPOSITORY_UTIL.getURLInfo(getRepository(), urlInfo);
-            
-            URL[] myUrls = urlInfo.getLocalUrls();
-            String resource = url.toString();
-            for (int i = 0 ; i < myUrls.length ; i++)
-            {
-               if (resource.indexOf(myUrls[i].toString()) >= 0)
-               {
-                  return true;
-               }
-            }
-            return false;
-         }
-      }
-      return true;
-   }
-
-   public CtClass getCached(String classname)
-   {
-      if (classname == null)
-      {
-         return null;
-      }
-      if (isUnloadedClassLoader())
-      {
-         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
-         return super.getCached(classname);
-      }
-      
-      //Is this from the scoped classloader itself of from the parent?
-      String resourcename = getResourceName(classname);
-      URL url = getResourceUrlForClass(resourcename);
-      boolean isMine = isMine(url);
-      
-      if (isMine)
-      {
-         if (super.childFirstLookup)
-         {
-            //Parent delegation is false, attempt to get this class out of ourselves
-            CtClass clazz = super.getCachedLocally(classname);
-            if (clazz == null)
-            {
-               clazz = createCtClass(classname, false);
-               if (clazz != null)
-               {
-                  lockInCache(clazz);
-               }
-            }
-            if (clazz != null)
-            {
-               return clazz;
-            }
-         }
-         return super.getCached(classname);
-      }
-      
-
-      try
-      {
-         ClassPool pool = getCorrectPoolForResource(classname, url);
-         if (pool != lastPool.get())
-         {
-            lastPool.set(pool);
-            return pool.get(classname);
-         }
-      }
-      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, URL url)
-   {
-      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<AOPClassPool> noAnnotationURLClassLoaderPools = null;
-         String resource = url.toString();
-         for(ClassPool pool : AspectManager.getRegisteredCLs().values())
-         {
-            AOPClassPool candidate = (AOPClassPool)pool;
-            if (candidate.isUnloadedClassLoader())
-            {
-               AspectManager.instance().unregisterClassLoader(candidate.getClassLoader());
-               continue;
-            }
-            
-            if (candidate.getClassLoader() instanceof RepositoryClassLoader)
-            {
-               //Sometimes the ClassLoader is a proxy for MBeanProxyExt?!
-               RepositoryClassLoader rcl = (RepositoryClassLoader)candidate.getClassLoader();
-               URL[] urls = rcl.getClasspath();
-               
-               for (int i = 0 ; i < urls.length ; i++)
-               {
-                  if (resource.indexOf(urls[i].getFile()) >= 0)
-                  {
-                     return candidate;
-                  }
-               }
-            }
-            //FIXME Remove once we have the JBoss 5 version of pool
-            else if (isInstanceOfNoAnnotationURLClassLoader(candidate.getClassLoader()))
-            {
-               if (noAnnotationURLClassLoaderPools == null)
-               {
-                  noAnnotationURLClassLoaderPools = new ArrayList<AOPClassPool>(); 
-               }
-               noAnnotationURLClassLoaderPools.add(candidate);
-            }
-         }
-         
-         //FIXME Remove once we have the JBoss 5 version of pool
-         if (noAnnotationURLClassLoaderPools != null)
-         {
-            for (AOPClassPool pool : noAnnotationURLClassLoaderPools)
-            {
-               try
-               {
-                  pool.get(classname);
-                  return pool;
-               }
-               catch(NotFoundException ignoreTryNext)
-               {
-               }
-            }
-         }
-      }
-
-      return AOPClassPool.createAOPClassPool(ClassPool.getDefault(), 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: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ScopedRepositoryClassLoaderHelper.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ScopedRepositoryClassLoaderHelper.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ScopedRepositoryClassLoaderHelper.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,51 +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.jboss4;
-
-import org.jboss.mx.loading.HeirarchicalLoaderRepository3;
-import org.jboss.mx.loading.LoaderRepository;
-import org.jboss.mx.loading.RepositoryClassLoader;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @autor adrian at jboss.org
- * @version $Revision$
- */
-public class ScopedRepositoryClassLoaderHelper
-{
-   public static boolean isScopedClassLoader(ClassLoader loader)
-   {
-      boolean scoped = false;
-      if (loader instanceof RepositoryClassLoader)
-      {
-         LoaderRepository repository = ((RepositoryClassLoader)loader).getLoaderRepository();
-         if (repository instanceof HeirarchicalLoaderRepository3)
-         {
-            scoped = true;
-            //HeirarchicalLoaderRepository3 hlr = (HeirarchicalLoaderRepository3)repository;
-            //boolean parentFirst = hlr.getUseParentFirst();
-         }
-      }
-      return scoped;
-   }
-}

Deleted: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/SecurityActions.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/SecurityActions.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/SecurityActions.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,84 +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.jboss4;
-
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-class SecurityActions
-{
-   interface GetParentAction
-   {
-      ClassLoader getParent(ClassLoader loader);
-      
-      GetParentAction NON_PRIVILEGED = new GetParentAction()
-      {
-         public ClassLoader getParent(ClassLoader loader)
-         {
-            return loader.getParent();
-         }
-      };
-      
-      GetParentAction PRIVILEGED = new GetParentAction()
-      {
-         public ClassLoader getParent(final ClassLoader loader)
-         {
-            try
-            {
-               return AccessController.doPrivileged(new PrivilegedExceptionAction<ClassLoader>()
-               {
-                  public ClassLoader run() throws Exception
-                  {
-                     return loader.getParent();
-                  }
-               });
-            }
-            catch (PrivilegedActionException e)
-            {
-               throw new RuntimeException(e.getException());
-            }
-         }
-      };
-   }
-   
-   public static ClassLoader getParent(ClassLoader loader)
-   {
-      if (loader == null)
-      {
-         return null;
-      }
-      if (System.getSecurityManager() == null)
-      {
-         return GetParentAction.NON_PRIVILEGED.getParent(loader);
-      }
-      else
-      {
-         return GetParentAction.PRIVILEGED.getParent(loader);
-      }
-   }
-}

Deleted: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ToClassInvoker.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ToClassInvoker.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ToClassInvoker.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,103 +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.jboss4;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.security.ProtectionDomain;
-
-import javassist.CannotCompileException;
-import javassist.CtClass;
-
-import org.jboss.logging.Logger;
-import org.jboss.mx.loading.RepositoryClassLoader;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class ToClassInvoker
-{
-   Logger logger = Logger.getLogger(this.getClass());
-
-   public File tmpDir;
-
-   public Object tmplock = new Object();
-
-   public ToClassInvoker(File tmpDir)
-   {
-      this.tmpDir = tmpDir;
-   }
-
-   public Class<?> toClass(ToClassInvokerPoolReference pool, CtClass cc, String classFileName, ClassLoader loader, ProtectionDomain domain)
-   throws CannotCompileException
-   {
-      boolean trace = logger.isTraceEnabled();
-      pool.lockInCache(cc);
-      final ClassLoader myloader = pool.getClassLoader();
-      if (myloader == null || tmpDir == null)
-      {
-         if (trace) logger.trace(this + " " + pool + ".toClass() myloader:" + myloader + " tmpDir:" + tmpDir + " default to superPool.toClass for " + cc.getName());
-         Class<?> clazz = pool.superPoolToClass(cc, loader, domain);
-         if (trace) logger.trace(this + " " + pool + " myloader:" + myloader + " created class:" + clazz);
-         return clazz;
-      }
-      Class<?> dynClass = null;
-      try
-      {
-         File classFile = null;
-         // Write the clas file to the tmpdir
-         synchronized (tmplock)
-         {
-            classFile = new File(tmpDir, classFileName);
-            if (trace) logger.trace(this + " " + pool + ".toClass() myloader:" + myloader + " writing bytes to " + classFile);
-            File pkgDirs = classFile.getParentFile();
-            pkgDirs.mkdirs();
-            FileOutputStream stream = new FileOutputStream(classFile);
-            stream.write(cc.toBytecode());
-            stream.flush();
-            stream.close();
-            classFile.deleteOnExit();
-         }
-         // We have to clear Blacklist caches or the class will never
-         // be found
-         //((UnifiedClassLoader)dcl).clearBlacklists();
-         // To be backward compatible
-         RepositoryClassLoader rcl = (RepositoryClassLoader)myloader;
-         rcl.clearClassBlackList();
-         rcl.clearResourceBlackList();
-
-         // Now load the class through the cl
-         dynClass = myloader.loadClass(cc.getName());
-         if (trace) logger.trace(this + " " + pool + " myloader:" + myloader + " created class:" + dynClass);
-         return dynClass;
-      }
-      catch (Exception ex)
-      {
-         ClassFormatError cfe = new ClassFormatError("Failed to load dyn class: " + cc.getName());
-         cfe.initCause(ex);
-         throw cfe;
-      }
-   }
-
-}

Deleted: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ToClassInvokerPoolReference.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ToClassInvokerPoolReference.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/asintegration/jboss4/ToClassInvokerPoolReference.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,39 +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.jboss4;
-
-import java.security.ProtectionDomain;
-
-import javassist.CannotCompileException;
-import javassist.CtClass;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public interface ToClassInvokerPoolReference
-{
-   Class<?> superPoolToClass(CtClass cc, ClassLoader loader, ProtectionDomain domain) throws CannotCompileException;
-   ClassLoader getClassLoader();
-   void lockInCache(CtClass clazz);
-}

Modified: projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/deployment/AspectDeployer.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/deployment/AspectDeployer.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-jmx/src/main/java/org/jboss/aop/deployment/AspectDeployer.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -35,7 +35,7 @@
 import org.jboss.aop.AspectAnnotationLoader;
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.AspectXmlLoader;
-import org.jboss.aop.asintegration.jboss4.ScopedRepositoryClassLoaderHelper;
+import org.jboss.classpool.plugins.ucl.ScopedRepositoryClassLoaderHelper;
 import org.jboss.deployment.DeploymentException;
 import org.jboss.deployment.DeploymentInfo;
 import org.jboss.deployment.DeploymentState;

Modified: projects/aop/branches/Branch_2_2/asintegration-mc/.classpath
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/.classpath	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/.classpath	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,10 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPClassLoaderInitializer.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPClassLoaderInitializer.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPClassLoaderInitializer.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,24 +1,24 @@
 /*
-* 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.
-*/ 
+ * 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.aop.AspectManager;
@@ -47,17 +47,17 @@
    public static void unregisterLoaders(AspectManager manager, DeploymentUnit unit)
    {
       AOPClassLoaderScopingPolicyWithRegistry policy = (AOPClassLoaderScopingPolicyWithRegistry)AspectManager.getClassLoaderScopingPolicy();
-      DomainRegistry registry = policy.getRegistry();
+      AOPDomainRegistry registry = policy.getRegistry();
       if (unit.isTopLevel() || unit.getParent().getClassLoader() != unit.getClassLoader())
       {
-         registry.cleanupLoader(unit.getClassLoader());
+         registry.cleanupModule(registry.getModule(unit.getClassLoader()));
          manager.unregisterClassLoader(unit.getClassLoader());
       }
    }
    
    private static void registerLoaders(AOPClassLoaderScopingPolicyWithRegistry policy, DeploymentUnit unit)
    {
-      DomainRegistry registry = policy.getRegistry();
+      AOPDomainRegistry registry = policy.getRegistry();
       if (!unit.isTopLevel())
       {
          registerLoaders(policy, unit.getParent());
@@ -80,9 +80,7 @@
             domain = createDomain(registry, unit.getClassLoader(), module, unit);
          }
          
-         ClassLoader parentUnitLoader = unit.isTopLevel() ? null : unit.getParent().getClassLoader();
-         registry.initMapsForLoader(unit.getClassLoader(), module, domain, parentUnitLoader);
-
+         registry.setDomain(domain);
          policy.registerClassLoader(module, unit.getClassLoader());
       }
    }
@@ -105,12 +103,12 @@
    }
    
    
-   private static ScopedVFSClassLoaderDomain getDomain(DomainRegistry registry, DeploymentUnit unit)
+   private static ScopedVFSClassLoaderDomain getDomain(AOPDomainRegistry registry, DeploymentUnit unit)
    {
       return (ScopedVFSClassLoaderDomain)registry.getRegisteredDomain(unit.getClassLoader());
    }
    
-   private static ScopedVFSClassLoaderDomain createDomain(DomainRegistry registry, ClassLoader loader, Module module, DeploymentUnit unit)
+   private static ScopedVFSClassLoaderDomain createDomain(AOPDomainRegistry registry, ClassLoader loader, Module module, DeploymentUnit unit)
    {
       if (!module.getDeterminedDomainName().equals(ClassLoaderSystem.DEFAULT_DOMAIN_NAME))
       {

Modified: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPClassLoaderScopingPolicyWithRegistry.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPClassLoaderScopingPolicyWithRegistry.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPClassLoaderScopingPolicyWithRegistry.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,24 +1,24 @@
 /*
-* 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.
-*/ 
+ * 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.aop.classpool.AOPClassLoaderScopingPolicy;
@@ -31,7 +31,7 @@
  */
 public interface AOPClassLoaderScopingPolicyWithRegistry extends AOPClassLoaderScopingPolicy
 {
-   DomainRegistry getRegistry();
+   AOPDomainRegistry getRegistry();
 
    void registerClassLoader(Module module, ClassLoader loader);
 

Added: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPDomainRegistry.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPDomainRegistry.java	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPDomainRegistry.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -0,0 +1,46 @@
+/*
+ * 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.List;
+import java.util.concurrent.locks.ReadWriteLock;
+
+import org.jboss.aop.Domain;
+import org.jboss.classloader.spi.ClassLoaderDomain;
+import org.jboss.classpool.plugins.jbosscl.DomainRegistry;
+
+/**
+ * 
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision$
+ */
+public interface AOPDomainRegistry extends DomainRegistry
+{
+   void setDomain(ScopedVFSClassLoaderDomain domain);
+   
+   Domain getRegisteredDomain(ClassLoader cl);
+   
+   List<ScopedVFSClassLoaderDomain> getAOPDomainsForClassLoaderDomain(ClassLoaderDomain domain);
+   
+   ReadWriteLock getAOPDomainsLockForClassLoaderDomain(ClassLoaderDomain domain);
+}
\ No newline at end of file


Property changes on: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPDomainRegistry.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPVFSClassLoaderDomainRegistry.java (from rev 102623, projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderDomainRegistry.java)
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPVFSClassLoaderDomainRegistry.java	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPVFSClassLoaderDomainRegistry.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -0,0 +1,149 @@
+/*
+ * 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.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.jboss.aop.Domain;
+import org.jboss.classloader.spi.ClassLoaderDomain;
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.classpool.plugins.jbosscl.VFSClassLoaderDomainRegistry;
+
+/**
+ * 
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ * @version $Revision: 1.1 $
+ */
+public class AOPVFSClassLoaderDomainRegistry extends VFSClassLoaderDomainRegistry implements AOPDomainRegistry
+{
+   /** aopDomains by classloader */
+   private Map<ClassLoader, ScopedVFSClassLoaderDomain> aopDomainsByClassLoader = new WeakHashMap<ClassLoader, ScopedVFSClassLoaderDomain>();
+   
+   /** aopDomains by classloader domain */
+   private Map<ClassLoaderDomain, List<ScopedVFSClassLoaderDomain>> aopDomainsByClassLoaderDomain = new WeakHashMap<ClassLoaderDomain, List<ScopedVFSClassLoaderDomain>>();
+
+   private Map<ClassLoaderDomain, ReadWriteLock> aopDomainsLocksByClassLoaderDomain = new WeakHashMap<ClassLoaderDomain, ReadWriteLock>();
+
+   private ScopedVFSClassLoaderDomain initDomain = null;
+
+   public List<ScopedVFSClassLoaderDomain> getAOPDomainsForClassLoaderDomain(ClassLoaderDomain domain)
+   {
+      List<ScopedVFSClassLoaderDomain> domains = aopDomainsByClassLoaderDomain.get(domain);
+      if (domains != null)
+      {
+         return domains;
+      }
+      return Collections.emptyList();
+   }
+
+   public ReadWriteLock getAOPDomainsLockForClassLoaderDomain(ClassLoaderDomain domain)
+   {
+      return aopDomainsLocksByClassLoaderDomain.get(domain);
+   }
+
+   public synchronized Domain getRegisteredDomain(ClassLoader cl)
+   {
+      return aopDomainsByClassLoader.get(cl);
+   }
+
+
+   public synchronized void setDomain(ScopedVFSClassLoaderDomain domain)
+   {
+      this.initDomain = domain;
+   }
+   
+   @Override
+   protected void validateInitMaps(ClassLoader loader, ClassLoaderDomain loaderDomain, Module module, ClassLoader parentUnitLoader)
+   {
+      if (loaderDomain == null && initDomain != null)
+      {
+         throw new IllegalStateException("Have " + domain + " but no classloader domain");
+      }
+   }
+   
+   @Override
+   protected void initMapsDone(ClassLoader loader, ClassLoaderDomain loaderDomain, Module module, ClassLoader parentUnitLoader)
+   {
+      if (initDomain != null)
+      {
+         aopDomainsByClassLoader.put(loader, initDomain);
+
+         ReadWriteLock lock = aopDomainsLocksByClassLoaderDomain.get(loaderDomain);
+         if (lock == null)
+         {
+            lock = new ReentrantReadWriteLock();
+            aopDomainsLocksByClassLoaderDomain.put(loaderDomain, lock);
+         }
+         
+         lock.writeLock().lock();
+         try
+         {
+            List<ScopedVFSClassLoaderDomain> aopDomains = aopDomainsByClassLoaderDomain.get(loaderDomain);
+            if (aopDomains == null)
+            {
+               synchronized (aopDomainsByClassLoaderDomain)
+               {
+                  aopDomains = new CopyOnWriteArrayList<ScopedVFSClassLoaderDomain>();
+                  if (!aopDomains.contains(loaderDomain))
+                  {
+                     aopDomainsByClassLoaderDomain.put(loaderDomain, aopDomains);
+                  }
+               }
+            }
+            aopDomains.add(initDomain);
+         }
+         finally
+         {
+            lock.writeLock().unlock();
+         }
+      }
+   }
+   
+   @Override
+   public synchronized void cleanupLoaderDone(ClassLoader loader, ClassLoaderDomain loaderDomain, int domainReferences)
+   {
+      if (loaderDomain != null)
+      {
+         if (domainReferences == 0)
+         {
+            //aopDomainsByClassLoaderDomain.remove(loaderDomain);
+         }
+         ScopedVFSClassLoaderDomain aopDomain = aopDomainsByClassLoader.remove(loader);
+         List<ScopedVFSClassLoaderDomain> aopDomains = aopDomainsByClassLoaderDomain.get(loaderDomain);
+         if (aopDomains != null)
+         {
+            aopDomains.remove(aopDomain);
+         }
+         if (aopDomain != null)
+         {
+            aopDomain.getParent().unsubscribeSubDomain(aopDomain);
+         }
+      }
+      aopDomainsByClassLoader.remove(loader);
+   }
+}
\ No newline at end of file

Deleted: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/DomainRegistry.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/DomainRegistry.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/DomainRegistry.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,53 +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.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 interface DomainRegistry
-{
-   ClassLoaderSystem getSystem();
-   
-   ClassLoaderDomain getDefaultDomain();
-   
-   boolean initMapsForLoader(ClassLoader loader, Module module, ScopedVFSClassLoaderDomain domain, ClassLoader parentUnitLoader);
-
-   void cleanupLoader(ClassLoader loader);
-   
-   Domain getRegisteredDomain(ClassLoader cl);
-
-   ClassLoaderDomain getClassLoaderDomainForLoader(ClassLoader cl);
-
-   ClassLoader getParentUnitLoader(ClassLoader loader);
-
-   Module getModule(ClassLoader loader);
-
-   ClassLoader getClassLoader(Module module);
-}
\ No newline at end of file

Deleted: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5ClassPool.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5ClassPool.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5ClassPool.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,76 +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.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;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class JBoss5ClassPool extends AOPClassPool implements ToClassInvokerPoolReference
-{
-   protected ToClassInvoker toClassInvoker = null;
-
-   boolean closed;
-   
-   protected JBoss5ClassPool(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository, URL tmpURL)
-   {
-      super(cl, src, repository);
-      toClassInvoker = new ToClassInvoker(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
-   {
-      return toClassInvoker.toClass(this, cc, getResourceName(cc.getName()), loader, domain);
-   }
-
-   public Class<?> superPoolToClass(CtClass cc, ClassLoader loader, ProtectionDomain domain) throws CannotCompileException
-   {
-      return super.toClass(cc, loader, domain);
-   }
-}

Deleted: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5ClassPoolFactory.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,102 +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 javassist.ClassPool;
-import javassist.scopedpool.ScopedClassPool;
-import javassist.scopedpool.ScopedClassPoolFactory;
-import javassist.scopedpool.ScopedClassPoolRepository;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.classpool.AOPClassPool;
-import org.jboss.aop.classpool.AbstractJBossClassPoolFactory;
-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
-{
-   private DomainRegistry registry;
-   
-   public JBoss5ClassPoolFactory(DomainRegistry registry)
-   {
-      this.registry = registry;
-   }
-   
-   public ScopedClassPool create(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository)
-   {      
-      ClassPool parent = getCreateParentClassPools(cl, src, repository);
-
-      ScopedClassPool pool = null;
-      
-      if (cl instanceof RealClassLoader)
-      {
-         Module module = registry.getModule(cl);
-         if (module != null && module.getDeterminedParentDomainName() != null)
-         {
-            //It is scoped
-            ClassLoaderSystem sys = registry.getSystem();
-            ClassLoaderDomain domain = sys.getDomain(module.getDeterminedDomainName());
-            boolean parentFirst = module.isJ2seClassLoadingCompliance();
-            ClassPool parentDomainPool = getParentUnitClassPool(cl); 
-            pool = new ScopedJBoss5ClassPool(cl, parent, parentDomainPool, repository, getTempURL(module), parentFirst, domain);
-         }
-         else
-         {
-            pool =  new JBoss5ClassPool(cl, parent, repository, getTempURL(module));
-         }
-      }
-      
-      if (pool == null)
-      {
-         pool = new AOPClassPool(cl, parent, repository);
-      }
-      log.debug("Created pool " + pool + " for loader " + cl);
-      
-      return pool;
-   }
-
-   private ClassPool getParentUnitClassPool(ClassLoader cl)
-   {
-      ClassLoader parent = registry.getParentUnitLoader(cl);
-      return AspectManager.instance().registerClassLoader(parent);
-   }
-   
-
-   private URL getTempURL(Module module)
-   {
-      if (module == null)
-         return null;
-      
-      return module.getDynamicClassRoot();
-   }
-}

Modified: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5Integration.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5Integration.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5Integration.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,24 +1,24 @@
 /*
-* 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.
-*/ 
+ * 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;
@@ -29,14 +29,17 @@
 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.asintegration.JBossIntegration;
 import org.jboss.classloader.spi.ClassLoaderSystem;
 import org.jboss.classloading.spi.RealClassLoader;
+import org.jboss.classpool.plugins.jbosscl.JBoss5ClassPoolFactory;
+import org.jboss.classpool.scoped.ScopedClassPool;
+import org.jboss.classpool.scoped.ScopedClassPoolFactory;
+import org.jboss.classpool.scoped.ScopedClassPoolRepository;
+import org.jboss.classpool.spi.AbstractClassPoolFactory;
+import org.jboss.classpool.spi.ClassPoolRepository;
 
 /**
  * 
@@ -120,14 +123,23 @@
       return policy;
    }
    
-   public DomainRegistry getDomainRegistry()
+   public AOPDomainRegistry getDomainRegistry()
    {
       return policy.getRegistry();
    }
    
    public void setClassPoolFactory(ScopedClassPoolFactory factory)
    {
-      this.delegateClassPoolFactory = factory;
+      if (factory instanceof AbstractClassPoolFactory)
+      {
+         ClassPoolRepository.getInstance().setClassPoolFactory((AbstractClassPoolFactory) factory);
+         this.delegateClassPoolFactory = factory;
+      }
+      else
+      {
+         this.delegateClassPoolFactory = factory;
+      }
+      ClassPoolRepository.getInstance().setClassPoolFactory(delegateClassPoolFactory);
    }
 
    public synchronized ScopedClassPoolFactory createScopedClassPoolFactory(File tmpDir) throws Exception
@@ -135,6 +147,7 @@
       if (delegateClassPoolFactory == null)
       {
          delegateClassPoolFactory = new JBoss5ClassPoolFactory(getDomainRegistry());
+         ClassPoolRepository.getInstance().setClassPoolFactory(delegateClassPoolFactory);
       }
       return this;
    }

Deleted: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/RegisterModuleCallback.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/RegisterModuleCallback.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/RegisterModuleCallback.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,68 +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.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.classloading.spi.dependency.Module;
-import org.jboss.logging.Logger;
-
-/**
- * Use with org.jboss.aop.classpool.jbosscl.JBossClDelegatingClassPoolFactory
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class RegisterModuleCallback
-{
-   Logger logger = Logger.getLogger(this.getClass());
-   
-   private Set<Module> registeredModules = new HashSet<Module>();
-   private Set<Module> unregisteredModules = new HashSet<Module>();
-
-   public synchronized void addModule(Module module)
-   {
-      logger.debug("Adding module " + module);
-      unregisteredModules.add(module);
-   }
-
-   public synchronized void removeModule(Module module)
-   {
-      logger.debug("Removing module " + module);
-      registeredModules.remove(module);
-      unregisteredModules.remove(module);
-   }
-   
-   public synchronized Set<Module> getUnregisteredModules()
-   {
-      return Collections.unmodifiableSet(new HashSet<Module>(unregisteredModules));
-   }
-   
-   public synchronized void registerModule(Module module)
-   {
-      logger.debug("Registering module " + module);
-      registeredModules.add(module);
-      unregisteredModules.remove(module);
-   }
-}

Deleted: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ScopedJBoss5ClassPool.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ScopedJBoss5ClassPool.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ScopedJBoss5ClassPool.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,401 +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;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class ScopedJBoss5ClassPool extends JBoss5ClassPool
-{
-   ThreadLocal<ClassPool> lastPool = new ThreadLocal<ClassPool>();
-   WeakReference<ClassLoaderDomain> domainRef;
-   /** The classpool representing the parent domain of this one */
-   ClassPool parentDomainPool;
-
-   public ScopedJBoss5ClassPool(ClassLoader cl, ClassPool src, ClassPool parentDomainPool, ScopedClassPoolRepository repository, 
-         URL tmpURL, boolean parentFirst, ClassLoaderDomain domain)
-   {
-      super(cl, src, repository, tmpURL);
-      super.childFirstLookup = !parentFirst;
-      this.parentDomainPool = parentDomainPool;
-      this.domainRef = new WeakReference<ClassLoaderDomain>(domain);
-      
-      logger.debug("Created new ScopedJBoss5ClasPool for " + cl + ", with parent: " + src + ", parentDomain: " + parentDomainPool + ", parentFirst: " + parentFirst);
-   }
-
-   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;
-   }
-   
-
-   @Override
-   protected synchronized CtClass get0(String classname, boolean useCache) throws NotFoundException
-   {
-      CtClass clazz = null;
-      if (useCache)
-      {
-         clazz = getCached(classname);
-         if (clazz != null)
-            return clazz;
-      }
-
-      if (!childFirstLookup)
-      {
-         if (parentDomainPool != null)
-         {
-            clazz = performGet(parentDomainPool, classname);
-            if (clazz != null)
-            {
-               return clazz;
-            }
-         }
-         if (parent != null)
-         {
-            clazz = performGet(parent, classname);
-            if (clazz != null)
-            {
-               return clazz;
-            }
-         }
-      }
-
-      clazz = createCtClass(classname, useCache);
-      if (clazz != null)
-      {
-         // clazz.getName() != classname if classname is "[L<name>;".
-         if (useCache)
-            cacheCtClass(clazz.getName(), clazz, false);
-
-         return clazz;
-      }
-
-      if (childFirstLookup)
-      {
-         if (parent != null)
-         {
-            clazz = performGet(parent, classname);
-            if (clazz != null)
-            {
-               return clazz;
-            }
-         }
-         if (parentDomainPool != null)
-         {
-            clazz = performGet(parentDomainPool, classname);
-            if (clazz != null)
-            {
-               return clazz;
-            }
-         }
-      }
-
-      return clazz;
-   }
-
-   private CtClass performGet(ClassPool pool, String classname)
-   {
-      try
-      {
-         //Want to avoid calling get() if possible since that creates NotFoundExceptions
-         //on misses which is expensive
-         if (pool instanceof AOPClassPool)
-         {
-            return ((AOPClassPool)pool).internalGet0(classname, true);
-         }
-         else
-         {
-            return pool.get(classname);
-         }
-      }
-      catch (NotFoundException e)
-      {
-         return null;
-      }
-   }
-   
-   
-   public CtClass getCached(String classname)
-   {
-      boolean trace = logger.isTraceEnabled();
-      
-      if (trace)
-      {
-         logger.trace("getCached() " + classname);
-      }
-      
-      if (classname == null)
-      {
-         if (trace)
-         {
-            logger.trace("getCached() returning null (classname == null)");
-         }
-         return null;
-      }
-      if (isUnloadedClassLoader())
-      {
-         if (trace)
-         {
-            logger.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)
-         {
-            logger.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)
-               {
-                  logger.trace("getCached() Creating my class " + classname);
-               }
-               clazz = createCtClass(classname, false);
-               if (clazz != null)
-               {
-                  lockInCache(clazz);
-               }
-            }
-            if (clazz != null)
-            {
-               if (trace)
-               {
-                  logger.trace("getCached() Returning my class " + classname);
-               }
-               return clazz;
-            }
-         }
-         if (trace)
-         {
-            logger.trace("getCached() Checking super for my class " + classname);
-         }
-         return super.getCached(classname);
-      }
-      else if (url == null)
-      {
-         if (trace)
-         {
-            logger.trace("getCached() Checking super for my class " + classname + " (no url)");
-         }
-         return super.getCached(classname);
-      }
-      
-
-      try
-      {
-         ClassPool pool = getCorrectPoolForResource(classname, resourcename, url, trace);
-         if (trace)
-         {
-            logger.trace("getCached() Found pool for class " + classname + " " + pool);
-         }
-         if (pool != lastPool.get())
-         {
-            lastPool.set(pool);
-            CtClass found = pool.get(classname);
-            if (trace)
-            {
-               logger.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<ClassPool> 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)
-                     {
-                        logger.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)
-                  {
-                     logger.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)
-   {
-      if (loader == null)
-      {
-         return false;
-      }
-      Class<?> parent = loader.getClass();
-      while (parent != null)
-      {
-         if ("NoAnnotationURLClassLoader".equals(parent.getSimpleName()))
-         {
-            return true;
-         }
-         parent = parent.getSuperclass();
-      }
-      return false;
-   }
-   
-}

Modified: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ScopedVFSClassLoaderDomain.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -40,10 +40,10 @@
 public class ScopedVFSClassLoaderDomain extends ScopedClassLoaderDomain
 {
    WeakReference<ClassLoaderDomain> classLoaderDomainRef;
-   DomainRegistry registry;
+   AOPDomainRegistry registry;
    
    public ScopedVFSClassLoaderDomain(ClassLoader loader, String name, boolean parentDelegation, AspectManager manager, boolean parentFirst, 
-         ClassLoaderDomain classLoaderDomain, DomainRegistry registry)
+         ClassLoaderDomain classLoaderDomain, AOPDomainRegistry registry)
    {
       super(loader, name, parentDelegation, manager, parentFirst);
       classLoaderDomainRef = new WeakReference<ClassLoaderDomain>(classLoaderDomain);

Deleted: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ToClassInvoker.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ToClassInvoker.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ToClassInvoker.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,102 +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.CtClass;
-
-import org.jboss.classloading.spi.RealClassLoader;
-import org.jboss.logging.Logger;
-import org.jboss.vfs.VFS;
-import org.jboss.vfs.VFSUtils;
-import org.jboss.vfs.VirtualFile;
-
-/**
- * @author  <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version  $Revision: 1.1 $
- */
-public class ToClassInvoker
-{
-   Logger logger = Logger.getLogger(this.getClass());
-   
-   public URL tempURL;
-
-   public Object tmplock = new Object();
-
-   public ToClassInvoker(URL tempURL)
-   {
-      this.tempURL = tempURL;
-   }
-
-   public Class<?> toClass(ToClassInvokerPoolReference pool, CtClass cc, String classFileName, ClassLoader loader, ProtectionDomain domain) throws CannotCompileException
-   {
-      boolean trace = logger.isTraceEnabled();
-      pool.lockInCache(cc);
-      final ClassLoader myloader = pool.getClassLoader();
-      if (myloader == null || tempURL == null)
-      {
-         if (trace) logger.trace(this + " " + pool + ".toClass() myloader:" + myloader + " tempURL:" + tempURL + " default to superPool.toClass for " + cc.getName());
-         Class<?> clazz = pool.superPoolToClass(cc, loader, domain);
-         if (trace) logger.trace(this + " " + pool + " myloader:" + myloader + " created class:" + clazz);
-         return clazz;
-      }
-      
-      try
-      {
-         URL outputURL = new URL(tempURL.toString() + "/" + classFileName);
-         //Write the classfile to the temporary url
-         synchronized (tmplock)
-         {
-            if (trace) logger.trace(this + " " + pool + ".toClass() myloader:" + myloader + " writing bytes to " + tempURL);
-            ByteArrayOutputStream byteout = new ByteArrayOutputStream();
-            BufferedOutputStream out = new BufferedOutputStream(byteout);
-            out.write(cc.toBytecode());
-            out.flush();
-            out.close();
-            
-            byte[] classBytes = byteout.toByteArray();
-            VirtualFile classFile = VFS.getChild(outputURL);
-            VFSUtils.writeFile(classFile, classBytes);
-
-            if (myloader instanceof RealClassLoader)
-            {
-               ((RealClassLoader)myloader).clearBlackList(classFileName);
-            }
-            
-            Class<?> clazz = myloader.loadClass(cc.getName());
-            if (trace) logger.trace(this + " " + pool + " myloader:" + myloader + " created class:" + clazz);
-            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;
-      }
-   }
-}
\ No newline at end of file

Deleted: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ToClassInvokerPoolReference.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ToClassInvokerPoolReference.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/ToClassInvokerPoolReference.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,40 +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 javassist.CannotCompileException;
-import javassist.CtClass;
-
-/**
- * Exposes methods on ClassPool needed by JBoss5ClassPool
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public interface ToClassInvokerPoolReference
-{
-   Class<?> superPoolToClass(CtClass cc, ClassLoader loader, ProtectionDomain domain) throws CannotCompileException;
-   ClassLoader getClassLoader();
-   void lockInCache(CtClass clazz);
-}

Deleted: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderDomainRegistry.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderDomainRegistry.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderDomainRegistry.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,223 +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 implements DomainRegistry
-{
-   final static ClassLoaderDomain domain = new ClassLoaderDomain("NOT_USED_PLACEHOLDER");
-   
-   private ClassLoaderSystem system;
-   
-   private ClassLoaderDomain defaultDomain;
-   
-   /** 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>();
-   
-   /** parent deployment unit classloaders indexed by children */
-   private Map<ClassLoader, WeakReference<ClassLoader>> classLoaderUnitParents = new WeakHashMap<ClassLoader, WeakReference<ClassLoader>>(); 
-   
-   /** Modules by classloader */
-   private Map<ClassLoader, WeakReference<Module>> classLoaderModules = new WeakHashMap<ClassLoader, WeakReference<Module>>();
-   
-   /** classloaders by module */
-   private Map<Module, WeakReference<ClassLoader>> moduleClassLoaders = new WeakHashMap<Module, WeakReference<ClassLoader>>();
-
-   private Map<ClassLoaderDomain, Integer> classLoaderDomainReferenceCounts = new WeakHashMap<ClassLoaderDomain, Integer>();
-   
-   /**
-    * Needed for the tests, not expected to be needed in production
-    */
-   public void setSystem(ClassLoaderSystem system)
-   {
-      this.system = system;
-   }
-   
-   /**
-    * Needed for the tests, not expected to be needed in production
-    */
-   public void setDefaultDomain(ClassLoaderDomain domain)
-   {
-      this.defaultDomain = domain;
-   }
-   
-   public synchronized ClassLoaderSystem getSystem()
-   {
-      if (system == null)
-      {
-         system = ClassLoaderSystem.getInstance();
-      }
-      return system;
-   }
-   
-   public synchronized ClassLoaderDomain getDefaultDomain()
-   {
-      if (defaultDomain == null)
-      {
-         defaultDomain = getSystem().getDefaultDomain();
-      }
-      return defaultDomain;
-   }
-
-   public synchronized boolean initMapsForLoader(ClassLoader loader, Module module, ScopedVFSClassLoaderDomain domain, ClassLoader parentUnitLoader)
-   {
-      if (loader == parentUnitLoader)
-      {
-         throw new IllegalArgumentException("initMapsForLoader() should only be called if parentUnitLoader is different from loader");
-      }
-      ClassLoaderSystem system = getSystem();
-      
-      String domainName = module.getDeterminedDomainName();
-      ClassLoaderDomain clDomain = system.getDomain(domainName);
-      boolean ret = false;
-      if (!classLoaderDomainsByLoader.containsKey(loader))
-      {
-         Integer count = classLoaderDomainReferenceCounts.get(clDomain);
-         int cnt = count == null ? 0 : count.intValue();
-         classLoaderDomainReferenceCounts.put(clDomain, cnt);
-         
-         classLoaderDomainsByLoader.put(loader, new WeakReference<ClassLoaderDomain>(clDomain));
-         classLoaderUnitParents.put(loader, new WeakReference<ClassLoader>(parentUnitLoader));
-         classLoaderModules.put(loader, new WeakReference<Module>(module));
-         moduleClassLoaders.put(module, new WeakReference<ClassLoader>(loader));
-         ret = true;
-         if (domain != null)
-         {
-            aopDomainsByClassLoaderDomain.put(clDomain, domain);
-         }
-      }
-      
-      
-      return ret;
-   }
-   
-   public synchronized void cleanupLoader(ClassLoader loader)
-   {
-      WeakReference<ClassLoaderDomain> clDomainRef = classLoaderDomainsByLoader.remove(loader);
-      ClassLoaderDomain clDomain = clDomainRef == null ? null : clDomainRef.get();
-      if (clDomain != null)
-      {
-         Integer count =  classLoaderDomainReferenceCounts.get(clDomain);
-         int cnt = count == null ? 0 : count.intValue();
-         if (cnt > 0)
-         {
-            cnt--;
-         }
-         if (cnt == 0)
-         {
-            aopDomainsByClassLoaderDomain.remove(clDomain);
-            classLoaderDomainReferenceCounts.remove(clDomain);
-         }
-         else
-         {
-            classLoaderDomainReferenceCounts.put(clDomain, ++cnt);
-         }
-         classLoaderUnitParents.remove(loader);
-         WeakReference<Module> moduleRef = classLoaderModules.remove(loader);
-         if (moduleRef != null)
-         {
-            Module module = moduleRef.get();
-            if (module != null)
-            {
-               moduleClassLoaders.remove(module);
-            }
-         }
-      }
-   }
-
-   public synchronized Domain getRegisteredDomain(ClassLoader cl)
-   {
-      ClassLoaderDomain clDomain = getClassLoaderDomainForLoader(cl);
-      if (clDomain != null)
-      {
-         return aopDomainsByClassLoaderDomain.get(clDomain);
-      }
-      return null;
-   }
-   
-   public synchronized ClassLoaderDomain getClassLoaderDomainForLoader(ClassLoader cl)
-   {
-      WeakReference<ClassLoaderDomain> clDomainRef = classLoaderDomainsByLoader.get(cl);
-      if (clDomainRef != null)
-      {
-         return clDomainRef.get();
-      }
-      
-      ClassLoader parent = SecurityActions.getParent(cl);
-      if (parent != null)
-      {
-         ClassLoaderDomain domain = getClassLoaderDomainForLoader(parent);
-         if (domain != null)
-         {
-            classLoaderDomainsByLoader.put(parent, new WeakReference<ClassLoaderDomain>(domain));
-            return domain;
-         }
-      }
-      return null;
-   }
-   
-   public synchronized ClassLoader getParentUnitLoader(ClassLoader loader)
-   {
-      WeakReference<ClassLoader> parentRef = classLoaderUnitParents.get(loader);
-      if (parentRef != null)
-      {
-         return parentRef.get();
-      }
-      return null;
-   }
-   
-   public synchronized Module getModule(ClassLoader loader)
-   {
-      WeakReference<Module> moduleRef = classLoaderModules.get(loader);
-      if (moduleRef != null)
-      {
-         return moduleRef.get();
-      }
-      return null;
-   }
-   
-   public synchronized ClassLoader getClassLoader(Module module)
-   {
-      WeakReference<ClassLoader> loaderRef = moduleClassLoaders.get(module);
-      if (loaderRef != null)
-      {
-         return loaderRef.get();
-      }
-      return null;
-   }
-}

Modified: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,32 +1,28 @@
 /*
-* 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.
-*/ 
+ * 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.ExtraClassPoolFactoryParameters;
 import org.jboss.classloading.spi.dependency.Module;
 import org.jboss.logging.Logger;
 
@@ -38,28 +34,16 @@
 public class VFSClassLoaderScopingPolicy implements AOPClassLoaderScopingPolicyWithRegistry
 {
    static Logger log = Logger.getLogger(VFSClassLoaderScopingPolicy.class);
-   DomainRegistry registry = new VFSClassLoaderDomainRegistry();
+   AOPDomainRegistry registry = new AOPVFSClassLoaderDomainRegistry();
    
-   public DomainRegistry getRegistry()
+   public AOPDomainRegistry getRegistry()
    {
       return registry;
    }
 
    public void registerClassLoader(Module module, ClassLoader loader)
    {
-      //Need to pass some data through to the classpoolfactory here
-      Map<Object, Object> properties = new HashMap<Object, Object>();
-      //The module is needed by the JBoss5ClassPoolFactory, the legacy JBossClassPoolFactory will ignore this
-      properties.put(Module.class, module);
-      ExtraClassPoolFactoryParameters.pushThreadProperties(properties);
-      try
-      {
-         AspectManager.instance().registerClassLoader(loader); //Ends up in classpool factory create method
-      }
-      finally
-      {
-         ExtraClassPoolFactoryParameters.popThreadProperties();
-      }
+      AspectManager.instance().registerClassLoader(loader); //Ends up in classpool factory create method
    }
    
    public Domain getDomain(ClassLoader classLoader, AspectManager parent)

Modified: projects/aop/branches/Branch_2_2/asintegration-mc/src/test/java/org/jboss/aop/integration/junit/AOPIntegrationTest.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/test/java/org/jboss/aop/integration/junit/AOPIntegrationTest.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/test/java/org/jboss/aop/integration/junit/AOPIntegrationTest.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,24 +1,24 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.integration.junit;
 
 import java.net.URL;
@@ -26,7 +26,6 @@
 
 import junit.framework.Test;
 
-import org.jboss.aop.AspectManager;
 import org.jboss.classloader.plugins.filter.PatternClassFilter;
 import org.jboss.classloader.spi.ClassLoaderDomain;
 import org.jboss.classloader.spi.ClassLoaderPolicy;
@@ -80,6 +79,12 @@
       super.setUp();
       configureLogging();
    }
+   
+   protected void configureLogging()
+   {
+      super.configureLogging();
+      enableTrace("org.jboss.classpool");
+   }
 
    /**
     * Get the delegate
@@ -105,20 +110,6 @@
    }
 
    /**
-    * Deploy the aop config
-    * 
-    * @param suffix the suffix
-    * @param classLoader the classloader
-    * @param manager the AspectManager/Domain to deploy into
-    * @return the url
-    * @throws Exception for any error
-    */
-   protected URL deploy(String suffix, ClassLoader classLoader, AspectManager manager) throws Exception
-   {
-      return getAOPDelegate().deploy(suffix, classLoader, manager);
-   }
-
-   /**
     * Undeploy the aop config
     * 
     * @param url the url
@@ -127,19 +118,8 @@
    {
       getAOPDelegate().undeploy(url);
    }
-   
+
    /**
-    * Undeploy the aop config
-    * 
-    * @param url the url
-    * @param manager the AspectManager/Domain to undeploy from
-    */
-   protected void undeploy(URL url, AspectManager manager)
-   {
-      getAOPDelegate().undeploy(url, manager);
-   }
-   
-   /**
     * Create a classloader
     * 
     * It exports everything

Deleted: projects/aop/branches/Branch_2_2/asintegration-mc/src/test/java/org/jboss/aop/integration/junit/NotWovenAOPIntegrationTest.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/test/java/org/jboss/aop/integration/junit/NotWovenAOPIntegrationTest.java	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/test/java/org/jboss/aop/integration/junit/NotWovenAOPIntegrationTest.java	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,49 +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.integration.junit;
-
-import org.jboss.test.AbstractTestDelegate;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class NotWovenAOPIntegrationTest extends AOPIntegrationTest
-{
-   public NotWovenAOPIntegrationTest(String name)
-   {
-      // FIXME NotWovenAOPIntegrationTestCase constructor
-      super(name);
-   }
-
-   /**
-    * Get the test delegate
-    * 
-    * @param clazz the test class
-    * @return the delegate
-    */
-   public static AbstractTestDelegate getDelegate(Class<?> clazz)
-   {
-      return new AOPIntegrationTestDelegate(clazz, false, helper.getSystem());
-   }
-}

Modified: projects/aop/branches/Branch_2_2/aspects/.classpath
===================================================================
--- projects/aop/branches/Branch_2_2/aspects/.classpath	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/aspects/.classpath	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,9 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/build/.classpath
===================================================================
--- projects/aop/branches/Branch_2_2/build/.classpath	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/build/.classpath	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,6 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/deployers/.classpath
===================================================================
--- projects/aop/branches/Branch_2_2/deployers/.classpath	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/deployers/.classpath	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,7 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/pluggable-instrumentor/.classpath
===================================================================
--- projects/aop/branches/Branch_2_2/pluggable-instrumentor/.classpath	2010-03-23 13:39:27 UTC (rev 102784)
+++ projects/aop/branches/Branch_2_2/pluggable-instrumentor/.classpath	2010-03-23 13:47:52 UTC (rev 102785)
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list