[jboss-cvs] JBossAS SVN: r104617 - in projects/aop/branches/Branch_2_2: as5integration and 6 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 10 14:26:03 EDT 2010
Author: kabir.khan at jboss.com
Date: 2010-05-10 14:26:02 -0400 (Mon, 10 May 2010)
New Revision: 104617
Added:
projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/LegacyAOPVFSClassLoaderDomainRegistry.java
projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/LegacyVFSClassLoaderScopingPolicy.java
projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop-as5.xml
projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop-as6.xml
Removed:
projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop.xml
Modified:
projects/aop/branches/Branch_2_2/as5integration/pom.xml
projects/aop/branches/Branch_2_2/as5integration/src/assembly/deployers.xml
projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPVFSClassLoaderDomainRegistry.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/SecurityActions.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/resources/META-INF/aop.xml
projects/aop/branches/Branch_2_2/build/build.xml
projects/aop/branches/Branch_2_2/pom.xml
Log:
[JBAOP-788] Make aop use the classpools set up by AS bootstrap in AS 6, and use the legacy classpools in AS 5
Modified: projects/aop/branches/Branch_2_2/as5integration/pom.xml
===================================================================
--- projects/aop/branches/Branch_2_2/as5integration/pom.xml 2010-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/as5integration/pom.xml 2010-05-10 18:26:02 UTC (rev 104617)
@@ -10,6 +10,10 @@
<name>JBoss AOP AS 5 Integration</name>
<description>JBoss AOP AS 5 Integration</description>
+ <properties>
+ <version.classpool.alternative>1.0.0.Alpha3</version.classpool.alternative>
+ </properties>
+
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
@@ -97,7 +101,7 @@
<artifactItem>
<groupId>org.jboss.classpool</groupId>
<artifactId>jboss-classpool-scoped</artifactId>
- <version>1.0.0.Alpha3</version>
+ <version>${version.classpool.alternative}</version>
<type>jar</type>
<outputDirectory>${project.build.directory}/as5-install</outputDirectory>
<destFileName>jboss-classpool-scoped.jar</destFileName>
@@ -105,7 +109,7 @@
<artifactItem>
<groupId>org.jboss.classpool</groupId>
<artifactId>jboss-classpool</artifactId>
- <version>1.0.0.Alpha3</version>
+ <version>${version.classpool.alternative}</version>
<type>jar</type>
<outputDirectory>${project.build.directory}/as5-install</outputDirectory>
<destFileName>jboss-classpool.jar</destFileName>
@@ -113,7 +117,7 @@
<artifactItem>
<groupId>org.jboss.classpool</groupId>
<artifactId>jboss-classpool-jbosscl</artifactId>
- <version>1.0.0.Alpha3</version>
+ <version>${version.classpool.alternative}</version>
<type>jar</type>
<outputDirectory>${project.build.directory}/as5-install</outputDirectory>
<destFileName>jboss-classpool-jbosscl.jar</destFileName>
@@ -130,6 +134,21 @@
<dependencies>
<dependency>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool</artifactId>
+ <version>${version.classpool.alternative}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool-scoped</artifactId>
+ <version>${version.classpool.alternative}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool-jbosscl</artifactId>
+ <version>${version.classpool.alternative}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.aop</groupId>
<artifactId>jboss-aop-asintegration-mc</artifactId>
<exclusions>
@@ -141,6 +160,18 @@
<groupId>org.jboss.deployers</groupId>
<artifactId>jboss-deployers-vfs</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool-scoped</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.classpool</groupId>
+ <artifactId>jboss-classpool-jbosscl</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -169,6 +200,10 @@
</dependency>
</dependencies>
+
+
+
+
<dependencyManagement>
<dependencies>
<dependency>
Modified: projects/aop/branches/Branch_2_2/as5integration/src/assembly/deployers.xml
===================================================================
--- projects/aop/branches/Branch_2_2/as5integration/src/assembly/deployers.xml 2010-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/as5integration/src/assembly/deployers.xml 2010-05-10 18:26:02 UTC (rev 104617)
@@ -23,6 +23,7 @@
<unpack>true</unpack>
<unpackOptions>
<excludes>
+ <exclude>**/Legacy*.class</exclude>
<exclude>**/AspectDeployer*.class</exclude>
</excludes>
</unpackOptions>
Added: projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/LegacyAOPVFSClassLoaderDomainRegistry.java
===================================================================
--- projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/LegacyAOPVFSClassLoaderDomainRegistry.java (rev 0)
+++ projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/LegacyAOPVFSClassLoaderDomainRegistry.java 2010-05-10 18:26:02 UTC (rev 104617)
@@ -0,0 +1,155 @@
+/*
+ * 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 LegacyAOPVFSClassLoaderDomainRegistry 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);
+ }
+
+ public static void main(String[] args)
+ {
+ LegacyAOPVFSClassLoaderDomainRegistry l = new LegacyAOPVFSClassLoaderDomainRegistry();
+ System.out.println("Done");
+ }
+}
\ No newline at end of file
Added: projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/LegacyVFSClassLoaderScopingPolicy.java
===================================================================
--- projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/LegacyVFSClassLoaderScopingPolicy.java (rev 0)
+++ projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/LegacyVFSClassLoaderScopingPolicy.java 2010-05-10 18:26:02 UTC (rev 104617)
@@ -0,0 +1,67 @@
+/*
+ * 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;
+import org.jboss.aop.Domain;
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.logging.Logger;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class LegacyVFSClassLoaderScopingPolicy implements AOPClassLoaderScopingPolicyWithRegistry
+{
+ static Logger log = Logger.getLogger(VFSClassLoaderScopingPolicy.class);
+ AOPDomainRegistry registry = new LegacyAOPVFSClassLoaderDomainRegistry();
+
+ public AOPDomainRegistry getRegistry()
+ {
+ return registry;
+ }
+
+ public void registerClassLoader(Module module, ClassLoader loader)
+ {
+ AspectManager.instance().registerClassLoader(loader); //Ends up in classpool factory create method
+ }
+
+ public Domain getDomain(ClassLoader classLoader, AspectManager parent)
+ {
+ //Check the stored domains
+ Domain domain = registry.getRegisteredDomain(classLoader);
+ if (domain != null)
+ {
+ return domain;
+ }
+
+ return null;
+ }
+
+ public Domain getTopLevelDomain(AspectManager parent)
+ {
+ Thread.currentThread().getContextClassLoader();
+ return null;
+ }
+}
+
Added: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop-as5.xml
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop-as5.xml (rev 0)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop-as5.xml 2010-05-10 18:26:02 UTC (rev 104617)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ AOP configuration
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <classloader><inject bean="aop-classloader:0.0.0"/></classloader>
+
+ <classloader name="aop-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
+ <root>${jboss.lib.url}jboss-aop-asintegration-core.jar</root>
+ <root>${jboss.lib.url}jboss-aop-asintegration-mc.jar</root>
+ <root>${jboss.lib.url}jboss-aop-deployers.jar</root>
+ <root>${jboss.lib.url}jboss-aop-jboss5.jar</root>
+ <root>${jboss.lib.url}jboss-classpool-jbosscl.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-impl.jar</root>
+ </classloader>
+
+ <!-- Integration -->
+ <bean name="AOPClassLoaderScopingPolicy" class="org.jboss.aop.asintegration.jboss5.LegacyVFSClassLoaderScopingPolicy"/>
+
+ <bean name="AOPClassPoolFactory" class="org.jboss.classpool.plugins.jbosscl.JBossClDelegatingClassPoolFactory">
+ <constructor>
+ <parameter><inject bean="AOPClassLoaderScopingPolicy" property="registry"/></parameter>
+ <parameter><inject bean="AOPRegisterModuleCallback"/></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.jboss5.JBoss5Integration">
+ <property name="classPoolFactory"><inject bean="AOPClassPoolFactory"/></property>
+ <property name="aopClassLoaderScopingPolicy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
+ </bean>
+
+ <bean name="DefaultAspectManager" class="org.jboss.aop.microcontainer.beans.metadata.DefaultAspectManager">
+ <property name="managerBean">AspectManager</property>
+ <property name="managerProperty">aspectManager</property>
+ </bean>
+
+ <!-- bean name="AOPBootstrap" class="org.jboss.aop.asintegration.jboss5.AOPBootstrap" -->
+ <!-- This one lives in AS 5 source tree -->
+ <!-- property name="policy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
+ <property name="manager"><inject bean="AspectManager" property="aspectManager"/></property>
+ </bean-->
+
+ <bean name="ClassLoaderDomainRegistry" class="org.jboss.aop.asintegration.jboss5.LegacyAOPVFSClassLoaderDomainRegistry">
+ <constructor factoryMethod="getRegistry">
+ <factory bean="AOPClassLoaderScopingPolicy"/>
+ </constructor>
+ </bean>
+
+
+ <bean name="AOPRegisterModuleCallback" class="org.jboss.classpool.plugins.jbosscl.RegisterModuleCallback">
+ <!-- classloader><null/></classloader -->
+ <constructor>
+ <parameter><inject bean="ClassLoaderDomainRegistry"/></parameter>
+ </constructor>
+ <install method="addModuleRegistry" bean="ClassLoading" whenRequired="Start">
+ <parameter><this/></parameter>
+ </install>
+ <install method="addModule">
+ <parameter><inject bean="bootstrap-classloader:0.0.0$MODULE"/></parameter>
+ </install>
+ <uninstall method="removeModuleRegistry" bean="ClassLoading" whenRequired="Start">
+ <parameter><this/></parameter>
+ </uninstall>
+ </bean>
+
+
+
+ <!--
+ Valid values for the AspectManager bean for use with enableTransformer=true are:
+ * org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
+ * org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
+ -->
+ <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
+ <constructor>
+ <parameter><![CDATA[
+ <aop>
+ <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
+ <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
+ <advice name="process" aspect="mainDeployer"/>
+ </bind>
+ <aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
+ <bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
+ <advice name="setValue" aspect="persist"/>
+ </bind>
+ </aop>]]>
+ </parameter>
+ </constructor>
+
+ <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
+
+ <property name="enableLoadtimeWeaving">false</property>
+ <!-- only relevant when EnableLoadtimeWeaving is true.
+ When transformer is on, every loaded class gets
+ transformed. If AOP can't find the class, then it
+ throws an exception. Sometimes, classes may not have
+ all the classes they reference. So, the Suppressing
+ is needed. (i.e. Jboss cache in the default configuration -->
+ <property name="suppressTransformationErrors">true</property>
+ <property name="prune">true</property>
+ <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
+ <property name="exclude">org.jboss.</property>
+ <!-- This avoids instrumentation of hibernate cglib enhanced proxies
+ <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
+ <property name="optimized">true</property>
+ <property name="verbose">false</property>
+ <!--
+ Available choices for this attribute are:
+ org.jboss.aop.instrument.ClassicInstrumentor (default)
+ org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
+ <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
+ -->
+ <!--
+ By default the deployment of the aspects contained in
+ ../deployers/jboss-aop-jboss5.deployer/base-aspects.xml
+ are not deployed. To turn on deployment uncomment this property
+ <property name="useBaseXml">true</property>
+ -->
+ </bean>
+
+</deployment>
Added: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop-as6.xml
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop-as6.xml (rev 0)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop-as6.xml 2010-05-10 18:26:02 UTC (rev 104617)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ AOP configuration
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <classloader><inject bean="aop-classloader:0.0.0"/></classloader>
+
+ <classloader name="aop-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
+ <root>${jboss.lib.url}jboss-aop-asintegration-core.jar</root>
+ <root>${jboss.lib.url}jboss-aop-asintegration-mc.jar</root>
+ <root>${jboss.lib.url}jboss-aop-deployers.jar</root>
+ <root>${jboss.lib.url}jboss-aop-jboss5.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-impl.jar</root>
+ <root>${jboss.lib.url}jboss-classpool-jbosscl-as.jar</root>
+ </classloader>
+
+ <!--
+ AS > 6.0.0.M3 installs this as part of its bootstrap
+ <bean name="JBossClClassPoolConfig" class="org.jboss.classpool.plugins.jbosscl.JBossClClassPoolConfig">
+ <constructor factoryMethod="getInstance"/>
+ <property name="classLoading"><inject option="CALLBACK"/></property>
+ </bean>
+ -->
+
+
+ <!-- Integration -->
+ <!--
+ It now wraps and delegates to the plain VFSClassLoaderDomainRegistry provided by AS
+ -->
+ <bean name="AOPClassLoaderScopingPolicy" class="org.jboss.aop.asintegration.jboss5.VFSClassLoaderScopingPolicy">
+ <property name="domainRegistry"><inject bean="JBossClClassPoolConfig" property="domainRegistry"/></property>
+ </bean>
+
+ <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.jboss5.JBoss5Integration">
+ <property name="classPoolFactory"><inject bean="JBossClClassPoolConfig" property="classPoolFactory"/></property>
+ <property name="aopClassLoaderScopingPolicy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
+ </bean>
+
+ <bean name="DefaultAspectManager" class="org.jboss.aop.microcontainer.beans.metadata.DefaultAspectManager">
+ <property name="managerBean">AspectManager</property>
+ <property name="managerProperty">aspectManager</property>
+ </bean>
+
+ <bean name="ClassLoaderDomainRegistry" class="org.jboss.aop.asintegration.jboss5.AOPVFSClassLoaderDomainRegistry">
+ <constructor factoryMethod="getRegistry">
+ <factory bean="AOPClassLoaderScopingPolicy"/>
+ </constructor>
+ </bean>
+
+<!--
+ Valid values for the AspectManager bean for use with enableTransformer=true are:
+ * org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
+ * org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
+ -->
+ <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
+ <constructor>
+ <parameter><![CDATA[
+ <aop>
+ <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
+ <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
+ <advice name="process" aspect="mainDeployer"/>
+ </bind>
+ <aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
+ <bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
+ <advice name="setValue" aspect="persist"/>
+ </bind>
+ </aop>]]>
+ </parameter>
+ </constructor>
+
+ <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
+
+ <property name="enableLoadtimeWeaving">false</property>
+ <!-- only relevant when EnableLoadtimeWeaving is true.
+ When transformer is on, every loaded class gets
+ transformed. If AOP can't find the class, then it
+ throws an exception. Sometimes, classes may not have
+ all the classes they reference. So, the Suppressing
+ is needed. (i.e. Jboss cache in the default configuration -->
+ <property name="suppressTransformationErrors">true</property>
+ <property name="prune">true</property>
+ <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
+ <property name="exclude">org.jboss.</property>
+ <!-- This avoids instrumentation of hibernate cglib enhanced proxies
+ <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
+ <property name="optimized">true</property>
+ <property name="verbose">false</property>
+ <!--
+ Available choices for this attribute are:
+ org.jboss.aop.instrument.ClassicInstrumentor (default)
+ org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
+ <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
+ -->
+ <!--
+ By default the deployment of the aspects contained in
+ ../deployers/jboss-aop-jboss5.deployer/base-aspects.xml
+ are not deployed. To turn on deployment uncomment this property
+ <property name="useBaseXml">true</property>
+ -->
+ </bean>
+
+</deployment>
\ No newline at end of file
Deleted: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop.xml
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop.xml 2010-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop.xml 2010-05-10 18:26:02 UTC (rev 104617)
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- AOP configuration
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <classloader><inject bean="aop-classloader:0.0.0"/></classloader>
-
- <classloader name="aop-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
- <root>${jboss.lib.url}jboss-aop-asintegration-core.jar</root>
- <root>${jboss.lib.url}jboss-aop-asintegration-mc.jar</root>
- <root>${jboss.lib.url}jboss-aop-deployers.jar</root>
- <root>${jboss.lib.url}jboss-aop-jboss5.jar</root>
- <root>${jboss.lib.url}jboss-classpool-jbosscl.jar</root>
- <root>${jboss.lib.url}jboss-deployers-impl.jar</root>
- </classloader>
-
- <!-- Integration -->
- <bean name="AOPClassLoaderScopingPolicy" class="org.jboss.aop.asintegration.jboss5.VFSClassLoaderScopingPolicy"/>
-
- <bean name="AOPClassPoolFactory" class="org.jboss.classpool.plugins.jbosscl.JBossClDelegatingClassPoolFactory">
- <constructor>
- <parameter><inject bean="AOPClassLoaderScopingPolicy" property="registry"/></parameter>
- <parameter><inject bean="AOPRegisterModuleCallback"/></parameter>
- </constructor>
- </bean>
-
- <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.jboss5.JBoss5Integration">
- <property name="classPoolFactory"><inject bean="AOPClassPoolFactory"/></property>
- <property name="aopClassLoaderScopingPolicy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
- </bean>
-
- <bean name="DefaultAspectManager" class="org.jboss.aop.microcontainer.beans.metadata.DefaultAspectManager">
- <property name="managerBean">AspectManager</property>
- <property name="managerProperty">aspectManager</property>
- </bean>
-
- <!-- bean name="AOPBootstrap" class="org.jboss.aop.asintegration.jboss5.AOPBootstrap" -->
- <!-- This one lives in AS 5 source tree -->
- <!-- property name="policy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
- <property name="manager"><inject bean="AspectManager" property="aspectManager"/></property>
- </bean-->
-
-<bean name="ClassLoaderDomainRegistry" class="org.jboss.aop.asintegration.jboss5.AOPVFSClassLoaderDomainRegistry">
- <constructor factoryMethod="getRegistry">
- <factory bean="AOPClassLoaderScopingPolicy"/>
- </constructor>
- </bean>
-
-
- <bean name="AOPRegisterModuleCallback" class="org.jboss.classpool.plugins.jbosscl.RegisterModuleCallback">
- <!-- classloader><null/></classloader -->
- <constructor>
- <parameter><inject bean="ClassLoaderDomainRegistry"/></parameter>
- </constructor>
- <install method="addModuleRegistry" bean="ClassLoading" whenRequired="Start">
- <parameter><this/></parameter>
- </install>
- <install method="addModule">
- <parameter><inject bean="bootstrap-classloader:0.0.0$MODULE"/></parameter>
- </install>
-<!-- <install method="addModule" -->
- <uninstall method="removeModuleRegistry" bean="ClassLoading" whenRequired="Start">
- <parameter><this/></parameter>
- </uninstall>
- </bean>
-
-
-
-<!--
- Valid values for the AspectManager bean for use with enableTransformer=true are:
- * org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
- * org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
- -->
- <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
- <constructor>
- <parameter><![CDATA[
- <aop>
- <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
- <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
- <advice name="process" aspect="mainDeployer"/>
- </bind>
- <aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
- <bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
- <advice name="setValue" aspect="persist"/>
- </bind>
- </aop>]]>
- </parameter>
- </constructor>
-
- <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
-
- <property name="enableLoadtimeWeaving">false</property>
- <!-- only relevant when EnableLoadtimeWeaving is true.
- When transformer is on, every loaded class gets
- transformed. If AOP can't find the class, then it
- throws an exception. Sometimes, classes may not have
- all the classes they reference. So, the Suppressing
- is needed. (i.e. Jboss cache in the default configuration -->
- <property name="suppressTransformationErrors">true</property>
- <property name="prune">true</property>
- <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
- <property name="exclude">org.jboss.</property>
- <!-- This avoids instrumentation of hibernate cglib enhanced proxies
- <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
- <property name="optimized">true</property>
- <property name="verbose">false</property>
- <!--
- Available choices for this attribute are:
- org.jboss.aop.instrument.ClassicInstrumentor (default)
- org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
- <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
- -->
- <!--
- By default the deployment of the aspects contained in
- ../deployers/jboss-aop-jboss5.deployer/base-aspects.xml
- are not deployed. To turn on deployment uncomment this property
- <property name="useBaseXml">true</property>
- -->
- </bean>
-
-</deployment>
Modified: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPVFSClassLoaderDomainRegistry.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPVFSClassLoaderDomainRegistry.java 2010-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/AOPVFSClassLoaderDomainRegistry.java 2010-05-10 18:26:02 UTC (rev 104617)
@@ -31,16 +31,23 @@
import org.jboss.aop.Domain;
import org.jboss.classloader.spi.ClassLoaderDomain;
+import org.jboss.classloader.spi.ClassLoaderSystem;
import org.jboss.classloading.spi.dependency.Module;
-import org.jboss.classpool.plugins.jbosscl.VFSClassLoaderDomainRegistry;
+import org.jboss.classpool.plugins.jbosscl.DomainRegistry;
/**
+ * Delegates to the VFSClasLoaderDomainRegistry
*
* @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
-public class AOPVFSClassLoaderDomainRegistry extends VFSClassLoaderDomainRegistry implements AOPDomainRegistry
+public class AOPVFSClassLoaderDomainRegistry implements AOPDomainRegistry, DomainRegistry.Callback
{
+ private final static ClassLoaderDomain domain = new ClassLoaderDomain("NOT_USED_PLACEHOLDER");
+
+ private final DomainRegistry delegate;
+
/** aopDomains by classloader */
private Map<ClassLoader, ScopedVFSClassLoaderDomain> aopDomainsByClassLoader = new WeakHashMap<ClassLoader, ScopedVFSClassLoaderDomain>();
@@ -51,6 +58,12 @@
private ScopedVFSClassLoaderDomain initDomain = null;
+ public AOPVFSClassLoaderDomainRegistry(DomainRegistry delegate)
+ {
+ this.delegate = delegate;
+ delegate.addCallback(this);
+ }
+
public List<ScopedVFSClassLoaderDomain> getAOPDomainsForClassLoaderDomain(ClassLoaderDomain domain)
{
List<ScopedVFSClassLoaderDomain> domains = aopDomainsByClassLoaderDomain.get(domain);
@@ -77,17 +90,96 @@
this.initDomain = domain;
}
- @Override
- protected void validateInitMaps(ClassLoader loader, ClassLoaderDomain loaderDomain, Module module, ClassLoader parentUnitLoader)
+
+
+ /**
+ * @param module
+ * @see org.jboss.classpool.plugins.jbosscl.DomainRegistry#cleanupModule(org.jboss.classloading.spi.dependency.Module)
+ */
+ public void cleanupModule(Module module)
{
+ delegate.cleanupModule(module);
+ }
+
+ /**
+ * @param module
+ * @return
+ * @see org.jboss.classpool.plugins.jbosscl.DomainRegistry#getClassLoader(org.jboss.classloading.spi.dependency.Module)
+ */
+ public ClassLoader getClassLoader(Module module)
+ {
+ return delegate.getClassLoader(module);
+ }
+
+ /**
+ * @param cl
+ * @return
+ * @see org.jboss.classpool.plugins.jbosscl.DomainRegistry#getClassLoaderDomainForLoader(java.lang.ClassLoader)
+ */
+ public ClassLoaderDomain getClassLoaderDomainForLoader(ClassLoader cl)
+ {
+ return delegate.getClassLoaderDomainForLoader(cl);
+ }
+
+ /**
+ * @return
+ * @see org.jboss.classpool.plugins.jbosscl.DomainRegistry#getDefaultDomain()
+ */
+ public ClassLoaderDomain getDefaultDomain()
+ {
+ return delegate.getDefaultDomain();
+ }
+
+ /**
+ * @param loader
+ * @return
+ * @see org.jboss.classpool.plugins.jbosscl.DomainRegistry#getModule(java.lang.ClassLoader)
+ */
+ public Module getModule(ClassLoader loader)
+ {
+ return delegate.getModule(loader);
+ }
+
+ /**
+ * @param loader
+ * @return
+ * @see org.jboss.classpool.plugins.jbosscl.DomainRegistry#getParentUnitLoader(java.lang.ClassLoader)
+ */
+ public ClassLoader getParentUnitLoader(ClassLoader loader)
+ {
+ return delegate.getParentUnitLoader(loader);
+ }
+
+ /**
+ * @return
+ * @see org.jboss.classpool.plugins.jbosscl.DomainRegistry#getSystem()
+ */
+ public ClassLoaderSystem getSystem()
+ {
+ return delegate.getSystem();
+ }
+
+ /**
+ * @param module
+ * @return
+ * @see org.jboss.classpool.plugins.jbosscl.DomainRegistry#initMapsForModule(org.jboss.classloading.spi.dependency.Module)
+ */
+ public boolean initMapsForModule(Module module)
+ {
+ return delegate.initMapsForModule(module);
+ }
+
+ //@Override
+ public 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)
+ //@Override
+ public void initMapsDone(ClassLoader loader, ClassLoaderDomain loaderDomain, Module module, ClassLoader parentUnitLoader)
{
if (initDomain != null)
{
@@ -124,7 +216,7 @@
}
}
- @Override
+ //@Override
public synchronized void cleanupLoaderDone(ClassLoader loader, ClassLoaderDomain loaderDomain, int domainReferences)
{
if (loaderDomain != null)
@@ -146,4 +238,14 @@
}
aopDomainsByClassLoader.remove(loader);
}
+
+ public void addCallback(Callback callback)
+ {
+ delegate.addCallback(callback);
+ }
+
+ public void removeCallback(Callback callback)
+ {
+ delegate.removeCallback(callback);
+ }
}
\ No newline at end of file
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-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/JBoss5Integration.java 2010-05-10 18:26:02 UTC (rev 104617)
@@ -38,7 +38,6 @@
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;
/**
@@ -130,16 +129,7 @@
public void setClassPoolFactory(ScopedClassPoolFactory factory)
{
- if (factory instanceof AbstractClassPoolFactory)
- {
- ClassPoolRepository.getInstance().setClassPoolFactory((AbstractClassPoolFactory) factory);
- this.delegateClassPoolFactory = factory;
- }
- else
- {
- this.delegateClassPoolFactory = factory;
- }
- ClassPoolRepository.getInstance().setClassPoolFactory(delegateClassPoolFactory);
+ this.delegateClassPoolFactory = factory;
}
public synchronized ScopedClassPoolFactory createScopedClassPoolFactory(File tmpDir) throws Exception
Modified: projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/SecurityActions.java
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/SecurityActions.java 2010-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/SecurityActions.java 2010-05-10 18:26:02 UTC (rev 104617)
@@ -21,10 +21,14 @@
*/
package org.jboss.aop.asintegration.jboss5;
+import java.lang.reflect.Method;
import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
+import org.jboss.classloader.spi.base.BaseClassLoaderSource;
+
/**
*
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
@@ -77,4 +81,38 @@
return GetParentAction.PRIVILEGED.getParent(loader);
}
}
+
+ private static final Method getClassLoader;
+
+ static
+ {
+ getClassLoader = AccessController.doPrivileged(new PrivilegedAction<Method>()
+ {
+ public Method run()
+ {
+ try
+ {
+ Method method = BaseClassLoaderSource.class.getDeclaredMethod("getClassLoader");
+ method.setAccessible(true);
+ return method;
+ }
+ catch (NoSuchMethodException e)
+ {
+ throw new RuntimeException("Cannot get classloader from " + BaseClassLoaderSource.class.getName(), e);
+ }
+ }
+ });
+ }
+
+ static ClassLoader getClassLoader(BaseClassLoaderSource clSource)
+ {
+ try
+ {
+ return (ClassLoader)getClassLoader.invoke(clSource);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
}
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-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/main/java/org/jboss/aop/asintegration/jboss5/VFSClassLoaderScopingPolicy.java 2010-05-10 18:26:02 UTC (rev 104617)
@@ -24,6 +24,7 @@
import org.jboss.aop.AspectManager;
import org.jboss.aop.Domain;
import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.classpool.plugins.jbosscl.DomainRegistry;
import org.jboss.logging.Logger;
/**
@@ -34,8 +35,23 @@
public class VFSClassLoaderScopingPolicy implements AOPClassLoaderScopingPolicyWithRegistry
{
static Logger log = Logger.getLogger(VFSClassLoaderScopingPolicy.class);
- AOPDomainRegistry registry = new AOPVFSClassLoaderDomainRegistry();
+ /** The raw DomainRegistry coming from the classpools */
+ private DomainRegistry domainRegistry;
+
+ /** The aop domain registry */
+ private AOPDomainRegistry registry = null;
+
+ /**
+ * Sets the raw DomainRegistry coming from classpools
+ *
+ * @param domainRegistry The classpool DomainRegistry
+ */
+ public void setDomainRegistry(DomainRegistry domainRegistry)
+ {
+ this.domainRegistry = domainRegistry;
+ }
+
public AOPDomainRegistry getRegistry()
{
return registry;
@@ -63,5 +79,14 @@
Thread.currentThread().getContextClassLoader();
return null;
}
+
+ public void start()
+ {
+ if (domainRegistry == null)
+ {
+ throw new IllegalStateException("Null registry");
+ }
+ registry = new AOPVFSClassLoaderDomainRegistry(domainRegistry);
+ }
}
Modified: projects/aop/branches/Branch_2_2/asintegration-mc/src/resources/META-INF/aop.xml
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-mc/src/resources/META-INF/aop.xml 2010-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/asintegration-mc/src/resources/META-INF/aop.xml 2010-05-10 18:26:02 UTC (rev 104617)
@@ -9,23 +9,32 @@
<classloader name="aop-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
<root>${jboss.lib.url}jboss-aop-asintegration-core.jar</root>
- <root>${jboss.lib.url}jboss-aop-asintegration-jmx.jar</root>
<root>${jboss.lib.url}jboss-aop-asintegration-mc.jar</root>
+ <root>${jboss.lib.url}jboss-aop-deployers.jar</root>
<root>${jboss.lib.url}jboss-aop-jboss5.jar</root>
+ <root>${jboss.lib.url}jboss-deployers-impl.jar</root>
+ <root>${jboss.lib.url}jboss-classpool-jbosscl-as.jar</root>
</classloader>
+ <!--
+ AS > 6.0.0.M3 installs this as part of its bootstrap
+ <bean name="JBossClClassPoolConfig" class="org.jboss.classpool.plugins.jbosscl.JBossClClassPoolConfig">
+ <constructor factoryMethod="getInstance"/>
+ <property name="classLoading"><inject option="CALLBACK"/></property>
+ </bean>
+ -->
+
+
<!-- Integration -->
- <bean name="AOPClassLoaderScopingPolicy" class="org.jboss.aop.asintegration.jboss5.VFSClassLoaderScopingPolicy"/>
+ <!--
+ It now wraps and delegates to the plain VFSClassLoaderDomainRegistry provided by AS
+ -->
+ <bean name="AOPClassLoaderScopingPolicy" class="org.jboss.aop.asintegration.jboss5.VFSClassLoaderScopingPolicy">
+ <property name="domainRegistry"><inject bean="JBossClClassPoolConfig" property="domainRegistry"/></property>
+ </bean>
- <bean name="AOPClassPoolFactory" class="org.jboss.aop.classpool.jbosscl.JBossClDelegatingClassPoolFactory">
- <constructor>
- <parameter><inject bean="AOPClassLoaderScopingPolicy" property="registry"/></parameter>
- <parameter><inject bean="AOPRegisterModuleCallback"/></parameter>
- </constructor>
- </bean>
-
<bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.jboss5.JBoss5Integration">
- <property name="classPoolFactory"><inject bean="AOPClassPoolFactory"/></property>
+ <property name="classPoolFactory"><inject bean="JBossClClassPoolConfig" property="classPoolFactory"/></property>
<property name="aopClassLoaderScopingPolicy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
</bean>
@@ -34,18 +43,13 @@
<property name="managerProperty">aspectManager</property>
</bean>
- <!-- bean name="AOPBootstrap" class="org.jboss.aop.asintegration.jboss5.AOPBootstrap" -->
- <!-- This one lives in AS 5 source tree -->
- <!-- property name="policy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
- <property name="manager"><inject bean="AspectManager" property="aspectManager"/></property>
- </bean-->
+ <bean name="ClassLoaderDomainRegistry" class="org.jboss.aop.asintegration.jboss5.AOPVFSClassLoaderDomainRegistry">
+ <constructor factoryMethod="getRegistry">
+ <factory bean="AOPClassLoaderScopingPolicy"/>
+ </constructor>
+ </bean>
- <bean name="AOPRegisterModuleCallback" class="org.jboss.aop.asintegration.jboss5.RegisterModuleCallback">
- <!-- classloader><null/></classloader -->
- <incallback method="addModule" state="Installed"/>
- <uncallback method="removeModule" state="Installed"/>
- </bean>
- <!--
+<!--
Valid values for the AspectManager bean for use with enableTransformer=true are:
* org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
* org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
@@ -53,17 +57,17 @@
<bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
<constructor>
<parameter><![CDATA[
- <aop>
- <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
- <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
- <advice name="process" aspect="mainDeployer"/>
- </bind>
- <aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
- <bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
- <advice name="setValue" aspect="persist"/>
- </bind>
- </aop>]]>
- </parameter>
+ <aop>
+ <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
+ <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
+ <advice name="process" aspect="mainDeployer"/>
+ </bind>
+ <aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
+ <bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
+ <advice name="setValue" aspect="persist"/>
+ </bind>
+ </aop>]]>
+ </parameter>
</constructor>
<property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
@@ -89,12 +93,12 @@
org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
<property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
-->
- <!--
- By default the deployment of the aspects contained in
- ../deployers/jboss-aop-jboss5.deployer/base-aspects.xml
- are not deployed. To turn on deployment uncomment this property
- <property name="useBaseXml">true</property>
- -->
+ <!--
+ By default the deployment of the aspects contained in
+ ../deployers/jboss-aop-jboss5.deployer/base-aspects.xml
+ are not deployed. To turn on deployment uncomment this property
+ <property name="useBaseXml">true</property>
+ -->
</bean>
-</deployment>
+</deployment>
\ No newline at end of file
Modified: projects/aop/branches/Branch_2_2/build/build.xml
===================================================================
--- projects/aop/branches/Branch_2_2/build/build.xml 2010-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/build/build.xml 2010-05-10 18:26:02 UTC (rev 104617)
@@ -332,7 +332,8 @@
<property name="aop.readme-as5.location" value="${project.root}/asintegration-core/src/etc/ReadMe-AS5.txt"/>
<property name="aop.readme-as6.location" value="${project.root}/asintegration-core/src/etc/ReadMe-AS6.txt"/>
<property name="aop.jboss-service.location" value="${project.root}/asintegration-jmx/src/resources/META-INF/jboss-service.xml"/>
- <property name="jboss-install-aop.xml.location" value="${project.root}/asintegration-core/src/etc/jboss-install-aop.xml"/>
+ <property name="jboss-install-aop-as5.xml.location" value="${project.root}/asintegration-core/src/etc/jboss-install-aop-as5.xml"/>
+ <property name="jboss-install-aop-as6.xml.location" value="${project.root}/asintegration-core/src/etc/jboss-install-aop-as6.xml"/>
<property name="jboss-50-run.conf.location" value="${project.root}/asintegration-core/src/etc/jboss-50-run.conf"/>
<property name="jboss-50-run.conf.bat.location" value="${project.root}/asintegration-core/src/etc/jboss-50-run.conf.bat"/>
@@ -386,14 +387,14 @@
<copy todir="${project.release}/jboss-50-install" file="${aop.readme-as5.location}"/>
<copy tofile="${project.release}/jboss-50-install/build.xml" file="../asintegration-core/src/etc/jboss-50-install-jboss-aop-jdk50-build.xml"/>
<copy todir="${project.release}/jboss-50-install" file="../asintegration-core/src/etc/jboss.properties"/>
- <copy tofile="${project.release}/jboss-50-install/aop.xml" file="${jboss-install-aop.xml.location}"/>
+ <copy tofile="${project.release}/jboss-50-install/aop.xml" file="${jboss-install-aop-as5.xml.location}"/>
<copy tofile="${project.release}/jboss-50-install/append-run.conf" file="${jboss-50-run.conf.location}"/>
<copy tofile="${project.release}/jboss-50-install/append-run.conf.bat" file="${jboss-50-run.conf.bat.location}"/>
<!-- The JBoss 6 libs for JDK 6 (JBoss 6 needs JDK6) -->
<copy todir="${project.release}/jboss-60-install" file="${aop.readme-as6.location}"/>
<copy tofile="${project.release}/jboss-60-install/build.xml" file="../asintegration-core/src/etc/jboss-60-install-jboss-aop-build.xml"/>
- <copy tofile="${project.release}/jboss-60-install/aop.xml" file="${jboss-install-aop.xml.location}"/>
+ <copy tofile="${project.release}/jboss-60-install/aop.xml" file="${jboss-install-aop-as6.xml.location}"/>
<copy todir="${project.release}/jboss-60-install" file="../asintegration-core/src/etc/jboss.properties"/>
<copy todir="${project.release}/jboss-60-install/lib" file="${aop.asintegration-core.location}"/>
<copy todir="${project.release}/jboss-60-install/lib" file="${aop.asintegration-mc.location}"/>
Modified: projects/aop/branches/Branch_2_2/pom.xml
===================================================================
--- projects/aop/branches/Branch_2_2/pom.xml 2010-05-10 18:24:28 UTC (rev 104616)
+++ projects/aop/branches/Branch_2_2/pom.xml 2010-05-10 18:26:02 UTC (rev 104617)
@@ -21,7 +21,7 @@
<properties>
<version.javassist.javassist>3.11.0.GA</version.javassist.javassist>
- <version.org.jboss.classpool>1.0.0.Alpha4</version.org.jboss.classpool>
+ <version.org.jboss.classpool>1.0.0-SNAPSHOT</version.org.jboss.classpool>
<version.org.jboss.jboss-common-core>2.2.17.GA</version.org.jboss.jboss-common-core>
<version.org.jboss.cl>2.2.0.Alpha4</version.org.jboss.cl>
<version.org.jboss.deployers>2.2.0.Alpha4</version.org.jboss.deployers>
More information about the jboss-cvs-commits
mailing list