[jboss-cvs] JBossAS SVN: r68886 - in branches/EMBEDDED_JBOSS_BETA3: aspects/src/main/org/jboss/aop/asintegration and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jan 11 08:08:17 EST 2008


Author: kabir.khan at jboss.com
Date: 2008-01-11 08:08:17 -0500 (Fri, 11 Jan 2008)
New Revision: 68886

Added:
   branches/EMBEDDED_JBOSS_BETA3/aspects/src/main/org/jboss/aop/asintegration/embedded/
   branches/EMBEDDED_JBOSS_BETA3/aspects/src/main/org/jboss/aop/asintegration/embedded/JBossEmbeddedUCLIntegration.java
Modified:
   branches/EMBEDDED_JBOSS_BETA3/aspects/build.xml
   branches/EMBEDDED_JBOSS_BETA3/embedded/build.xml
   branches/EMBEDDED_JBOSS_BETA3/embedded/src/main/resources/javase/deployers/aspect-deployer-beans.xml
Log:
[EMB-5] Accept  launcher classloader as a valid classloader in jboss embedded

Modified: branches/EMBEDDED_JBOSS_BETA3/aspects/build.xml
===================================================================
--- branches/EMBEDDED_JBOSS_BETA3/aspects/build.xml	2008-01-11 12:56:02 UTC (rev 68885)
+++ branches/EMBEDDED_JBOSS_BETA3/aspects/build.xml	2008-01-11 13:08:17 UTC (rev 68886)
@@ -236,11 +236,19 @@
       <jar destfile="${build.lib}/jboss-aop-jboss5.jar" manifest="${build.etc}/default.mf"
          update="${jar.update}" index="${jar.index}">
          <fileset dir="${build.classes}">
-			   <!--include name="org/jboss/aop/deployers/JBossAspectLibrary.class"/-->
-			   <include name="org/jboss/aop/asintegration/jboss5/**"/>
+            <!--include name="org/jboss/aop/deployers/JBossAspectLibrary.class"/-->
+            <include name="org/jboss/aop/asintegration/jboss5/**"/>
          </fileset>
       </jar>
 
+      <!-- Build jboss-aop-jboss5.jar -->
+      <jar destfile="${build.lib}/jboss-aop-embedded.jar" manifest="${build.etc}/default.mf"
+         update="${jar.update}" index="${jar.index}">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/aop/asintegration/embedded/**"/>
+         </fileset>
+      </jar>
+
       <!-- Build client jar containing the minimum needed for ejb 3 -->
       <jar destfile="${build.lib}/jboss-aspect-jdk50-client.jar" manifest="${build.etc}/default.mf"
          update="${jar.update}" index="${jar.index}">

Added: branches/EMBEDDED_JBOSS_BETA3/aspects/src/main/org/jboss/aop/asintegration/embedded/JBossEmbeddedUCLIntegration.java
===================================================================
--- branches/EMBEDDED_JBOSS_BETA3/aspects/src/main/org/jboss/aop/asintegration/embedded/JBossEmbeddedUCLIntegration.java	                        (rev 0)
+++ branches/EMBEDDED_JBOSS_BETA3/aspects/src/main/org/jboss/aop/asintegration/embedded/JBossEmbeddedUCLIntegration.java	2008-01-11 13:08:17 UTC (rev 68886)
@@ -0,0 +1,40 @@
+/*
+* 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.embedded;
+
+import org.jboss.aop.asintegration.jboss4.JBoss4Integration;
+import org.jboss.mx.loading.RepositoryClassLoader;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class JBossEmbeddedUCLIntegration extends JBoss4Integration
+{
+   public boolean isValidClassLoader(ClassLoader loader)
+   {
+      //Accept all loaders as valid, and reject repository classloaders with null repository
+      if (!(loader instanceof RepositoryClassLoader)) return true;
+      return ((RepositoryClassLoader) loader).getLoaderRepository() != null;
+   }
+}

Modified: branches/EMBEDDED_JBOSS_BETA3/embedded/build.xml
===================================================================
--- branches/EMBEDDED_JBOSS_BETA3/embedded/build.xml	2008-01-11 12:56:02 UTC (rev 68885)
+++ branches/EMBEDDED_JBOSS_BETA3/embedded/build.xml	2008-01-11 13:08:17 UTC (rev 68886)
@@ -370,12 +370,13 @@
          <zipfileset src="${jboss.jboss.javaee.lib}/jboss-javaee.jar"/>
          <zipfileset src="${jboss.integration.lib}/jboss-integration.jar"/>
          <zipfileset src="${jboss.aop.lib}/jboss-aop-jdk50.jar"/>
-      	 <zipfileset src="${jboss.aop.lib}/jboss-aop-jboss4-jdk50.jar"/>
+      	<zipfileset src="${jboss.aop.lib}/jboss-aop-jboss4-jdk50.jar"/>
          <zipfileset src="${jboss.aop.lib}/jboss-aop-deployer-jdk50.jar"/>
          <zipfileset src="${jboss.varia.lib}/hsqldb-plugin.jar"/>
          <zipfileset src="${jboss.mq.lib}/jbossmq.jar"/>
          <zipfileset src="${jboss.security.int.lib}/jbosssx-server.jar"/>
          <zipfileset src="${jboss.aspects.lib}/jboss-aspect-library-jdk50.jar"/>
+         <zipfileset src="${jboss.aspects.lib}/jboss-aop-embedded.jar"/>
          <zipfileset src="${jboss.integration.lib}/jboss-transaction-spi.jar"/>
          <zipfileset src="${jboss.integration.lib}/jboss-classloading-spi.jar"/>
          <zipfileset src="${jboss.naming.lib}/jnpserver.jar"/>

Modified: branches/EMBEDDED_JBOSS_BETA3/embedded/src/main/resources/javase/deployers/aspect-deployer-beans.xml
===================================================================
--- branches/EMBEDDED_JBOSS_BETA3/embedded/src/main/resources/javase/deployers/aspect-deployer-beans.xml	2008-01-11 12:56:02 UTC (rev 68885)
+++ branches/EMBEDDED_JBOSS_BETA3/embedded/src/main/resources/javase/deployers/aspect-deployer-beans.xml	2008-01-11 13:08:17 UTC (rev 68886)
@@ -5,14 +5,8 @@
 -->
 <deployment xmlns="urn:jboss:bean-deployer:2.0">
 
-<!--
-   <bean name="AOPClassLoaderScopingPolicy" class="org.jboss.aop.asintegration.jboss4.RepositoryClassLoaderScopingPolicy"/>
+   <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.embedded.JBossEmbeddedUCLIntegration"/>
 
-   <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.jboss5.JBoss5Integration">
-      <property name="scopingPolicy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
-   </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
@@ -26,7 +20,7 @@
 	      </parameter>
       </constructor>
 
-      <!--<property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>-->
+      <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
 
       <property name="enableLoadtimeWeaving">false</property>
       <!-- only relevant when EnableLoadtimeWeaving is true.




More information about the jboss-cvs-commits mailing list