[jboss-cvs] JBossAS SVN: r87295 - in projects/aop/trunk: aop/src/main/java/org/jboss/aop/advice and 16 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 14 11:25:58 EDT 2009
Author: kabir.khan at jboss.com
Date: 2009-04-14 11:25:57 -0400 (Tue, 14 Apr 2009)
New Revision: 87295
Added:
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/TestTranslator.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerClass.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerClassJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerInstance.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerVm.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerClass.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerClassJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerInstance.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerVm.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClass.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClassJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerInstance.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerVm.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/IntroducedAnnotation.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MarkerInterface.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MixinImpl.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MixinInterface.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/OverriddenAnnotation.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/interceptions/
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/interceptions/Interceptions.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/FoundInvoker.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerClass.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerClassJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerInstance.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerVm.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerClass.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerClassJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerInstance.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerVm.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClass.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClassJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerInstance.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerJoinpoint.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerVm.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/NotFoundInvoker.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAnnotationIntroduction.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAnnotationOverride.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspect.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithInterceptor.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithIntroduction.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithLightweightAspect.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithMixin.java
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/test/
projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase.java
projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/
projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/test/
projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase-aop.xml
Modified:
projects/aop/trunk/aop/src/main/java/org/jboss/aop/Advisor.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectManager.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/ClassAdvisor.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/Domain.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/AspectFactoryWithClassLoaderSupport.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/GenericAspectFactory.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/classpool/AOPClassPoolRepository.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/Instrumentor.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinPointGenerator.java
projects/aop/trunk/asintegration-core/src/main/java/org/jboss/aop/classpool/BaseClassPool.java
projects/aop/trunk/asintegration-core/src/main/java/org/jboss/aop/domain/ScopedClassLoaderDomain.java
projects/aop/trunk/asintegration-mc/.classpath
projects/aop/trunk/asintegration-mc/pom.xml
Log:
[JBAOP-707] Initial commit. Ignore and log aop artifacts that cannot be found using the loader. Test currently tests GeneratedAdvisor and has been excluded until some issues have been resolved.
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/Advisor.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/Advisor.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/Advisor.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -1181,7 +1181,7 @@
public Object getPerVMAspect(AspectDefinition def)
{
- return getManager().getPerVMAspect(def);
+ return getManager().getPerVMAspect(def, this);
}
public void addPerInstanceAspect(AspectDefinition def)
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectManager.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectManager.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectManager.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -530,20 +530,19 @@
public Map<Class<?>, WeakReference<Advisor>> getAdvisors()
{
WeakHashMap<Class<?>, WeakReference<Advisor>> tmpAdvisors = new WeakHashMap<Class<?>, WeakReference<Advisor>>(advisors);
- if(getSubDomainsPerClass().size() > 0)
+ Map<Class<?>, WeakReference<Domain>> domainsMap = getSubDomainsPerClass();
+ if(domainsMap.size() > 0)
{
- Map<Class<?>, WeakReference<Domain>> domainsMap = getSubDomainsPerClass();
Set<Class<?>> keys = domainsMap.keySet();
- Domain subDomain = null;
for(Class<?> clazz : keys)
{
- WeakReference<Domain> ref = getSubDomainsPerClass().get(clazz);
+ WeakReference<Domain> ref = domainsMap.get(clazz);
if (ref != null)
{
- subDomain = ref.get();
+ Domain subDomain = ref.get();
if(subDomain != null)
{
- WeakReference<Advisor> advisorRef = advisors.get(clazz);
+ WeakReference<Advisor> advisorRef = subDomain.advisors.get(clazz);
tmpAdvisors.put(clazz, advisorRef);
}
}
@@ -562,6 +561,34 @@
*/
throw new RuntimeException("OPERATION NOT SUPPORTED ANYMORE");
}
+
+ public void cleanAdvisor(Class<?> clazz)
+ {
+ synchronized (advisors)
+ {
+ WeakReference<Advisor> advisorRef = advisors.remove(clazz);
+ if (advisorRef != null)
+ {
+ Advisor advisor = advisorRef.get();
+ if (advisor != null)
+ {
+ advisor.cleanup();
+ }
+ }
+ }
+ synchronized (subDomainsPerClass)
+ {
+ WeakReference<Domain> subDomainRef = subDomainsPerClass.remove(clazz);
+ if (subDomainRef != null)
+ {
+ Domain subDomain = subDomainRef.get();
+ if (subDomain != null)
+ {
+ subDomain.cleanAdvisor(clazz);
+ }
+ }
+ }
+ }
/**
* Returns the binding map.
@@ -2007,6 +2034,16 @@
public Object getPerVMAspect(String def)
{
+ return getPerVMAspect(def, null);
+ }
+
+ public Object getPerVMAspect(AspectDefinition def, Advisor advisor)
+ {
+ return getPerVMAspect(def.getName(), advisor);
+ }
+
+ public Object getPerVMAspect(String def, Advisor advisor)
+ {
Object aspect = perVMAspects.get(def);
if (aspect == null)
{
@@ -2019,7 +2056,8 @@
aspect = perVMAspects.get(def);
if (aspect == null)
{
- aspect = createPerVmAspect(def, adef, null);
+ ClassLoader useCl = advisor != null ? advisor.getClassLoader() : null;
+ aspect = createPerVmAspect(def, adef, useCl);
}
}
}
@@ -2030,7 +2068,7 @@
}
return aspect;
}
-
+
protected Object createPerVmAspect(String def, AspectDefinition adef, ClassLoader scopedClassLoader)
{
Object instance = null;
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/ClassAdvisor.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/ClassAdvisor.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/ClassAdvisor.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -389,11 +389,27 @@
// Fall back to context classloader
cl = SecurityActions.getContextClassLoader();
}
- cl.loadClass(mixin.getClassName());
+ try
+ {
+ cl.loadClass(mixin.getClassName());
+ }
+ catch(ClassNotFoundException e)
+ {
+ throw new RuntimeException("Mixin class " + mixin.getClassName() + " could not be found when initializing the advisor for " + clazz.getName() + " in classloader " + cl);
+ }
String[] interfaces = mixin.getInterfaces();
for (int j = 0; j < interfaces.length; j++)
{
- Class<?> intf = cl.loadClass(interfaces[j]);
+ Class<?> intf = null;
+ try
+ {
+ intf = cl.loadClass(interfaces[j]);
+ }
+ catch(ClassNotFoundException e)
+ {
+ throw new RuntimeException("Mixin interface " + interfaces[j] + " could not be found when initializing the advisor for " + clazz.getName() + " in classloader " + cl);
+ }
+
if (intf.isAssignableFrom(clazz))//This is a fix for JBAOP-365. Class may have been woven, with the extra mixin information only available at init time
{
Method[] methods = intf.getMethods();
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/Domain.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/Domain.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/Domain.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -850,13 +850,13 @@
}
@Override
- public Object getPerVMAspect(AspectDefinition def)
+ public Object getPerVMAspect(String def)
{
- return getPerVMAspect(def.getName());
+ return getPerVMAspect(def, null);
}
@Override
- public Object getPerVMAspect(String def)
+ public Object getPerVMAspect(String def, Advisor advisor)
{
Object factory = null;
if (parentFirst)
@@ -864,12 +864,12 @@
factory = parent.getPerVMAspect(def);
if (factory != null) return factory;
}
- factory = super.getPerVMAspect(def);
+ factory = super.getPerVMAspect(def, advisor);
if (factory != null) return factory;
- return parent.getPerVMAspect(def);
+ return parent.getPerVMAspect(def, advisor);
}
-
+
@Override
public AspectDefinition getAspectDefinition(String name)
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/AspectFactoryWithClassLoaderSupport.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/AspectFactoryWithClassLoaderSupport.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/AspectFactoryWithClassLoaderSupport.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -85,13 +85,28 @@
// FIXME ClassLoader - which should we always know the correct classloader?
ClassLoader tcl = SecurityActions.getContextClassLoader();
if (AspectManager.verbose && logger.isDebugEnabled()) logger.debug("Using context classloader " + tcl + " to load aspect " + name);
- return tcl.loadClass(name);
+ try
+ {
+ return tcl.loadClass(name);
+ }
+ catch(ClassNotFoundException e)
+ {
+ logger.warn("Can not load " + name + " using tcl " + tcl);
+ }
}
else
{
if (AspectManager.verbose && logger.isDebugEnabled()) logger.debug("Using scoped classloader " + cl + " to load aspect " + name);
- return cl.loadClass(name);
+ try
+ {
+ return cl.loadClass(name);
+ }
+ catch(ClassNotFoundException e)
+ {
+ logger.warn("Can not load " + name + " using cl " + cl);
+ }
}
+ return null;
}
}
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/GenericAspectFactory.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/GenericAspectFactory.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/GenericAspectFactory.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -143,7 +143,12 @@
{
try
{
- Object aspect = getClazz(null).newInstance();
+ Class<?> clazz = getClazz(null);
+ if (clazz == null)
+ {
+ return null;
+ }
+ Object aspect = clazz.newInstance();
configureInstance(aspect, null, null, null);
return aspect;
}
@@ -158,7 +163,12 @@
{
try
{
- Object aspect = getClazz(advisor).newInstance();
+ Class<?> clazz = getClazz(advisor);
+ if (clazz == null)
+ {
+ return null;
+ }
+ Object aspect = clazz.newInstance();
configureInstance(aspect, advisor, null, null);
return aspect;
}
@@ -173,7 +183,12 @@
{
try
{
- Object aspect = getClazz(advisor).newInstance();
+ Class<?> clazz = getClazz(advisor);
+ if (clazz == null)
+ {
+ return null;
+ }
+ Object aspect = clazz.newInstance();
configureInstance(aspect, advisor, instanceAdvisor, null);
return aspect;
}
@@ -188,7 +203,12 @@
{
try
{
- Object aspect = getClazz(advisor).newInstance();
+ Class<?> clazz = getClazz(advisor);
+ if (clazz == null)
+ {
+ return null;
+ }
+ Object aspect = clazz.newInstance();
configureInstance(aspect, advisor, null, jp);
return aspect;
}
@@ -203,7 +223,12 @@
{
try
{
- Object aspect = getClazz(advisor).newInstance();
+ Class<?> clazz = getClazz(advisor);
+ if (clazz == null)
+ {
+ return null;
+ }
+ Object aspect = clazz.newInstance();
configureInstance(aspect, advisor, instanceAdvisor, jp);
return aspect;
}
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/classpool/AOPClassPoolRepository.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/classpool/AOPClassPoolRepository.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/classpool/AOPClassPoolRepository.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -21,7 +21,6 @@
*/
package org.jboss.aop.classpool;
-import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.security.AccessController;
import java.security.PrivilegedActionException;
@@ -30,18 +29,17 @@
import java.util.HashSet;
import java.util.Map;
-import org.jboss.aop.Advisor;
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.advice.SecurityActions;
-import org.jboss.aop.instrument.Instrumentor;
-import org.jboss.aop.util.logging.AOPLogger;
-
import javassist.ClassPool;
import javassist.scopedpool.ScopedClassPool;
import javassist.scopedpool.ScopedClassPoolFactory;
import javassist.scopedpool.ScopedClassPoolRepository;
import javassist.scopedpool.ScopedClassPoolRepositoryImpl;
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.SecurityActions;
+import org.jboss.aop.instrument.Instrumentor;
+import org.jboss.aop.util.logging.AOPLogger;
+
/**
* Singleton classpool repository used by aop
*
@@ -195,35 +193,27 @@
{
for (Class<?> clazz : classes)
{
- synchronized (manager.getAdvisors())
+ manager.cleanAdvisor(clazz);
+ Class<?> advisedClass = clazz;
+ try
{
- WeakReference<Advisor> ref = manager.getAdvisors().get(clazz);
- if (ref != null)
- {
- Advisor advisor = ref.get();
- manager.getAdvisors().remove(clazz);
- if (advisor != null)
- {
- advisor.cleanup();
- }
- }
- Class<?> advisedClass = clazz;
- try
- {
- //The static advisor field should be the only remaining hard reference to the advisor
- Field f = advisedClass.getDeclaredField(Instrumentor.HELPER_FIELD_NAME);
- f.setAccessible(true);
- f.set(null, null);
- }
- catch(NoSuchFieldException e)
- {
- logger.warn("Error unsetting advisor for " + advisedClass.getName() + " " + e);
- }
- catch(IllegalAccessException e)
- {
- logger.warn("Error unsetting advisor for " + advisedClass.getName() + " " + e);
- }
+ //The static advisor field should be the only remaining hard reference to the advisor
+ Field f = advisedClass.getDeclaredField(Instrumentor.HELPER_FIELD_NAME);
+ f.setAccessible(true);
+ f.set(null, null);
}
+ catch(NoSuchFieldException e)
+ {
+ logger.warn("Error unsetting advisor for " + advisedClass.getName() + " " + e);
+ }
+ catch(IllegalAccessException e)
+ {
+ logger.warn("Error unsetting advisor for " + advisedClass.getName() + " " + e);
+ }
+ catch(NoClassDefFoundError e)
+ {
+ logger.warn("Error unsetting advisor for " + advisedClass.getName() + " " + e);
+ }
}
}
}
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/Instrumentor.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/Instrumentor.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/Instrumentor.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -270,7 +270,24 @@
// But, for now, just throw an exception if the
// mixin is adding any interfaces already
// defined in base class or another mixin.
- CtClass mixinClass = classPool.get(mixin.getClassName());
+ CtClass mixinClass = null;
+ CtClass[] interfaceClasses = null;
+ try
+ {
+ mixinClass = classPool.get(mixin.getClassName());
+
+ String[] interfaces = mixin.getInterfaces();
+ interfaceClasses = new CtClass[interfaces.length];
+ for (int i = 0 ; i < interfaces.length ; i++)
+ {
+ interfaceClasses[i] = classPool.get(interfaces[i]);
+ }
+ }
+ catch(NotFoundException e)
+ {
+ logger.warn("Error creating mixin for " + clazz.getName() + ": " + e.getMessage());
+ return;
+ }
// check mixin constructor method if this is the case
if (pointcut.getConstructorClass() != null)
@@ -322,10 +339,8 @@
clazz.addField(field, CtField.Initializer.byExpr(initializer));
HashSet<Long> addedMethods = new HashSet<Long>();
- String[] interfaces = mixin.getInterfaces();
- for (int i = 0; i < interfaces.length; i++)
+ for (CtClass intf : interfaceClasses)
{
- CtClass intf = classPool.get(interfaces[i]);
if (clazz.subtypeOf(intf)) continue;
clazz.addInterface(intf);
HashMap<Long, CtMethod> intfMap = JavassistMethodHashing.getMethodMap(intf);
@@ -373,7 +388,22 @@
private void addIntroductionPointcutInterface(CtClass clazz, Advisor advisor, String intf, HashMap<Long, CtMethod> baseMethods) throws Exception
{
- CtClass iface = classPool.get(intf);
+ CtClass iface = null;
+
+ try
+ {
+ iface = classPool.get(intf);
+ if (!iface.isInterface())
+ {
+ throw new RuntimeException(iface + " is not an interfacce");
+ }
+ }
+ catch(NotFoundException e)
+ {
+ logger.warn("Error creating interface introduction for " + clazz.getName() + ": " + e.getMessage());
+ return;
+ }
+
if (!clazz.subtypeOf(iface) && !clazz.subclassOf(iface))
{
clazz.addInterface(iface);
@@ -438,7 +468,18 @@
if (introduction.matches(advisor, clazz))
{
if (AspectManager.verbose && logger.isDebugEnabled()) logger.debug(introduction.getAnnotation() + " binds to " + clazz.getName());
- javassist.bytecode.annotation.Annotation info = AnnotationInfoCreator.createAnnotationInfo(classPool, clazz.getClassFile2().getConstPool(), introduction.getAnnotation());
+
+ javassist.bytecode.annotation.Annotation info = null;
+ try
+ {
+ info = AnnotationInfoCreator.createAnnotationInfo(classPool, clazz.getClassFile2().getConstPool(), introduction.getAnnotation());
+ }
+ catch(NotFoundException e)
+ {
+ logger.warn("Error adding annotation introduction " + introduction.getAnnotation().getIdentifier() + "to class " + clazz.getName() + ": " + e.getMessage());
+ continue;
+ }
+
if (introduction.isInvisible())
{
AnnotationsAttribute invisible = (AnnotationsAttribute) clazz.getClassFile2().getAttribute(AnnotationsAttribute.invisibleTag);
@@ -468,7 +509,18 @@
{
if (introduction.matches(advisor, methods[i]))
{
- javassist.bytecode.annotation.Annotation info = AnnotationInfoCreator.createAnnotationInfo(classPool, methods[i].getMethodInfo2().getConstPool(), introduction.getAnnotation());
+ javassist.bytecode.annotation.Annotation info = null;
+ try
+ {
+ info = AnnotationInfoCreator.createAnnotationInfo(classPool, methods[i].getMethodInfo2().getConstPool(), introduction.getAnnotation());
+ }
+ catch (NotFoundException e)
+ {
+ logger.warn("Error adding annotation introduction " + introduction.getAnnotation().getIdentifier() + " to " +
+ methods[i].getDeclaringClass().getName() + "." + methods[i].getName() + methods[i].getSignature() + ": " + e.getMessage());
+ continue;
+ }
+
MethodInfo mi = methods[i].getMethodInfo2();
if (introduction.isInvisible())
{
@@ -501,7 +553,18 @@
{
if (introduction.matches(advisor, cons[i]))
{
- javassist.bytecode.annotation.Annotation info = AnnotationInfoCreator.createAnnotationInfo(classPool, cons[i].getMethodInfo2().getConstPool(), introduction.getAnnotation());
+ javassist.bytecode.annotation.Annotation info = null;
+ try
+ {
+ info = AnnotationInfoCreator.createAnnotationInfo(classPool, cons[i].getMethodInfo2().getConstPool(), introduction.getAnnotation());
+ }
+ catch (NotFoundException e)
+ {
+ logger.warn("Error adding annotation introduction " + introduction.getAnnotation().getIdentifier() + " to " +
+ cons[i].getDeclaringClass().getName() + ".new" + cons[i].getSignature() + ": " + e.getMessage());
+ continue;
+ }
+
MethodInfo mi = cons[i].getMethodInfo2();
if (introduction.isInvisible())
{
@@ -533,7 +596,17 @@
{
if (introduction.matches(advisor, fields[i]))
{
- javassist.bytecode.annotation.Annotation info = AnnotationInfoCreator.createAnnotationInfo(classPool, fields[i].getFieldInfo2().getConstPool(), introduction.getAnnotation());
+ javassist.bytecode.annotation.Annotation info = null;
+ try
+ {
+ info = AnnotationInfoCreator.createAnnotationInfo(classPool, fields[i].getFieldInfo2().getConstPool(), introduction.getAnnotation());
+ }
+ catch (NotFoundException e)
+ {
+ logger.warn("Error adding annotation introduction " + introduction.getAnnotation().getIdentifier() + " to " +
+ fields[i].getDeclaringClass().getName() + "." + fields[i].getName() + fields[i].getSignature() + ": " + e.getMessage());
+ continue;
+ }
FieldInfo mi = fields[i].getFieldInfo2();
if (introduction.isInvisible())
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinPointGenerator.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinPointGenerator.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinPointGenerator.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -951,6 +951,7 @@
StringBuffer body = new StringBuffer();
body.append("{");
+
body.append(" try{");
body.append(" switch(++" + CURRENT_ADVICE + "){");
new AroundAdviceCallStrategy().addInvokeCode(this, aroundSetups, body, info);
@@ -1402,7 +1403,14 @@
}
else
{
- aspectClass = classLoader.loadClass(ifw.getAspectClassName());
+ try
+ {
+ aspectClass = classLoader.loadClass(ifw.getAspectClassName());
+ }
+ catch(ClassNotFoundException e)
+ {
+ logger.warn(ifw.getAspectClassName() + " could not be found in loader " + classLoader + ". Not adding to the chain of aspects");
+ }
}
if (aspectClass != null)
{
Modified: projects/aop/trunk/asintegration-core/src/main/java/org/jboss/aop/classpool/BaseClassPool.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/java/org/jboss/aop/classpool/BaseClassPool.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/asintegration-core/src/main/java/org/jboss/aop/classpool/BaseClassPool.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -109,12 +109,22 @@
boolean trace = logger.isTraceEnabled();
if (trace) logger.trace(this + " initiating get of " + classname);
- CtClass clazz = super.get(classname);
- if (trace)
+ try
{
- logger.trace(this + " completed get of " + classname + " " + getClassPoolLogStringForClass(clazz));
+ CtClass clazz = super.get(classname);
+ if (trace)
+ {
+ logger.trace(this + " completed get of " + classname + " " + getClassPoolLogStringForClass(clazz));
+ }
+ return clazz;
}
- return clazz;
+ catch (NotFoundException e)
+ {
+ // AutoGenerated
+ NotFoundException wrapped = new NotFoundException(e.getMessage() + " could not be found from " + this);
+ wrapped.setStackTrace(e.getStackTrace());
+ throw wrapped;
+ }
}
@Override
Modified: projects/aop/trunk/asintegration-core/src/main/java/org/jboss/aop/domain/ScopedClassLoaderDomain.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/java/org/jboss/aop/domain/ScopedClassLoaderDomain.java 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/asintegration-core/src/main/java/org/jboss/aop/domain/ScopedClassLoaderDomain.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -24,6 +24,7 @@
import java.lang.ref.WeakReference;
import java.util.concurrent.ConcurrentHashMap;
+import org.jboss.aop.Advisor;
import org.jboss.aop.AspectManager;
import org.jboss.aop.Domain;
import org.jboss.aop.InterceptionMarkers;
@@ -83,12 +84,6 @@
}
}
- @Override
- public Object getPerVMAspect(AspectDefinition def)
- {
- return getPerVMAspect(def.getName());
- }
-
// These are indexed by classloader now, so no need to manage them explicitly here
// @Override
// public InterceptionMarkers getInterceptionMarkers(ClassLoader loader)
@@ -99,10 +94,16 @@
@Override
public Object getPerVMAspect(String def)
{
+ return getPerVMAspect(def, null);
+ }
+
+ @Override
+ public Object getPerVMAspect(String def, Advisor advisor)
+ {
if (parentDelegation == true)
{
//We will alway be loading up the correct class
- Object aspect = super.getPerVMAspect(def);
+ Object aspect = super.getPerVMAspect(def, advisor);
return aspect;
}
else
@@ -111,6 +112,7 @@
}
}
+
@Override
protected Object createPerVmAspect(String def, AspectDefinition adef, ClassLoader scopedClassLoader)
{
Modified: projects/aop/trunk/asintegration-mc/.classpath
===================================================================
--- projects/aop/trunk/asintegration-mc/.classpath 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/asintegration-mc/.classpath 2009-04-14 15:25:57 UTC (rev 87295)
@@ -2,7 +2,8 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
- <classpathentry excluding="org/jboss/test/aop/classpool/jbosscl/support/excluded/" kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="org/jboss/test/aop/classpool/jbosscl/support/excluded/|org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/" kind="src" output="target/test-classes" path="src/test/java"/>
+ <!-- classpathentry kind="src" output="target/test-classes" path="src/test/java"/> -->
<classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1.1/activation-1.1.1.jar"/>
Modified: projects/aop/trunk/asintegration-mc/pom.xml
===================================================================
--- projects/aop/trunk/asintegration-mc/pom.xml 2009-04-14 15:04:15 UTC (rev 87294)
+++ projects/aop/trunk/asintegration-mc/pom.xml 2009-04-14 15:25:57 UTC (rev 87295)
@@ -53,6 +53,7 @@
</includes>
<excludes>
<exclude>org/jboss/test/aop/integration/complex/test/ComplexImportMultipleVersionsUnitTestCase.class</exclude>
+ <exclude>org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase.class</exclude>
</excludes>
<systemProperties>
<property>
@@ -128,6 +129,9 @@
<jar destfile="${project.build.directory}/${artifactId}-test-weaving-aspects.jar"
basedir="${project.build.testOutputDirectory}"
includes="org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/*.class"/>
+ <jar destfile="${project.build.directory}/${artifactId}-test-weaving-interceptions.jar"
+ basedir="${project.build.testOutputDirectory}"
+ includes="org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/interceptions/*.class"/>
<delete dir="${project.build.testOutputDirectory}/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded"/>
</tasks>
</configuration>
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/TestTranslator.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/TestTranslator.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/TestTranslator.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,47 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support;
+
+import java.security.ProtectionDomain;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.util.loading.Translator;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestTranslator implements Translator
+{
+
+ public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined,
+ ProtectionDomain protectionDomain, byte[] classfileBuffer) throws Exception
+ {
+ return AspectManager.instance(loader).transform(loader, className, classBeingRedefined, protectionDomain, classfileBuffer);
+ }
+
+ public void unregisterClassLoader(ClassLoader loader)
+ {
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerClass.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerClass.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerClass.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalAspectPerClass
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eac)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eac}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerClassJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerClassJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerClassJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalAspectPerClassJoinpoint
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eacj)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eacj}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerInstance.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerInstance.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerInstance.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalAspectPerInstance
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eai)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eai}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalAspectPerJoinpoint
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eaj)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eaj}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerVm.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerVm.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalAspectPerVm.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalAspectPerVm
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eav)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eav}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerClass.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerClass.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerClass.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,54 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalInterceptorPerClass implements Interceptor
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eic)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eic}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerClassJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerClassJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerClassJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,54 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalInterceptorPerClassJoinpoint implements Interceptor
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eicj)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eicj}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerInstance.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerInstance.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerInstance.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,54 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalInterceptorPerInstance implements Interceptor
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eii)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eii}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,54 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalInterceptorPerJoinpoint implements Interceptor
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eij)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eij}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerVm.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerVm.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalInterceptorPerVm.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,54 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalInterceptorPerVm implements Interceptor
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(eiv)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{eiv}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClass.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClass.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClass.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalLightweightAspectPerClass
+{
+ public void before()
+ {
+ Interceptions.append("{elbc}");
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{elac}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{elfc}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClassJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClassJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerClassJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalLightweightAspectPerClassJoinpoint
+{
+ public void before()
+ {
+ Interceptions.append("{elbcj}");
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{elacj}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{elfcj}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerInstance.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerInstance.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerInstance.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalLightweightAspectPerInstance
+{
+ public void before()
+ {
+ Interceptions.append("{elbi}");;
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{elai}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{elfi}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalLightweightAspectPerJoinpoint
+{
+ public void before()
+ {
+ Interceptions.append("{elbj}");
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{elaj}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{elfj}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerVm.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerVm.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/ExternalLightweightAspectPerVm.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalLightweightAspectPerVm
+{
+ public void before()
+ {
+ Interceptions.append("{elbv}");
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{elav}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{elfv}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/IntroducedAnnotation.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/IntroducedAnnotation.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/IntroducedAnnotation.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,36 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface IntroducedAnnotation
+{
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MarkerInterface.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MarkerInterface.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MarkerInterface.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,32 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface MarkerInterface
+{
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MixinImpl.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MixinImpl.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MixinImpl.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,38 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MixinImpl implements MixinInterface
+{
+ public static boolean invoked;
+
+ public void method()
+ {
+ invoked = true;
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MixinInterface.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MixinInterface.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/MixinInterface.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,32 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface MixinInterface
+{
+ void method();
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/OverriddenAnnotation.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/OverriddenAnnotation.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/aspects/OverriddenAnnotation.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,36 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.aspects;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface OverriddenAnnotation
+{
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/interceptions/Interceptions.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/interceptions/Interceptions.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/interceptions/Interceptions.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,52 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions;
+
+import junit.framework.Assert;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Interceptions
+{
+ private static StringBuilder interceptions = new StringBuilder();
+
+ public static void clear()
+ {
+ if (interceptions.length() > 0)
+ {
+ interceptions.delete(0, interceptions.length());
+ }
+ }
+
+ public static void append(String s)
+ {
+ interceptions.append(s);
+ }
+
+ public static void assertEquals(String s)
+ {
+ Assert.assertEquals(s, interceptions.toString());
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/FoundInvoker.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/FoundInvoker.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/FoundInvoker.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,135 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import java.lang.annotation.Annotation;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.jboss.aop.Advised;
+import org.jboss.aop.Advisor;
+import org.jboss.aop.annotation.AnnotationRepository;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.IntroducedAnnotation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.MarkerInterface;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.MixinImpl;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.MixinInterface;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.OverriddenAnnotation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class FoundInvoker
+{
+ public static void invoke()
+ {
+ testIntroduction();
+ testMixin();
+ testAnnotationIntroduction();
+ testAnnotationOverride();
+ testInterceptor();
+ testAspect();
+ testLightweightAspect();
+ }
+
+ private static void testIntroduction()
+ {
+ POJOWithIntroduction pojoWithIntroduction = new POJOWithIntroduction();
+ Assert.assertTrue(pojoWithIntroduction instanceof MarkerInterface);
+ }
+
+ private static void testMixin()
+ {
+ POJOWithMixin pojoWithMixin = new POJOWithMixin();
+ Assert.assertTrue(pojoWithMixin instanceof MixinInterface);
+ Assert.assertFalse(MixinImpl.invoked);
+ ((MixinInterface)pojoWithMixin).method();
+ Assert.assertTrue(MixinImpl.invoked);
+ }
+
+ private static void testAnnotationIntroduction()
+ {
+ POJOWithAnnotationIntroduction pojo = new POJOWithAnnotationIntroduction();
+ Assert.assertTrue(pojo instanceof Advised);
+ Advisor advisor = ((Advised)pojo)._getAdvisor();
+ IntroducedAnnotation ann = (IntroducedAnnotation)advisor.resolveAnnotation(IntroducedAnnotation.class);
+ Assert.assertNotNull(ann);
+
+ Class<?> clazz = pojo.getClass();
+ Annotation[] annotations = clazz.getAnnotations();
+ Assert.assertEquals(1, annotations.length);
+ Assert.assertEquals(IntroducedAnnotation.class, annotations[0].annotationType());
+ }
+
+ private static void testAnnotationOverride()
+ {
+ POJOWithAnnotationOverride pojo = new POJOWithAnnotationOverride();
+ Assert.assertTrue(pojo instanceof Advised);
+ Advisor advisor = ((Advised)pojo)._getAdvisor();
+ AnnotationRepository repository = advisor.getAnnotations();
+ @SuppressWarnings("unchecked")
+ Map anns = repository.getClassAnnotations();
+ Assert.assertEquals(1, anns.size());
+ OverriddenAnnotation ann = (OverriddenAnnotation)advisor.resolveAnnotation(OverriddenAnnotation.class);
+ Assert.assertNotNull(ann);
+ }
+
+ private static void testInterceptor()
+ {
+ Interceptions.clear();
+ POJOWithInterceptor pojo = new POJOWithInterceptor();
+ Assert.assertTrue(pojo instanceof Advised);
+
+ String rtn = pojo.method("XXX");
+ Assert.assertEquals("XXX", rtn);
+ Interceptions.assertEquals("(eiv)(eij)(eii)(eicj)(eic)(iiv)(iij)(iii)(iicj)(iic)XXX{iic}{iicj}{iii}{iij}{iiv}{eic}{eicj}{eii}{eij}{eiv}");
+ }
+
+ private static void testAspect()
+ {
+ Interceptions.clear();
+ POJOWithAspect pojo = new POJOWithAspect();
+ Assert.assertTrue(pojo instanceof Advised);
+
+ String rtn = pojo.method("XXX");
+ Assert.assertEquals("XXX", rtn);
+ Interceptions.assertEquals("(eav)(eaj)(eai)(eacj)(eac)(iav)(iaj)(iai)(iacj)(iac)XXX{iac}{iacj}{iai}{iaj}{iav}{eac}{eacj}{eai}{eaj}{eav}");
+ }
+
+ private static void testLightweightAspect()
+ {
+ Interceptions.clear();
+ POJOWithLightweightAspect pojo = new POJOWithLightweightAspect();
+ Assert.assertTrue(pojo instanceof Advised);
+
+ String rtn = pojo.method("XXX");
+ Assert.assertEquals("XXX", rtn);
+
+ Interceptions.assertEquals("{elbv}{elbj}{elbi}{elbcj}{elbc}{ilbv}{ilbj}{ilbi}" +
+ "{ilbcj}{ilbc}XXX{elav}{elaj}{elai}{elacj}{elac}{ilav}{ilaj}{ilai}" +
+ "{ilacj}{ilac}{elfv}{elfj}{elfi}{elfcj}{elfc}{ilfv}{ilfj}{ilfi}{ilfcj}{ilfc}");
+
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerClass.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerClass.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerClass.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalAspectPerClass
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iac)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iac}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerClassJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerClassJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerClassJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalAspectPerClassJoinpoint
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iacj)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iacj}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerInstance.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerInstance.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerInstance.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalAspectPerInstance
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iai)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iai}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalAspectPerJoinpoint
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iaj)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iaj}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerVm.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerVm.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalAspectPerVm.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,48 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalAspectPerVm
+{
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iav)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iav}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerClass.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerClass.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerClass.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,52 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalInterceptorPerClass
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iic)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iic}");
+ } }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerClassJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerClassJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerClassJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,53 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalInterceptorPerClassJoinpoint
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iicj)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iicj}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerInstance.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerInstance.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerInstance.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,53 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalInterceptorPerInstance
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iii)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iii}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,53 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalInterceptorPerJoinpoint
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iij)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iij}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerVm.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerVm.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalInterceptorPerVm.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,53 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalInterceptorPerVm
+{
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ try
+ {
+ Interceptions.append("(iiv)");
+ return invocation.invokeNext();
+ }
+ finally
+ {
+ Interceptions.append("{iiv}");
+ }
+ }
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClass.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClass.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClass.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalLightweightAspectPerClass
+{
+ public void before()
+ {
+ Interceptions.append("{ilbc}");
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{ilac}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{ilfc}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClassJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClassJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerClassJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalLightweightAspectPerClassJoinpoint
+{
+ public void before()
+ {
+ Interceptions.append("{ilbcj}");
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{ilacj}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{ilfcj}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerInstance.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerInstance.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerInstance.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalLightweightAspectPerInstance
+{
+ public void before()
+ {
+ Interceptions.append("{ilbi}");
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{ilai}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{ilfi}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerJoinpoint.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerJoinpoint.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerJoinpoint.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalLightweightAspectPerJoinpoint
+{
+ public void before()
+ {
+ Interceptions.append("{ilbj}");
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{ilaj}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{ilfj}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerVm.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerVm.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/InternalLightweightAspectPerVm.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,51 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.aop.advice.annotation.Return;
+import org.jboss.aop.advice.annotation.Thrown;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InternalLightweightAspectPerVm
+{
+ public void before()
+ {
+ Interceptions.append("{ilbv}");;
+ }
+
+ public String after(@Return String rtn)
+ {
+ Interceptions.append("{ilav}");
+ return rtn;
+ }
+
+ public String finaly(@Thrown Throwable thrown, @Return String rtn)
+ {
+ Interceptions.append("{ilfv}");
+ return rtn;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/NotFoundInvoker.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/NotFoundInvoker.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/NotFoundInvoker.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,166 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import java.lang.annotation.Annotation;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.jboss.aop.Advised;
+import org.jboss.aop.Advisor;
+import org.jboss.aop.annotation.AnnotationRepository;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class NotFoundInvoker
+{
+ public static void invoke()
+ {
+ testIntroduction();
+ testMixin();
+ testAnnotationIntroduction();
+ testAnnotationOverride();
+ testInterceptor();
+ testAspect();
+ testLightweightAspect();
+ }
+
+// @SuppressWarnings("unused")
+// private static void logClassClassLoader(Class<?> clazz)
+// {
+// System.out.println("------ " + clazz.getName() + " has loader " + clazz.getClassLoader());
+// }
+
+ private static void testIntroduction()
+ {
+ System.out.println("---> testIntroduction");
+ POJOWithIntroduction pojo = new POJOWithIntroduction();
+ for (Class<?> iface : pojo.getClass().getInterfaces())
+ {
+ if (iface.getName().contains("MarkerInterface"))
+ {
+ Assert.fail("Should not have found MarkerInterface");
+ }
+ }
+ System.out.println("---> testIntroduction pased");
+ }
+
+ private static void testMixin()
+ {
+ System.out.println("---> testMixin");
+ POJOWithMixin pojo = null;
+ try
+ {
+ pojo = new POJOWithMixin();
+ }
+ catch(Error expected)
+ {
+ return;
+ }
+
+ for (Class<?> iface : pojo.getClass().getInterfaces())
+ {
+ if (iface.getName().contains("MixinInterface"))
+ {
+ Assert.fail("Should not have found MixinInterface");
+ }
+ }
+ System.out.println("---> testMixin passed");
+ }
+
+ private static void testAnnotationIntroduction()
+ {
+ System.out.println("---> testAnnotationIntroduction");
+ POJOWithAnnotationIntroduction pojo = new POJOWithAnnotationIntroduction();
+ Assert.assertTrue(pojo instanceof Advised);
+ Class<?> clazz = pojo.getClass();
+ Annotation[] annotations = clazz.getAnnotations();
+ Assert.assertEquals(0, annotations.length);
+ System.out.println("---> testAnnotationIntroduction passed");
+ }
+
+ private static void testAnnotationOverride()
+ {
+ System.out.println("---> testAnnotationOverride");
+ POJOWithAnnotationOverride pojo = new POJOWithAnnotationOverride();
+ Assert.assertTrue(pojo instanceof Advised);
+ Advisor advisor = ((Advised)pojo)._getAdvisor();
+ AnnotationRepository repository = advisor.getAnnotations();
+ @SuppressWarnings({"unchecked", "unused"})
+
+ Map anns = repository.getClassAnnotations();
+
+ //Need to decide how these are handled
+// Assert.assertEquals(0, anns.size());
+ System.out.println("---> testAnnotationOverride passed");
+ }
+
+ private static void testInterceptor()
+ {
+ Interceptions.clear();
+ System.out.println("---> testInterceptor");
+ POJOWithInterceptor pojo = new POJOWithInterceptor();
+ Assert.assertTrue(pojo instanceof Advised);
+
+ String rtn = pojo.method("XXX");
+ Assert.assertEquals("XXX", rtn);
+
+ Interceptions.assertEquals("(iiv)(iij)(iii)(iicj)(iic)XXX{iic}{iicj}{iii}{iij}{iiv}");
+ System.out.println("---> testInterceptor passed");
+ }
+
+ private static void testAspect()
+ {
+ Interceptions.clear();
+ System.out.println("---> testAspect");
+ POJOWithAspect pojo = new POJOWithAspect();
+ Assert.assertTrue(pojo instanceof Advised);
+
+ String rtn = pojo.method("XXX");
+ Assert.assertEquals("XXX", rtn);
+
+ Interceptions.assertEquals("(iav)(iaj)(iai)(iacj)(iac)XXX{iac}{iacj}{iai}{iaj}{iav}");
+ System.out.println("---> testAspect passed");
+ }
+
+ private static void testLightweightAspect()
+ {
+ Interceptions.clear();
+ System.out.println("---> testLightweightAspect");
+ POJOWithLightweightAspect pojo = new POJOWithLightweightAspect();
+ Assert.assertTrue(pojo instanceof Advised);
+
+ String rtn = pojo.method("XXX");
+ Assert.assertEquals("XXX", rtn);
+
+ Interceptions.assertEquals("{ilbv}{ilbj}{ilbi}{ilbcj}{ilbc}XXX{ilav}{ilaj}{ilai}" +
+ "{ilacj}{ilac}{ilfv}{ilfj}{ilfi}{ilfcj}{ilfc}");
+
+ System.out.println("---> testLightweightAspect passed");
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAnnotationIntroduction.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAnnotationIntroduction.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAnnotationIntroduction.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,32 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJOWithAnnotationIntroduction
+{
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAnnotationOverride.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAnnotationOverride.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAnnotationOverride.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,32 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJOWithAnnotationOverride
+{
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspect.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspect.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithAspect.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,38 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJOWithAspect
+{
+ public String method(String arg)
+ {
+ Interceptions.append(arg);
+ return arg;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithInterceptor.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithInterceptor.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithInterceptor.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,38 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJOWithInterceptor
+{
+ public String method(String arg)
+ {
+ Interceptions.append(arg);
+ return arg;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithIntroduction.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithIntroduction.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithIntroduction.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,32 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJOWithIntroduction
+{
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithLightweightAspect.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithLightweightAspect.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithLightweightAspect.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,38 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions.Interceptions;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJOWithLightweightAspect
+{
+ public String method(String msg)
+ {
+ Interceptions.append(msg);
+ return msg;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithMixin.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithMixin.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/support/excluded/target/POJOWithMixin.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,32 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.support.excluded.target;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJOWithMixin
+{
+
+}
Added: projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase.java
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase.java (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/java/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase.java 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,245 @@
+/*
+* 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.test.aop.classpool.jbosscl.weaving.test;
+
+import java.lang.reflect.Method;
+import java.net.URL;
+
+import javassist.ClassPool;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.AspectXmlLoader;
+import org.jboss.test.aop.classpool.jbosscl.support.BundleInfoBuilder;
+import org.jboss.test.aop.classpool.jbosscl.test.JBossClClassPoolTest;
+import org.jboss.test.aop.classpool.jbosscl.weaving.support.TestTranslator;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class WeavingTestCase extends JBossClClassPoolTest
+{
+ public final static String DOMAIN = "AOPClasses";
+
+ public final static URL JAR_TARGET = getURLRelativeToProjectRoot("target/jboss-aop-asintegration-mc-test-weaving-target.jar");
+ public final static URL JAR_ASPECTS = getURLRelativeToProjectRoot("target/jboss-aop-asintegration-mc-test-weaving-aspects.jar");
+ public final static URL JAR_INTERCEPTIONS = getURLRelativeToProjectRoot("target/jboss-aop-asintegration-mc-test-weaving-interceptions.jar");
+
+
+ public static final String PACKAGE_TARGET = "org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target";
+ public static final String PACKAGE_ASPECTS = "org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects";
+ public static final String PACKAGE_INTERCEPTIONS = "org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.interceptions";
+
+ public final static String CLASS_FOUND_INVOKER = PACKAGE_TARGET + ".FoundInvoker";
+ public final static String CLASS_NOT_FOUND_INVOKER = PACKAGE_TARGET + ".NotFoundInvoker";
+
+ public final static String AOP_XML = "org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase-aop.xml";
+
+
+ public WeavingTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testImportAllAspects() throws Exception
+ {
+ runTest(
+ CLASS_FOUND_INVOKER,
+ new ClassLoaderSetup()
+ {
+
+ public ClassPool setupTargetPool() throws Exception
+ {
+ return createChildDomainParentLastClassPool("TARGET", DOMAIN, true, JAR_TARGET);
+ }
+
+ public ClassPool setupAspectsPool() throws Exception
+ {
+ return createChildDomainParentLastClassPool("ASPECTS", DOMAIN, true, JAR_ASPECTS);
+ }
+
+ public ClassPool setupInterceptionsPool() throws Exception
+ {
+ return createChildDomainParentLastClassPool("INTERCEPTIONS", DOMAIN, true, JAR_INTERCEPTIONS);
+ }
+ });
+ }
+
+ public void testNotImportAllAspectsNotIncluded() throws Exception
+ {
+ runTest(
+ CLASS_NOT_FOUND_INVOKER,
+ new ClassLoaderSetup()
+ {
+
+ public ClassPool setupTargetPool() throws Exception
+ {
+ BundleInfoBuilder builder = BundleInfoBuilder.getBuilder().createModule("Target").createRequireModule("INTERCEPTIONS");
+ return createChildDomainParentLastClassPool("TARGET", DOMAIN, builder, JAR_TARGET);
+ }
+
+ public ClassPool setupAspectsPool() throws Exception
+ {
+ BundleInfoBuilder builder = BundleInfoBuilder.getBuilder().createModule("Aspects").createRequireModule("INTERCEPTIONS");
+ return createChildDomainParentLastClassPool("ASPECTS", DOMAIN, builder, JAR_ASPECTS);
+ }
+
+ public ClassPool setupInterceptionsPool() throws Exception
+ {
+ BundleInfoBuilder builder = BundleInfoBuilder.getBuilder().
+ createModule("INTERCEPTIONS").
+ createPackage(PACKAGE_INTERCEPTIONS);
+ return createChildDomainParentLastClassPool("INTERCEPTIONS", DOMAIN, builder, JAR_INTERCEPTIONS);
+ }
+ });
+ }
+
+ public void testNotImportAllAspectsIncludedByPackage() throws Exception
+ {
+ runTest(
+ CLASS_FOUND_INVOKER,
+ new ClassLoaderSetup()
+ {
+ public ClassPool setupTargetPool() throws Exception
+ {
+ BundleInfoBuilder builder = BundleInfoBuilder.getBuilder().
+ createModule("TARGET").
+ createRequirePackage(PACKAGE_ASPECTS).
+ createRequirePackage(PACKAGE_INTERCEPTIONS);
+ return createChildDomainParentLastClassPool("TARGET", DOMAIN, builder, JAR_TARGET);
+ }
+
+ public ClassPool setupAspectsPool() throws Exception
+ {
+ BundleInfoBuilder builder = BundleInfoBuilder.getBuilder().
+ createModule("ASPECTS").
+ createPackage(PACKAGE_ASPECTS).
+ createRequirePackage(PACKAGE_INTERCEPTIONS);
+ return createChildDomainParentLastClassPool("ASPECTS", DOMAIN, builder, JAR_ASPECTS);
+ }
+
+
+ public ClassPool setupInterceptionsPool() throws Exception
+ {
+ BundleInfoBuilder builder = BundleInfoBuilder.getBuilder().
+ createPackage(PACKAGE_INTERCEPTIONS).
+ createModule("INTERCEPTIONS").
+ createPackage(PACKAGE_INTERCEPTIONS);
+ return createChildDomainParentLastClassPool("INTERCEPTIONS", DOMAIN, builder, JAR_INTERCEPTIONS);
+ }
+ });
+ }
+
+ public void testNotImportAllAspectsIncludedByModule() throws Exception
+ {
+ runTest(
+ CLASS_FOUND_INVOKER,
+ new ClassLoaderSetup()
+ {
+ public ClassPool setupTargetPool() throws Exception
+ {
+ BundleInfoBuilder builder = BundleInfoBuilder.getBuilder().
+ createModule("TARGET").
+ createRequireModule("ASPECTS").
+ createRequireModule("INTERCEPTIONS");
+ return createChildDomainParentLastClassPool("TARGET", DOMAIN, builder, JAR_TARGET);
+ }
+
+ public ClassPool setupAspectsPool() throws Exception
+ {
+ BundleInfoBuilder builder = BundleInfoBuilder.getBuilder().
+ createModule("ASPECTS").
+ createPackage(PACKAGE_ASPECTS).
+ createRequireModule("INTERCEPTIONS");
+ return createChildDomainParentLastClassPool("ASPECTS", DOMAIN, builder, JAR_ASPECTS);
+ }
+
+
+ public ClassPool setupInterceptionsPool() throws Exception
+ {
+ BundleInfoBuilder builder = BundleInfoBuilder.getBuilder().
+ createModule("INTERCEPTIONS").
+ createPackage(PACKAGE_INTERCEPTIONS);
+ return createChildDomainParentLastClassPool("INTERCEPTIONS", DOMAIN, builder, JAR_INTERCEPTIONS);
+ }
+ });
+ }
+
+ private void deployAopXml(ClassLoader cl) throws Exception
+ {
+ URL aopUrl = this.getClass().getClassLoader().getResource(AOP_XML);
+ AspectXmlLoader.deployXML(aopUrl, cl, AspectManager.instance());
+ }
+
+ private void undeployAopXml() throws Exception
+ {
+ URL aopUrl = this.getClass().getClassLoader().getResource(AOP_XML);
+ AspectXmlLoader.undeployXML(aopUrl, AspectManager.instance());
+ }
+
+ public void runTest(String invokerName, ClassLoaderSetup setup) throws Exception
+ {
+ getSystem().setTranslator(new TestTranslator());
+ ClassPool interceptionsPool = null;
+ ClassPool targetPool = null;
+ ClassPool aspectsPool = null;
+ try
+ {
+ interceptionsPool = setup.setupInterceptionsPool();
+ aspectsPool = setup.setupAspectsPool();
+ targetPool = setup.setupTargetPool();
+
+ System.out.println("Target loader: " + targetPool.getClassLoader() + "; Aspect loader: " + aspectsPool.getClassLoader());
+
+ ClassLoader old = Thread.currentThread().getContextClassLoader();
+ deployAopXml(aspectsPool.getClassLoader());
+ try
+ {
+ Thread.currentThread().setContextClassLoader(targetPool.getClassLoader());
+ Class<?> invoker = targetPool.getClassLoader().loadClass(invokerName);
+ Method m = invoker.getMethod("invoke");
+ m.invoke(null);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(old);
+ undeployAopXml();
+ }
+ }
+ finally
+ {
+ getSystem().setTranslator(null);
+ unregisterClassPool(targetPool);
+ unregisterClassPool(aspectsPool);
+ unregisterClassPool(interceptionsPool);
+ unregisterDomain(targetPool);
+ }
+ }
+
+ private interface ClassLoaderSetup
+ {
+ ClassPool setupInterceptionsPool() throws Exception;
+ ClassPool setupTargetPool() throws Exception;
+ ClassPool setupAspectsPool() throws Exception;
+ }
+}
Added: projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase-aop.xml
===================================================================
--- projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase-aop.xml (rev 0)
+++ projects/aop/trunk/asintegration-mc/src/test/resources/org/jboss/test/aop/classpool/jbosscl/weaving/test/WeavingTestCase-aop.xml 2009-04-14 15:25:57 UTC (rev 87295)
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aop>
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerVm" scope="PER_VM"/>
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerJoinpoint" scope="PER_JOINPOINT"/>
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerInstance" scope="PER_INSTANCE"/>
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerClassJoinpoint" scope="PER_CLASS_JOINPOINT"/>
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerClass" scope="PER_CLASS"/>
+
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerVm" scope="PER_VM"/>
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerJoinpoint" scope="PER_JOINPOINT"/>
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerInstance" scope="PER_INSTANCE"/>
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerClassJoinpoint" scope="PER_CLASS_JOINPOINT"/>
+ <interceptor class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerClass" scope="PER_CLASS"/>
+
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerVm" scope="PER_VM"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerJoinpoint" scope="PER_JOINPOINT"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerInstance" scope="PER_INSTANCE"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerClassJoinpoint" scope="PER_CLASS_JOINPOINT"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerClass" scope="PER_CLASS"/>
+
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerVm" scope="PER_VM"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerJoinpoint" scope="PER_JOINPOINT"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerInstance" scope="PER_INSTANCE"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerClassJoinpoint" scope="PER_CLASS_JOINPOINT"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerClass" scope="PER_CLASS"/>
+
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerVm" scope="PER_VM"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerJoinpoint" scope="PER_JOINPOINT"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerInstance" scope="PER_INSTANCE"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerClassJoinpoint" scope="PER_CLASS_JOINPOINT"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerClass" scope="PER_CLASS"/>
+
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerVm" scope="PER_VM"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerJoinpoint" scope="PER_JOINPOINT"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerInstance" scope="PER_INSTANCE"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerClassJoinpoint" scope="PER_CLASS_JOINPOINT"/>
+ <aspect class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerClass" scope="PER_CLASS"/>
+
+
+ <!-- TODO all scopes -->
+
+ <introduction class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithIntroduction">
+ <interfaces>
+ org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.MarkerInterface
+ </interfaces>
+ </introduction>
+
+ <introduction class="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithMixin">
+ <mixin>
+ <interfaces>
+ org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.MixinInterface
+ </interfaces>
+ <class>org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.MixinImpl</class>
+ </mixin>
+ </introduction>
+
+ <prepare expr="all(org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAnnotationOverride)"/>
+ <prepare expr="all(org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAnnotationIntroduction)"/>
+ <annotation expr="class(org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAnnotationOverride)">
+ @org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.OverriddenAnnotation
+ </annotation>
+ <annotation-introduction expr="class(org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAnnotationIntroduction)">
+ @org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.IntroducedAnnotation
+ </annotation-introduction>
+
+ <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithInterceptor->method(java.lang.String))">
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerVm"/>
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerJoinpoint"/>
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerInstance"/>
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerClassJoinpoint"/>
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalInterceptorPerClass"/>
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerVm"/>
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerJoinpoint"/>
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerInstance"/>
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerClassJoinpoint"/>
+ <interceptor-ref name="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalInterceptorPerClass"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithAspect->method(java.lang.String))">
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerVm"/>
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerJoinpoint"/>
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerInstance"/>
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerClassJoinpoint"/>
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalAspectPerClass"/>
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerVm"/>
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerJoinpoint"/>
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerInstance"/>
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerClassJoinpoint"/>
+ <advice name="invoke" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalAspectPerClass"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.POJOWithLightweightAspect->method(java.lang.String))">
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerVm"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerVm"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerVm"/>
+
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerJoinpoint"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerJoinpoint"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerJoinpoint"/>
+
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerInstance"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerInstance"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerInstance"/>
+
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerClassJoinpoint"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerClassJoinpoint"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerClassJoinpoint"/>
+
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerClass"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerClass"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.aspects.ExternalLightweightAspectPerClass"/>
+
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerVm"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerVm"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerVm"/>
+
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerJoinpoint"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerJoinpoint"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerJoinpoint"/>
+
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerInstance"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerInstance"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerInstance"/>
+
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerClassJoinpoint"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerClassJoinpoint"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerClassJoinpoint"/>
+
+ <before name="before" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerClass"/>
+ <after name="after" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerClass"/>
+ <finally name="finaly" aspect="org.jboss.test.aop.classpool.jbosscl.weaving.support.excluded.target.InternalLightweightAspectPerClass"/>
+
+ </bind>
+
+</aop>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list