[jboss-cvs] JBossAS SVN: r78854 - in projects/aop/trunk/asintegration-core: src/main/org/jboss/aop and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 25 10:24:41 EDT 2008


Author: kabir.khan at jboss.com
Date: 2008-09-25 10:24:41 -0400 (Thu, 25 Sep 2008)
New Revision: 78854

Removed:
   projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/asintegration/jboss4/
   projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/deployers/
   projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/deployment/
   projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/domain/ScopedRepositoryClassLoaderDomain.java
   projects/aop/trunk/asintegration-core/src/resources/META-INF/
   projects/aop/trunk/asintegration-core/src/resources/tests/
   projects/aop/trunk/asintegration-core/src/tests/org/jboss/aop/integration/
   projects/aop/trunk/asintegration-core/src/tests/org/jboss/test/aop/integration/
Modified:
   projects/aop/trunk/asintegration-core/.classpath
   projects/aop/trunk/asintegration-core/.project
   projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java
Log:
[JBAOP-652] Remove files not belonging in asintegration-core

Modified: projects/aop/trunk/asintegration-core/.classpath
===================================================================
--- projects/aop/trunk/asintegration-core/.classpath	2008-09-25 13:39:14 UTC (rev 78853)
+++ projects/aop/trunk/asintegration-core/.classpath	2008-09-25 14:24:41 UTC (rev 78854)
@@ -10,18 +10,10 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/common-logging-spi/lib/jboss-logging-spi.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/integration/lib/jboss-classloading-spi.jar" sourcepath="/thirdparty/jboss/integration/lib/jboss-classloading-spi-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-vfs/lib/jboss-vfs.jar" sourcepath="/thirdparty/jboss/jboss-vfs/lib/jboss-vfs-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-mdr/lib/jboss-mdr.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-deployers/lib/jboss-deployers-vfs-spi.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-deployers/lib/jboss-deployers-spi.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-deployers/lib/jboss-deployers-core-spi.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-deployers/lib/jboss-deployers-structure-spi.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-deployers/lib/jboss-deployers-client-spi.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-managed/lib/jboss-managed.jar"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-cl/lib/jboss-classloader.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/pluggable-instrumentor"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: projects/aop/trunk/asintegration-core/.project
===================================================================
--- projects/aop/trunk/asintegration-core/.project	2008-09-25 13:39:14 UTC (rev 78853)
+++ projects/aop/trunk/asintegration-core/.project	2008-09-25 14:24:41 UTC (rev 78854)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>asintegration</name>
+	<name>asintegration-core</name>
 	<comment></comment>
 	<projects>
 	</projects>

Modified: projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java	2008-09-25 13:39:14 UTC (rev 78853)
+++ projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java	2008-09-25 14:24:41 UTC (rev 78854)
@@ -36,7 +36,6 @@
 import javassist.ClassPool;
 import javassist.scopedpool.ScopedClassPoolFactory;
 
-import javax.management.ObjectName;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.jboss.aop.AspectManager;
@@ -51,16 +50,12 @@
 import org.jboss.aop.advice.InterceptorFactory;
 import org.jboss.aop.annotation.PortableAnnotationElement;
 import org.jboss.aop.asintegration.JBossIntegration;
-import org.jboss.aop.asintegration.jboss4.JBoss4Integration;
 import org.jboss.aop.hook.JDK14Transformer;
 import org.jboss.aop.hook.JDK14TransformerManager;
 import org.jboss.aop.instrument.InstrumentorFactory;
 import org.jboss.aop.instrument.TransformerCommon;
 import org.jboss.aop.introduction.InterfaceIntroduction;
 import org.jboss.logging.Logger;
-import org.jboss.mx.loading.HeirarchicalLoaderRepository3;
-import org.jboss.mx.server.ServerConstants;
-import org.jboss.mx.util.ObjectNameFactory;
 import org.jboss.system.server.ServerConfig;
 import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
@@ -82,11 +77,16 @@
       Class<?> clazz = TransformerCommon.class;
       clazz = SuperClassesFirstWeavingStrategy.class;
       clazz = ClassicWeavingStrategy.class;
-      clazz = HeirarchicalLoaderRepository3.class;
+      try
+      {
+         //FIXME Move out to where the RepositoryClassLoader is initialised 
+         clazz = Class.forName("org.jboss.mx.loading.HeirarchicalLoaderRepository3");
+      }
+      catch (ClassNotFoundException e)
+      {
+      }
    }
 
-   public static final ObjectName DEFAULT_LOADER_REPOSITORY = ObjectNameFactory.create(ServerConstants.DEFAULT_LOADER_NAME);
-
    // Attributes ---------------------------------------------------
 
 //   boolean created = false;
