[jboss-cvs] JBossAS SVN: r59461 - in trunk: aspects/src/main/org/jboss/aop/deployers and 9 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jan 9 19:55:04 EST 2007
Author: kabir.khan at jboss.com
Date: 2007-01-09 19:54:51 -0500 (Tue, 09 Jan 2007)
New Revision: 59461
Added:
trunk/aspects/src/main/org/jboss/aop/deployers/JBossAspectLibrary.java
trunk/aspects/src/resources/META-INF/jboss-aspect-library-beans.xml
trunk/system/src/main/org/jboss/profileservice/aop/
trunk/system/src/main/org/jboss/profileservice/aop/MainDeployerAspect.java
trunk/system/src/main/org/jboss/profileservice/aop/PersistAspect.java
Modified:
trunk/aspects/.classpath
trunk/aspects/build.xml
trunk/aspects/src/main/org/jboss/aop/deployers/AbstractAspectManager.java
trunk/aspects/src/main/org/jboss/aop/deployers/AspectManagerJDK5.java
trunk/aspects/src/main/org/jboss/aop/deployers/AspectManagerJRockit.java
trunk/aspects/src/main/org/jboss/aop/deployment/AspectManagerService.java
trunk/build/build-distr.xml
trunk/ejb3/src/resources/META-INF/ejb3-deployers-beans.xml
trunk/server/src/etc/conf/default/bootstrap-beans.xml
trunk/system/.classpath
trunk/system/build.xml
trunk/system/src/main/org/jboss/system/server/ServerLoader.java
Log:
Move AOP into the bootstrap-beans.xml and create a new AspectLibrary bean whose job it is to deploy the base-aspects.xml.
Modified: trunk/aspects/.classpath
===================================================================
--- trunk/aspects/.classpath 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/aspects/.classpath 2007-01-10 00:54:51 UTC (rev 59461)
@@ -31,7 +31,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/system-jmx"/>
<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-deployers.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/common-core/lib/jboss-common-core.jar" sourcepath="/thirdparty/jboss/common-core/lib/jboss-common-core-sources.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop-jdk50.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop-jdk50.jar" sourcepath="/thirdparty/jboss/aop/lib/jboss-aop-src.zip"/>
<classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/pluggable-instrumentor.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-container.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/jboss-vfs/lib/jboss-vfs.jar" sourcepath="/thirdparty/jboss/jboss-vfs/lib/jboss-vfs-sources.jar"/>
Modified: trunk/aspects/build.xml
===================================================================
--- trunk/aspects/build.xml 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/aspects/build.xml 2007-01-10 00:54:51 UTC (rev 59461)
@@ -241,13 +241,24 @@
<mkdir dir="${build.lib}"/>
- <!-- Build jboss-aspects-jdk50.jar -->
- <jar destfile="${build.lib}/jboss-aspect-library-jdk50.jar" manifest="${build.etc}/default.mf"
+ <!-- Build jboss-aspect-deployer-jdk50.jar -->
+ <jar destfile="${build.lib}/jboss-aop-deployer-jdk50.jar" manifest="${build.etc}/default.mf"
update="${jar.update}" index="${jar.index}">
<fileset dir="${build.classes}">
<!-- Include everything else -->
- <include name="org/jboss/**"/>
+ <include name="org/jboss/aop/deploy*/**"/>
+ <exclude name="org/jboss/aop/deployers/JBossAspectLibrary.class"/>
</fileset>
+ </jar>
+
+ <!-- Build jboss-aspect-deployer-jdk50.jar -->
+ <jar destfile="${build.lib}/jboss-aspect-library-jdk50.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/junit/**"/>
+ <include name="org/jboss/aspects/**"/>
+ </fileset>
<fileset dir="${build.etc}">
<include name="org/jboss/**/*.xml"/>
</fileset>
@@ -320,12 +331,15 @@
<jar destfile="${build.lib}/jboss-aop-jboss5.deployer" manifest="${build.etc}/default.mf"
update="${jar.update}" index="${jar.index}">
<fileset file="${build.lib}/jboss-aspect-library-jdk50.jar"/>
- <fileset file="${jboss.aop.lib}/jboss-aop-jdk50.jar"/>
+ <!--fileset file="${jboss.aop.lib}/jboss-aop-jdk50.jar"/-->
<fileset file="${build.meta.inf}/base-aspects.xml"/>
- <fileset file="${javassist.lib}/javassist.jar"/>
- <fileset file="${trove.lib}/trove.jar"/>
+ <!--fileset file="${javassist.lib}/javassist.jar"/-->
+ <!--fileset file="${trove.lib}/trove.jar"/-->
+ <!--fileset dir="${source.resources}">
+ <include name="META-INF/aspect-deployer-beans.xml"/>
+ </fileset-->
<fileset dir="${source.resources}">
- <include name="META-INF/aspect-deployer-beans.xml"/>
+ <include name="META-INF/jboss-aspect-library-beans.xml"/>
</fileset>
</jar>
<delete dir="${build.meta.inf}"/>
Modified: trunk/aspects/src/main/org/jboss/aop/deployers/AbstractAspectManager.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/deployers/AbstractAspectManager.java 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/aspects/src/main/org/jboss/aop/deployers/AbstractAspectManager.java 2007-01-10 00:54:51 UTC (rev 59461)
@@ -21,7 +21,10 @@
*/
package org.jboss.aop.deployers;
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
import java.io.File;
+import java.io.InputStream;
import javax.management.JMException;
import javax.management.ListenerNotFoundException;
@@ -33,10 +36,11 @@
import javax.management.ObjectName;
import org.jboss.aop.AspectManager;
+import org.jboss.aop.AspectXmlLoader;
import org.jboss.aop.deployment.AspectManagerService;
-import org.jboss.aop.deployment.AspectManagerServiceJDK5;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.logging.Logger;
+import org.w3c.dom.Document;
/**
*
@@ -46,9 +50,41 @@
public abstract class AbstractAspectManager
{
final static String BASE_ASPECTS_XML = "base-aspects.xml";
- AspectManagerService delegate = null; //Initialised by concrete sub-classes
+ AspectManagerService delegate = null;
MBeanServer server;
+ String bootstrapXml;
+ public AbstractAspectManager(String bootstrapXml)
+ {
+ this.bootstrapXml = bootstrapXml;
+ try
+ {
+ if (bootstrapXml != null)
+ {
+ InputStream in = new BufferedInputStream(new ByteArrayInputStream(bootstrapXml.getBytes()));
+ try
+ {
+ Document doc = AspectXmlLoader.loadDocument(new BufferedInputStream(in));
+ AspectXmlLoader loader = new AspectXmlLoader();
+ loader.setManager(getAspectManager());
+ loader.deployXML(doc, null);
+ }
+ finally
+ {
+ if (in != null)
+ {
+ in.close();
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ // AutoGenerated
+ throw new RuntimeException("Problem starting AspectManager", e);
+ }
+ }
+
public void setMbeanServer(MBeanServer server)
{
this.server = server;
@@ -112,11 +148,62 @@
}
/**
+ * @throws Exception
+ * @see org.jboss.system.ServiceMBeanSupport#start()
+ */
+ public void start() throws Exception
+ {
+ try
+ {
+ server.registerMBean(delegate, new ObjectName("jboss.aop:service=AspectManager"));
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Problem registering jboss.aop:service=AspectManager with JMXServer", e);
+ }
+ delegate.start();
+ }
+
+
+ public void stop()
+ {
+ delegate.stop();
+ }
+ /**
*
* @see org.jboss.system.ServiceMBeanSupport#destroy()
*/
public void destroy()
{
+ if (this.server == null)
+ {
+ try
+ {
+ if (bootstrapXml != null)
+ {
+ InputStream in = new BufferedInputStream(new ByteArrayInputStream(bootstrapXml.getBytes()));
+ try
+ {
+ Document doc = AspectXmlLoader.loadDocument(new BufferedInputStream(in));
+ AspectXmlLoader loader = new AspectXmlLoader();
+ loader.setManager(getAspectManager());
+ loader.deployXML(doc, null);
+ }
+ finally
+ {
+ if (in != null)
+ {
+ in.close();
+ }
+ }
+ }
+ server.unregisterMBean(new ObjectName("jboss.aop:service=AspectManager"));
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Problem unregistering jboss.aop:service=AspectManager with JMXServer", e);
+ }
+ }
delegate.destroy();
}
@@ -564,45 +651,12 @@
return delegate.stacks();
}
- /**
- * @throws Exception
- * @see org.jboss.system.ServiceMBeanSupport#start()
- */
- public void start() throws Exception
+ public void deployBaseAspects()
{
- try
- {
- server.registerMBean(delegate, new ObjectName("jboss.aop:service=AspectManager"));
- }
- catch (Exception e)
- {
- throw new RuntimeException("Problem registering jboss.aop:service=AspectManager with JMXServer", e);
- }
- delegate.start();
+ delegate.baseAop(BASE_ASPECTS_XML);
}
/**
- *
- * @see org.jboss.system.ServiceMBeanSupport#stop()
- */
- public void stop()
- {
- if (this.server == null)
- {
- try
- {
- server.unregisterMBean(new ObjectName("jboss.aop:service=AspectManager"));
- }
- catch (Exception e)
- {
- // AutoGenerated
- throw new RuntimeException("Problem unregistering jboss.aop:service=AspectManager with JMXServer", e);
- }
- }
- delegate.stop();
- }
-
- /**
* @return
* @see java.lang.Object#toString()
*/
@@ -610,6 +664,4 @@
{
return delegate.toString();
}
-
-
}
Modified: trunk/aspects/src/main/org/jboss/aop/deployers/AspectManagerJDK5.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/deployers/AspectManagerJDK5.java 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/aspects/src/main/org/jboss/aop/deployers/AspectManagerJDK5.java 2007-01-10 00:54:51 UTC (rev 59461)
@@ -31,8 +31,9 @@
*/
public class AspectManagerJDK5 extends AbstractAspectManager
{
- public AspectManagerJDK5()
+ public AspectManagerJDK5(String bootstrapXml)
{
- super.delegate = new AspectManagerServiceJDK5(BASE_ASPECTS_XML);
+ super(bootstrapXml);
+ super.delegate = new AspectManagerServiceJDK5(null);
}
}
Modified: trunk/aspects/src/main/org/jboss/aop/deployers/AspectManagerJRockit.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/deployers/AspectManagerJRockit.java 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/aspects/src/main/org/jboss/aop/deployers/AspectManagerJRockit.java 2007-01-10 00:54:51 UTC (rev 59461)
@@ -32,8 +32,9 @@
*/
public class AspectManagerJRockit extends AbstractAspectManager
{
- public AspectManagerJRockit()
+ public AspectManagerJRockit(String bootstrapXml)
{
- super.delegate = new AspectManagerService(BASE_ASPECTS_XML);
+ super(bootstrapXml);
+ super.delegate = new AspectManagerService(null);
}
}
Added: trunk/aspects/src/main/org/jboss/aop/deployers/JBossAspectLibrary.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/deployers/JBossAspectLibrary.java 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/aspects/src/main/org/jboss/aop/deployers/JBossAspectLibrary.java 2007-01-10 00:54:51 UTC (rev 59461)
@@ -0,0 +1,57 @@
+/*
+* 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.deployers;
+
+import org.jboss.logging.Logger;
+
+/**
+ * A bean to be deployed with the aspect library in jboss 5 to be able to deploy the
+ * base-aspects.xml file and so that other things like EJB 3 can depend on this.
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class JBossAspectLibrary
+{
+ private static final Logger log = Logger.getLogger(JBossAspectLibrary.class);
+ AbstractAspectManager aspectManager;
+
+ public AbstractAspectManager getAspectManager()
+ {
+ return aspectManager;
+ }
+
+ public void setAspectManager(AbstractAspectManager aspectManagerBean)
+ {
+ this.aspectManager = aspectManagerBean;
+ }
+
+ /**
+ * @throws Exception
+ * @see org.jboss.system.ServiceMBeanSupport#start()
+ */
+ public void start() throws Exception
+ {
+ aspectManager.deployBaseAspects();
+ }
+
+}
Modified: trunk/aspects/src/main/org/jboss/aop/deployment/AspectManagerService.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aop/deployment/AspectManagerService.java 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/aspects/src/main/org/jboss/aop/deployment/AspectManagerService.java 2007-01-10 00:54:51 UTC (rev 59461)
@@ -154,8 +154,16 @@
protected void baseAop()
{
+ if (baseXml == null)
+ {
+ return;
+ }
+ }
+
+ public void baseAop(String xml)
+ {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
- URL base = cl.getResource(baseXml);
+ URL base = cl.getResource(xml);
try
{
if (base != null)
@@ -164,15 +172,15 @@
}
else
{
- System.out.println("Could not find " + baseXml + " file in the resources of " + cl);
+ System.out.println("Could not find " + xml + " file in the resources of " + cl);
}
}
catch (Exception e)
{
- System.out.println("Error loading " + baseXml + " file" + e);
+ System.out.println("Error loading " + xml + " file" + e);
}
}
-
+
protected void attachDeprecatedTranslator()
{
log.warn("EnableTransformer has been deprecated, please use EnableLoadtimeWeaving. See docs for more details");
Added: trunk/aspects/src/resources/META-INF/jboss-aspect-library-beans.xml
===================================================================
--- trunk/aspects/src/resources/META-INF/jboss-aspect-library-beans.xml 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/aspects/src/resources/META-INF/jboss-aspect-library-beans.xml 2007-01-10 00:54:51 UTC (rev 59461)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Aspect Deployer
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Aspect Library -->
+ <bean name="AspectLibrary" class="org.jboss.aop.deployers.JBossAspectLibrary">
+ <property name="aspectManager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <!-- Add the JMX -->
+ <aop:lifecycle xmlns:aop="urn:jboss:aop-beans:1.0"
+ name="JMXAdvice"
+ class="org.jboss.aop.microcontainer.aspects.jmx.JMXIntroduction"
+ classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
+ manager-bean="AspectManager"
+ manager-property="aspectManager"
+ pointcut="execution(* @org.jboss.aop.microcontainer.aspects.jmx.JMX->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))">
+ <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+ </aop:lifecycle>
+
+</deployment>
Modified: trunk/build/build-distr.xml
===================================================================
--- trunk/build/build-distr.xml 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/build/build-distr.xml 2007-01-10 00:54:51 UTC (rev 59461)
@@ -239,17 +239,28 @@
<!-- Copy the generated libraries -->
<unjar src="${_module.output}/lib/${aop.deployer}" dest="${install.server}/all/deployers/${aop.deployer}"/>
+ <!--
<copy todir="${install.server}/all/deployers" filtering="no">
<fileset dir="${project.root}/${_module.name}/src/resources/META-INF">
<include name="aop-mc-int-aspect-beans.xml"/>
</fileset>
</copy>
+ -->
+ <mkdir dir="${install.lib}"/>
+ <copy todir="${install.lib}" filtering="no">
+ <fileset dir="${_module.output}/lib">
+ <include name="jboss-aop-deployer-jdk50.jar"/>
+ </fileset>
+ </copy>
+
+ <!--
<copy todir="${install.server}/all/deployers/${aop.deployer}" filtering="no">
<fileset dir="${jboss.microcontainer.lib}">
<include name="jboss-aop-mc-int-deployer.jar"/>
</fileset>
</copy>
+ -->
<!-- Copy across client jars -->
<mkdir dir="${install.client}"/>
@@ -1689,6 +1700,9 @@
<fileset dir="${javassist.javassist.lib}">
<include name="javassist.jar"/>
</fileset>
+ <fileset dir="${jboss.aop.lib}">
+ <include name="jboss-aop-jdk50.jar"/>
+ </fileset>
<fileset dir="${jboss.common.core.lib}">
<exclude name="*-sources.jar"/>
</fileset>
@@ -1705,7 +1719,7 @@
<include name="jboss-xml-binding.jar"/>
</fileset>
<fileset dir="${jboss.microcontainer.lib}">
- <include name="jboss-aop-mc-int-boot.jar"/>
+ <include name="jboss-aop-mc-int.jar"/>
<include name="jboss-container.jar"/>
<include name="jboss-dependency.jar"/>
<include name="jboss-deployers.jar"/>
@@ -1716,6 +1730,9 @@
<fileset dir="${jboss.jboss.vfs.lib}">
<include name="jboss-vfs.jar"/>
</fileset>
+ <fileset dir="${trove.trove.lib}">
+ <include name="trove.jar"/>
+ </fileset>
</copy>
<!-- Copy the generated client libraries -->
Modified: trunk/ejb3/src/resources/META-INF/ejb3-deployers-beans.xml
===================================================================
--- trunk/ejb3/src/resources/META-INF/ejb3-deployers-beans.xml 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/ejb3/src/resources/META-INF/ejb3-deployers-beans.xml 2007-01-10 00:54:51 UTC (rev 59461)
@@ -105,7 +105,7 @@
<value>servlets-webdav.jar</value>
</set>
</property>
- <depends>AspectDeployer</depends>
+ <depends>AspectLibrary</depends>
</bean>
<bean name="EJBStage2Deployer" class="org.jboss.ejb3.deployers.EJBStage2Deployer">
<install bean="MainDeployer" method="addDeployer">
@@ -118,7 +118,7 @@
<this/>
</parameter>
</uninstall>
- <depends>AspectDeployer</depends>
+ <depends>AspectLibrary</depends>
</bean>
<bean name="AppClientParsingDeployer" class="org.jboss.ejb3.deployers.AppClientParsingDeployer">
@@ -133,7 +133,7 @@
</parameter>
</uninstall>
<!-- TODO: check depends -->
- <depends>AspectDeployer</depends>
+ <depends>AspectLibrary</depends>
</bean>
<bean name="JBossClientParsingDeployer" class="org.jboss.ejb3.deployers.JBossClientParsingDeployer">
@@ -178,7 +178,7 @@
<property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
<!-- TODO: check depends -->
- <depends>AspectDeployer</depends>
+ <depends>AspectLibrary</depends>
<depends>AppClientScanningDeployer</depends>
</bean>
</deployment>
Modified: trunk/server/src/etc/conf/default/bootstrap-beans.xml
===================================================================
--- trunk/server/src/etc/conf/default/bootstrap-beans.xml 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/server/src/etc/conf/default/bootstrap-beans.xml 2007-01-10 00:54:51 UTC (rev 59461)
@@ -19,6 +19,51 @@
<property name="serverImpl"><inject bean="JBossServer"/></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
+ * 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="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></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, org.jboss.cache.jmx, org.jboss.cache.pojo.jmx, org.jboss.ha, org.jboss.invocation</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>
+ -->
+ </bean>
+
<!-- The MainDeployer -->
<bean name="MainDeployer" class="org.jboss.deployers.plugins.deployment.MainDeployerImpl">
<property name="structureDeployers">
@@ -26,7 +71,7 @@
<!-- A declared structure descriptor deployer -->
<bean name="DeclaredStructure" class="org.jboss.deployers.plugins.structure.vfs.explicit.DeclaredStructure">
</bean>
-
+
<!-- WAR Structure -->
<bean name="WARStructure" class="org.jboss.deployers.plugins.structure.vfs.war.WARStructure">
<property name="webInfLibFilter">
@@ -90,6 +135,10 @@
</property>
<property name="deployers">
<list>
+ <!-- AOP deployment -->
+ <bean name="AspectDeployer" class="org.jboss.aop.deployers.AspectDeployer">
+ <depends>AspectManager</depends>
+ </bean>
<!-- POJO Deployment -->
<bean name="BeanDeployer" class="org.jboss.deployers.plugins.deployers.kernel.BeanDeployer"/>
<bean name="KernelDeploymentDeployer" class="org.jboss.deployers.plugins.deployers.kernel.KernelDeploymentDeployer"/>
@@ -107,6 +156,7 @@
</bean>
</list>
</property>
+ <depends>AspectManager</depends>
</bean>
<!-- A filter for excluding files from the scanner -->
Modified: trunk/system/.classpath
===================================================================
--- trunk/system/.classpath 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/system/.classpath 2007-01-10 00:54:51 UTC (rev 59461)
@@ -20,5 +20,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss/common-logging-spi/lib/jboss-logging-spi.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xercesImpl.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/aop/lib/jboss-aop-jdk50.jar" sourcepath="/thirdparty/jboss/aop/lib/jboss-aop-src.zip"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
Modified: trunk/system/build.xml
===================================================================
--- trunk/system/build.xml 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/system/build.xml 2007-01-10 00:54:51 UTC (rev 59461)
@@ -71,6 +71,7 @@
<path refid="apache.xerces.classpath"/>
<path refid="oswego.concurrent.classpath"/>
<path refid="dom4j.dom4j.classpath"/>
+ <path refid="jboss.aop.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.microcontainer.classpath"/>
<path refid="jboss.jboss.vfs.classpath"/>
Added: trunk/system/src/main/org/jboss/profileservice/aop/MainDeployerAspect.java
===================================================================
--- trunk/system/src/main/org/jboss/profileservice/aop/MainDeployerAspect.java 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/system/src/main/org/jboss/profileservice/aop/MainDeployerAspect.java 2007-01-10 00:54:51 UTC (rev 59461)
@@ -0,0 +1,44 @@
+/*
+* 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.profileservice.aop;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * Placeholder
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MainDeployerAspect
+{
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object process(Invocation invocation) throws Throwable
+ {
+ System.out.println("=============> MainDeployerAspect!!!!");
+ return invocation.invokeNext();
+ }
+}
Added: trunk/system/src/main/org/jboss/profileservice/aop/PersistAspect.java
===================================================================
--- trunk/system/src/main/org/jboss/profileservice/aop/PersistAspect.java 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/system/src/main/org/jboss/profileservice/aop/PersistAspect.java 2007-01-10 00:54:51 UTC (rev 59461)
@@ -0,0 +1,43 @@
+/*
+* 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.profileservice.aop;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PersistAspect
+{
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object setValue(Invocation invocation) throws Throwable
+ {
+ System.out.println("=============> PersistAspect!!!!");
+ return invocation.invokeNext();
+ }
+}
Modified: trunk/system/src/main/org/jboss/system/server/ServerLoader.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/ServerLoader.java 2007-01-09 21:44:37 UTC (rev 59460)
+++ trunk/system/src/main/org/jboss/system/server/ServerLoader.java 2007-01-10 00:54:51 UTC (rev 59461)
@@ -87,7 +87,10 @@
"jboss-xml-binding.jar",
// MC jars
"javassist.jar",
- "jboss-aop-mc-int-boot.jar",
+ "jboss-aop-jdk50.jar",
+ "jboss-aop-deployer-jdk50.jar",
+ "jboss-aop-mc-int.jar",
+ "trove.jar",
"jboss-vfs.jar",
"jboss-container.jar",
"jboss-dependency.jar",
More information about the jboss-cvs-commits
mailing list