@@ -213,9 +213,10 @@
     */
    protected JBossIntegration initIntegration()
    {
-      // Default to old JBoss4 integration when not configured
       if (integration == null)
-         integration = new JBoss4Integration();
+      {
+         throw new IllegalStateException("Integration was not set");
+      }
       return integration;
    }
    

Deleted: projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/domain/ScopedRepositoryClassLoaderDomain.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/domain/ScopedRepositoryClassLoaderDomain.java	2008-09-25 13:39:14 UTC (rev 78853)
+++ projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/domain/ScopedRepositoryClassLoaderDomain.java	2008-09-25 14:24:41 UTC (rev 78854)
@@ -1,137 +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.domain;
-
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.advice.AspectDefinition;
-import org.jboss.mx.loading.HeirarchicalLoaderRepository3;
-import org.jboss.mx.loading.LoaderRepository;
-import org.jboss.mx.loading.RepositoryClassLoader;
-
-
-/**
- * A domain that is used for scoped classloaders
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @author adrian at jboss.org
- * @version $Revision: 1.1 $
- */
-public class ScopedRepositoryClassLoaderDomain extends ScopedClassLoaderDomain
-{
-   public ScopedRepositoryClassLoaderDomain(ClassLoader loader, String name, boolean parentDelegation, AspectManager manager, boolean parentFirst)
-   {
-      super(loader, name, parentDelegation, manager, parentFirst);
-   }
-
-   // FIXME: JBAOP-107 REMOVE THIS HACK
-   public boolean isValid()
-   {
-      RepositoryClassLoader cl = (RepositoryClassLoader) getClassLoader();
-      if (cl == null)
-         return false;
-      return cl.getLoaderRepository() != null;
-   }
-
-   protected Object getPerVmAspectWithNoParentDelegation(String def)
-   {
-      Object aspect = myPerVMAspects.get(def);
-      if (aspect != null)
-      {
-         return aspect;
-      }
-
-      aspect = super.getSuperPerVmAspect(def);
-      if (aspect != null)
-      {
-         synchronized(myPerVMAspects)
-         {
-            LoaderRepository loadingRepository = getAspectRepository(aspect);
-            LoaderRepository myRepository = getScopedRepository();
-            if (loadingRepository == myRepository)
-            {
-               //The parent does not load this class
-               myPerVMAspects.put(def, aspect);
-            }
-            else
-            {
-               //The class has been loaded by a parent classloader, find out if we also have a copy
-               try
-               {
-                  Class<?> clazz = myRepository.loadClass(aspect.getClass().getName());
-                  if (clazz == aspect.getClass())
-                  {
-                     notMyPerVMAspects.put(def, Boolean.TRUE);
-                  }
-                  else
-                  {
-                     //We have a different version of the class deployed
-                     AspectDefinition aspectDefinition = getAspectDefinition(def);
-                     //Override the classloader to create the aspect instance
-                     aspect = createPerVmAspect(def, aspectDefinition, getClassLoader());
-                     myPerVMAspects.put(def, aspect);
-                  }
-               }
-               catch (ClassNotFoundException e)
-               {
-                  throw new RuntimeException(e);
-               }
-            }
-         }
-      }
-      
-      return aspect;
-   }
-   
-   
-   
-   private LoaderRepository getAspectRepository(Object aspect)
-   {
-      ClassLoader cl = aspect.getClass().getClassLoader();
-      ClassLoader parent = cl;
-      while (parent != null)
-      {
-         if (parent instanceof RepositoryClassLoader)
-         {
-            return ((RepositoryClassLoader)parent).getLoaderRepository();
-         }
-         parent = parent.getParent();
-      }
-      return null;
-   }
-   
-   private HeirarchicalLoaderRepository3 getScopedRepository()
-   {
-      ClassLoader classloader = getClassLoader();
-      if (classloader == null)
-         throw new IllegalStateException("ClassLoader no longer exists: " + classLoaderString);
-      if (classloader instanceof RepositoryClassLoader == false)
-         throw new IllegalStateException("ClassLoader is not an instanceof RepositoryClassLoader " + classLoaderString);
-      RepositoryClassLoader repositoryClassLoader = (RepositoryClassLoader) classloader;
-      LoaderRepository loaderRepository = repositoryClassLoader.getLoaderRepository();
-      if (loaderRepository == null)
-         throw new IllegalStateException("ClassLoader has been undeployed: " + classLoaderString);
-      if (loaderRepository instanceof HeirarchicalLoaderRepository3 == false)
-         throw new IllegalStateException("Repository " + loaderRepository + " for classlaoder " + classLoaderString + " is not an HeirarchicalLoaderRepository3");
-      return (HeirarchicalLoaderRepository3) loaderRepository;
-   }
-}




More information about the jboss-cvs-commits mailing list