[jboss-cvs] JBossAS SVN: r67390 - in projects/microcontainer/trunk/aop-mc-int: src/main/org/jboss/aop/microcontainer and 16 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 22 19:19:16 EST 2007
Author: kabir.khan at jboss.com
Date: 2007-11-22 19:19:15 -0500 (Thu, 22 Nov 2007)
New Revision: 67390
Added:
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AbstractAnnotation.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AnnotationIntroduction.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AnnotationOverride.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/BindingEntry.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/CFlowStack.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/CFlowStackEntry.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/ClassMetaData.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/ClassMetaDataLoader.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/DelegatingBeanAspectFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/DynamicCFlowDef.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/InterceptorEntry.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/MixinEntry.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/NamedPointcut.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PrecedenceDef.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PrecedenceDefEntry.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Prepare.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/SecurityActions.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Stack.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/StackEntry.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/TypeDef.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AdviceData.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AspectBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AspectManagerAwareBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BaseInterceptorData.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BeanMetaDataUtil.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BindBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/CFlowStackBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/ConfigureLifecycleBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/CreateLifecycleBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/DescribeLifecycleBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/InstallLifecycleBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/InstantiateLifecycleBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/IntroductionBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/LifecycleBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/PreInstallLifecycleBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/PrecedenceBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StackBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StackRefData.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StartLifecycleBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/CFlowAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/CFlowBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataLoaderBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectBeanTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinClassesAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinClassesBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinExprAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinExprBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic2.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic2.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleStackAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleStackBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/PrecedenceAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/PrecedenceBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic2.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic2.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCaseNotAutomatic0.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TESTS.txt
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TypeDefAopTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TypeDefBeansTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Annotation1.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Annotation2.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Dependency.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/DynamicCFlowImpl.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Interceptions.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/IntroductionInterface.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/LightweightAspect.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/MixinImpl.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/MixinInterface.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/POJO.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/POJO2.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerClassAspect.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerClassJoinPointAspect.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerInstanceAspect.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerJoinPointAspect.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerVmAspect.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleAspectFactory.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleFactoryAspect.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleFactoryInterceptor.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleInterceptorFactory.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspect.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspectWithDependency.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspectWithProperty.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestClassMetaDataAspect.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestInterceptor.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestInterceptorWithDependency.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestMetaDataBinding.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestMetaDataLoader.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataLoaderBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectBeanTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansDifferentOrderTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyTest.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefAopTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefBeansTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefTest.java
Removed:
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AbstractBinding.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBeanMetaDataUtil.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/MixinBinding.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/StackBinding.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans2/
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans2/
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptedUseCaseXmlTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/SimpleAspectUseCaseXmlTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans2/
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/InterceptedUseCaseXmlTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/SimpleAspectUseCaseXmlTestCase.java
Modified:
projects/microcontainer/trunk/aop-mc-int/pom.xml
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Aspect.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBinding.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/IntroductionBinding.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/LifecycleBeanMetaDataFactory.java
projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/xml/AOPBeansSchemaInitializer.java
projects/microcontainer/trunk/aop-mc-int/src/resources/main/schema/aop-beans_1_0.xsd
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/aop/junit/MicrocontainerJunitSmokeTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerAdvisedAnnotationOverrideProxyAdvisorTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerAdvisedInstanceAdvisorTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerNotAdvisedProxyAdvisorTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/BeanCallingMethodInCtorTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/BeanNoDefaultCtorUsingParamTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/ConstructorInterceptorWithDependencyTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/DeployersInterceptedAspectManagerJMXTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/DeployersInterceptedTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptedTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithAnnotationDependencyTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithDependencyTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithNestedAnnotationDependencyTestCaseNotAutomatic3.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithNestedMethodAnnotationDependencyTestCaseNotAutomatic3.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenClassAnnotationDependencyTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenMethodAnnotationDependencyForChildTestCaseNotAutomatic2.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenMethodAnnotationDependencyTestCaseNotAutomatic2.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/IntroductionDependencyTestCaseNotAutomatic1.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/JMXDecoratedTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/JndiDecoratedTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/MetaDataTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/MixinTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/SimpleAspectTestCase.xml
projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/xml/test/Aspect.xml
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/AspectMCAllTestSuite.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/JMXDecoratedTestCase.java
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/xml/test/AspectTestCase.java
Log:
[JBAOP-468]
* Switch over to use the new underlying beans. Move them from org.jboss.aop.microcontainer.beans2 to org.jboss.aop.microcontainer.beans.
* Add use-case xml parsing for most -aop.xml artifacts
* Move new tests from org.jboss.test.microcontainer.beans2 to org.jboss.test.microcontainer.beans.
* Modify tests to use the new underying beans and the new use-case xml
Modified: projects/microcontainer/trunk/aop-mc-int/pom.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/pom.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/pom.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -130,7 +130,8 @@
<skip>true</skip>
<reportsDirectory>${project.build.directory}/surefire-reports/no-weave</reportsDirectory>
<includes>
- <include>org/jboss/test/microcontainer/test/**/*TestCase.java</include>
+ <include>org/jboss/test/microcontainer/test/**/*TestCase.java</include>
+ <include>org/jboss/test/microcontainer/beans/test/**/*TestCase.java</include>
</includes>
<systemProperties>
<property>
@@ -154,6 +155,7 @@
<reportsDirectory>${project.build.directory}/surefire-reports/no-weave-secure</reportsDirectory>
<includes>
<include>org/jboss/test/microcontainer/test/**/*TestCase.java</include>
+ <include>org/jboss/test/microcontainer/beans/test/**/*TestCase.java</include>
</includes>
<systemProperties>
<property>
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AbstractAnnotation.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AbstractAnnotation.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AbstractAnnotation.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,104 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.introduction.AnnotationIntroduction;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class AbstractAnnotation
+{
+ protected AspectManager manager;
+ private String expr;
+ private String annotation;
+ private boolean invisible = false;
+ protected AnnotationIntroduction intro;
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getExpr()
+ {
+ return expr;
+ }
+
+ public void setExpr(String expr)
+ {
+ this.expr = expr;
+ }
+
+ public String getAnnotation()
+ {
+ return annotation;
+ }
+
+ public void setAnnotation(String annotation)
+ {
+ this.annotation = annotation;
+ }
+
+ public boolean isInvisible()
+ {
+ return invisible;
+ }
+
+ public void setInvisible(boolean invisible)
+ {
+ this.invisible = invisible;
+ }
+
+ public abstract void start();
+
+ protected AnnotationIntroduction validateAndCreate()
+ {
+ if (manager == null)
+ {
+ throw new IllegalArgumentException("Null manager");
+ }
+ if (expr == null)
+ {
+ throw new IllegalArgumentException("Null expr");
+ }
+ if (annotation == null)
+ {
+ throw new IllegalArgumentException("Null annotation");
+ }
+
+ intro = AnnotationIntroduction.createComplexAnnotationIntroduction(expr, annotation, invisible);
+ return intro;
+ }
+
+
+
+ public abstract void stop();
+}
Deleted: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AbstractBinding.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AbstractBinding.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AbstractBinding.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -1,127 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.microcontainer.beans;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.advice.AspectDefinition;
-import org.jboss.util.id.GUID;
-
-/**
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public abstract class AbstractBinding
-{
- protected AspectManager manager;
-
- protected String name = GUID.asString();
-
- protected AspectDefinition aspect;
-
- protected String method = "invoke";
-
- /**
- * Get the aspectDefinition.
- *
- * @return the aspectDefinition.
- */
- public AspectDefinition getAspect()
- {
- return aspect;
- }
-
- /**
- * Set the aspectDefinition.
- *
- * @param aspect The aspectDefinition to set.
- */
- public void setAspect(AspectDefinition aspect)
- {
- this.aspect = aspect;
- }
-
- /**
- * Get the manager.
- *
- * @return the manager.
- */
- public AspectManager getManager()
- {
- return manager;
- }
-
- /**
- * Set the manager.
- *
- * @param manager The manager to set.
- */
- public void setManager(AspectManager manager)
- {
- this.manager = manager;
- }
-
- /**
- * Get the method.
- *
- * @return the method.
- */
- public String getMethod()
- {
- return method;
- }
-
- /**
- * Set the method.
- *
- * @param method The method to set.
- */
- public void setMethod(String method)
- {
- this.method = method;
- }
-
- public void start() throws Exception
- {
- createAndAddBinding();
- }
-
- public void stop() throws Exception
- {
- removeBinding();
- }
-
- public void uninstall() throws Exception
- {
- stop();
- }
-
- public void rebind(AspectDefinition aspect) throws Exception
- {
- this.aspect = aspect;
- stop();
- start();
- }
-
- protected abstract void createAndAddBinding() throws Exception;
- protected abstract void removeBinding() throws Exception;
-}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AnnotationIntroduction.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AnnotationIntroduction.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AnnotationIntroduction.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnotationIntroduction extends AbstractAnnotation
+{
+ public void start()
+ {
+ validateAndCreate();
+ manager.addAnnotationIntroduction(intro);
+ }
+
+ @Override
+ public void stop()
+ {
+ manager.removeAnnotationIntroduction(intro);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AnnotationOverride.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AnnotationOverride.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AnnotationOverride.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnotationOverride extends AbstractAnnotation
+{
+ @Override
+ public void start()
+ {
+ validateAndCreate();
+ manager.addAnnotationOverride(intro);
+ }
+
+ @Override
+ public void stop()
+ {
+ manager.removeAnnotationOverride(intro);
+ }
+}
Modified: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Aspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Aspect.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Aspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -21,15 +21,22 @@
*/
package org.jboss.aop.microcontainer.beans;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
import org.jboss.aop.AspectManager;
import org.jboss.aop.advice.AspectDefinition;
+import org.jboss.aop.advice.AspectFactory;
+import org.jboss.aop.advice.AspectFactoryDelegator;
import org.jboss.aop.advice.GenericAspectFactory;
import org.jboss.aop.advice.Scope;
import org.jboss.aop.advice.ScopeUtil;
import org.jboss.aop.instrument.Untransformable;
import org.jboss.beans.metadata.plugins.factory.GenericBeanFactory;
import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.ConfigureKernelControllerContextAware;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
import org.jboss.logging.Logger;
@@ -37,6 +44,7 @@
/**
* An Aspect.
+ * This installs the AspectDefinition and AspectFactory into aop
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision$
@@ -45,14 +53,22 @@
{
private static final Logger log = Logger.getLogger(Aspect.class);
+ /**
+ * The AspectManager/Domain we are creating this aspect for
+ */
protected AspectManager manager;
protected String adviceName = GUID.asString();
+
+ /**
+ * True if aspect is an aspect factory, rather than the aspect itself
+ */
+ protected boolean factory;
/**
* The scope of the aspect we are creating
*/
- Scope scope;
+ protected Scope scope;
protected ManagedAspectDefinition definition;
@@ -83,10 +99,10 @@
protected String aspectDefName;
/**
- * Reference to the kernel
+ * All the AspectBindings referencing this Aspect
*/
- protected Kernel kernel;
-
+ protected Map<String, AspectBinding> aspectBindings = new LinkedHashMap<String, AspectBinding>();
+
/**
* Get the adviceName.
*
@@ -98,6 +114,14 @@
}
/**
+ * Sets if we are an aspect factory or not
+ */
+ public void setFactory(boolean factory)
+ {
+ this.factory = factory;
+ }
+
+ /**
* Set the adviceName.
*
* @param adviceName The adviceName to set.
@@ -201,7 +225,6 @@
{
myname = (String)context.getName();
this.context = context;
- kernel = context.getKernel();
}
public void unsetKernelControllerContext(KernelControllerContext context) throws Exception
@@ -244,22 +267,41 @@
GenericBeanAspectFactory factory = (GenericBeanAspectFactory)definition.getFactory();
factory.setBeanFactory(advice);
}
+
+ //Copy the aspectbindings to avoid ConcurrentModificationExceptions
+ ArrayList<AspectBinding> clonedBindings = new ArrayList<AspectBinding>();
+ for (AspectBinding aspectBinding : aspectBindings.values())
+ {
+ clonedBindings.add(aspectBinding);
+ }
+
+ for (AspectBinding aspectBinding : clonedBindings)
+ {
+ aspectBinding.rebind();
+ }
+
log.debug("Bound aspect " + aspectDefName + "; deployed:" + definition.isDeployed());
}
protected ManagedAspectDefinition getAspectDefinitionNoDependencies()
{
- return new ManagedAspectDefinition(aspectDefName, scope, new GenericBeanAspectFactory(adviceName, advice));
+ AspectFactory factory = this.factory ?
+ new DelegatingBeanAspectFactory(adviceName, advice) : new GenericBeanAspectFactory(adviceName, advice);
+ return new ManagedAspectDefinition(aspectDefName, scope, factory);
}
protected ManagedAspectDefinition getAspectDefintionDependencies()
{
- return new ManagedAspectDefinition(aspectDefName, scope, new GenericBeanAspectFactory(aspectDefName, advice), false);
+ AspectFactory factory = this.factory ?
+ new DelegatingBeanAspectFactory(aspectDefName, advice) : new GenericBeanAspectFactory(aspectDefName, advice);
+ return new ManagedAspectDefinition(aspectDefName, scope, factory, false);
}
protected ManagedAspectDefinition getAspectDefinitionPlainAspectFactory()
{
- return new ManagedAspectDefinition(aspectDefName, scope, new GenericAspectFactory(adviceName, null));
+ AspectFactory factory = this.factory ?
+ new AspectFactoryDelegator(adviceName, null) : new GenericAspectFactory(adviceName, null);
+ return new ManagedAspectDefinition(aspectDefName, scope, factory);
}
protected void addDefinitionToManager()
@@ -284,4 +326,14 @@
definition = null;
}
}
+
+ void addAspectBinding(AspectBinding binding)
+ {
+ aspectBindings.put(binding.getName(), binding);
+ }
+
+ void removeAspectBinding(AspectBinding binding)
+ {
+ aspectBindings.remove(binding.getName());
+ }
}
\ No newline at end of file
Deleted: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBeanMetaDataFactory.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -1,221 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.microcontainer.beans;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
-import org.jboss.beans.metadata.plugins.AbstractInstallMetaData;
-import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
-import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
-import org.jboss.beans.metadata.plugins.ThisValueMetaData;
-import org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.beans.metadata.spi.InstallMetaData;
-import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
-import org.jboss.beans.metadata.spi.ParameterMetaData;
-
-/**
- * AspectBeanMetaDataFactory.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class AspectBeanMetaDataFactory extends GenericBeanFactoryMetaData
- implements BeanMetaDataFactory
-{
- private static final long serialVersionUID = 1L;
-
- /** The pointcut */
- private String pointcut;
-
- private String adviceMethod;
-
- AspectBeanMetaDataUtil util = new AspectBeanMetaDataUtil();
-
- public void setManagerBean(String managerBean)
- {
- util.setManagerBean(managerBean);
- }
-
- public void setManagerProperty(String aspectManagerProperty)
- {
- util.setManagerProperty(aspectManagerProperty);
- }
-
- /**
- * Get the pointcut.
- *
- * @return the pointcut.
- */
- public String getPointcut()
- {
- return pointcut;
- }
-
- /**
- * Set the pointcut.
- *
- * @param pointcut the pointcut.
- */
- public void setPointcut(String pointcut)
- {
- this.pointcut = pointcut;
- }
-
-
- public String getAdviceMethod()
- {
- return adviceMethod;
- }
-
- public void setAdviceMethod(String adviceMethod)
- {
- this.adviceMethod = adviceMethod;
- }
-
- /**
- * See http://www.jboss.com/index.html?module=bb&op=viewtopic&t=79719&start=20
- * for a description of the beans created
- */
- @Override
- public List<BeanMetaData> getBeans()
- {
- ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
-
-
- result.add(this);
-
- String aspectName = name + "$Aspect";
- AbstractBeanMetaData aspect = new AbstractBeanMetaData();
- aspect.setName(aspectName);
- aspect.setBean(Aspect.class.getName());
- util.setAspectManagerProperty(aspect, "manager");
- result.add(aspect);
-
- String aspectBindingName = name + "$AspectBinding";
- AbstractBeanMetaData aspectBinding = new AbstractBeanMetaData();
- aspectBinding.setName(aspectBindingName);
- aspectBinding.setBean(AspectBinding.class.getName());
- util.setSimpleProperty(aspectBinding, "pointcut", pointcut);
- util.setDependencyProperty(aspectBinding, "aspect", aspectName, "definition");
- util.setAspectManagerProperty(aspectBinding, "manager");
- if (adviceMethod != null)
- {
- util.setSimpleProperty(aspectBinding, "method", adviceMethod);
- }
- result.add(aspectBinding);
-
- if (hasInjectedBeans())
- {
- configureWithDependencies(aspect, aspectBinding);
- }
- else
- {
- configureNoDependencies(aspect, aspectBinding);
- }
-
-
- return result;
- }
-
- private void configureWithDependencies(AbstractBeanMetaData aspect, AbstractBeanMetaData aspectBinding)
- {
- aspect.addProperty(new AbstractPropertyMetaData("adviceBean", name));
-
- AbstractInstallMetaData installAspect = new AbstractInstallMetaData();
- installAspect.setBean(aspect.getName());
- installAspect.setMethodName("install");
- ArrayList<ParameterMetaData> parameters = new ArrayList<ParameterMetaData>();
- parameters.add(new AbstractParameterMetaData(new ThisValueMetaData()));
- installAspect.setParameters(parameters);
-
- AbstractInstallMetaData installBinding = new AbstractInstallMetaData();
- installBinding.setBean(aspectBinding.getName());
- installBinding.setMethodName("rebind");
- parameters = new ArrayList<ParameterMetaData>();
- parameters.add(new AbstractParameterMetaData(new AbstractDependencyValueMetaData(aspect.getName(), "definition")));
- installBinding.setParameters(parameters);
-
- List<InstallMetaData> installs = getInstalls();
- if (installs == null)
- installs = new ArrayList<InstallMetaData>();
- installs.add(installAspect);
- installs.add(installBinding);
- setInstalls(installs);
-
- AbstractInstallMetaData uninstallAspect = new AbstractInstallMetaData();
- uninstallAspect.setBean(aspect.getName());
- uninstallAspect.setMethodName("uninstall");
-
- List<InstallMetaData> uninstalls = getUninstalls();
- if (uninstalls == null)
- uninstalls = new ArrayList<InstallMetaData>();
- uninstalls.add(uninstallAspect);
- setUninstalls(uninstalls);
-
- }
-
- private void configureNoDependencies(AbstractBeanMetaData aspect, AbstractBeanMetaData aspectBinding)
- {
- aspect.addProperty(new AbstractPropertyMetaData("advice", new AbstractDependencyValueMetaData(name)));
- }
-
-
- private boolean hasInjectedBeans()
- {
- ArrayList<AbstractDependencyValueMetaData> dependencies = new ArrayList<AbstractDependencyValueMetaData>();
- getDependencies(dependencies, this);
-
- for (AbstractDependencyValueMetaData dep : dependencies)
- {
- if(!((String)dep.getValue()).startsWith("jboss.kernel:service="))
- {
- return true;
- }
- }
- return false;
- }
-
- private void getDependencies(ArrayList<AbstractDependencyValueMetaData> dependencies, MetaDataVisitorNode node)
- {
- Iterator children = node.getChildren();
-
- if (children != null)
- {
- while (children.hasNext())
- {
- MetaDataVisitorNode child = (MetaDataVisitorNode)children.next();
- if (child instanceof AbstractDependencyValueMetaData)
- {
- dependencies.add((AbstractDependencyValueMetaData)child);
- }
- getDependencies(dependencies, child);
- }
- }
- }
-
-}
Deleted: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBeanMetaDataUtil.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBeanMetaDataUtil.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBeanMetaDataUtil.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -1,88 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.microcontainer.beans;
-
-
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
-import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
-
-/**
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class AspectBeanMetaDataUtil
-{
- private static final long serialVersionUID = 1L;
-
- /** Unless specified use the bean with this name as the aspect manager */
- protected final static String DEFAULT_ASPECT_MANAGER = "AspectManager";
-
- /** The bean name of the aspect manager to use */
- protected String managerBean = DEFAULT_ASPECT_MANAGER;
-
- /** The property of the aspect manager bean, if any, containing the aspect manager */
- protected String managerProperty;
-
-
- public String getManager()
- {
- return managerBean;
- }
-
- public void setManagerBean(String managerBean)
- {
- this.managerBean = managerBean;
- }
-
- public String getManagerProperty()
- {
- return managerProperty;
- }
-
- public void setManagerProperty(String aspectManagerProperty)
- {
- this.managerProperty = aspectManagerProperty;
- }
-
- protected void setSimpleProperty(AbstractBeanMetaData bean, String propertyName, Object value)
- {
- bean.addProperty(new AbstractPropertyMetaData(propertyName, value));
- }
-
- protected void setDependencyProperty(AbstractBeanMetaData bean, String propertyName, Object dependencyBean)
- {
- setDependencyProperty(bean, propertyName, dependencyBean, null);
- }
-
- protected void setDependencyProperty(AbstractBeanMetaData bean, String propertyName, Object dependencyBean, String dependencyProperty)
- {
- bean.addProperty(new AbstractPropertyMetaData(propertyName, new AbstractDependencyValueMetaData(dependencyBean, dependencyProperty)));
- }
-
- protected void setAspectManagerProperty(AbstractBeanMetaData bean, String propertyName)
- {
- setDependencyProperty(bean, propertyName, managerBean, managerProperty);
- }
-
-}
Modified: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBinding.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBinding.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/AspectBinding.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -21,10 +21,11 @@
*/
package org.jboss.aop.microcontainer.beans;
+import java.util.List;
+
import org.jboss.aop.AspectManager;
import org.jboss.aop.advice.AdviceBinding;
-import org.jboss.aop.advice.AdviceFactory;
-import org.jboss.aop.advice.AspectDefinition;
+import org.jboss.aop.advice.InterceptorFactory;
import org.jboss.logging.Logger;
import org.jboss.util.id.GUID;
@@ -32,6 +33,7 @@
* An AspectBinding.
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
* @version $Revision$
*/
public class AspectBinding
@@ -44,31 +46,10 @@
protected String pointcut;
- protected AspectDefinition aspect;
+ protected List<BindingEntry> advices;
- protected String method = "invoke";
-
+ protected String cflow;
/**
- * Get the aspectDefinition.
- *
- * @return the aspectDefinition.
- */
- public AspectDefinition getAspect()
- {
- return aspect;
- }
-
- /**
- * Set the aspectDefinition.
- *
- * @param aspect The aspectDefinition to set.
- */
- public void setAspect(AspectDefinition aspect)
- {
- this.aspect = aspect;
- }
-
- /**
* Get the manager.
*
* @return the manager.
@@ -88,24 +69,15 @@
this.manager = manager;
}
- /**
- * Get the method.
- *
- * @return the method.
- */
- public String getMethod()
+
+ public String getCflow()
{
- return method;
+ return cflow;
}
- /**
- * Set the method.
- *
- * @param method The method to set.
- */
- public void setMethod(String method)
+ public void setCflow(String cflow)
{
- this.method = method;
+ this.cflow = cflow;
}
/**
@@ -118,6 +90,16 @@
return pointcut;
}
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
/**
* Set the pointcut.
*
@@ -128,16 +110,36 @@
this.pointcut = pointcut;
}
+ public List<BindingEntry> getAdvices()
+ {
+ return advices;
+ }
+
+ public void setAdvices(List<BindingEntry> advices)
+ {
+ this.advices = advices;
+ }
+
public void start() throws Exception
{
if (pointcut == null)
throw new IllegalArgumentException("Null pointcut");
if (manager == null)
throw new IllegalArgumentException("Null manager");
- if (aspect == null)
- throw new IllegalArgumentException("Null aspect definition");
- AdviceBinding binding = new AdviceBinding(name, pointcut, null);
- binding.addInterceptorFactory(new AdviceFactory(aspect, method));
+ AdviceBinding binding = new AdviceBinding(name, pointcut, cflow);
+
+ if (advices != null)
+ {
+ for (BindingEntry entry : advices)
+ {
+ entry.start();
+ InterceptorFactory[] factories = entry.getInterceptorFactories();
+ for (InterceptorFactory ifac : factories)
+ {
+ binding.addInterceptorFactory(ifac);
+ }
+ }
+ }
manager.addBinding(binding);
log.debug("Bound binding " + name);
}
@@ -145,6 +147,13 @@
public void stop() throws Exception
{
manager.removeBinding(name);
+ if (advices != null)
+ {
+ for (BindingEntry entry : advices)
+ {
+ entry.stop();
+ }
+ }
}
public void uninstall() throws Exception
@@ -152,9 +161,8 @@
stop();
}
- public void rebind(AspectDefinition aspect) throws Exception
+ public void rebind() throws Exception
{
- this.aspect = aspect;
stop();
start();
}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/BindingEntry.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/BindingEntry.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/BindingEntry.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,72 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.InterceptorFactory;
+import org.jboss.util.id.GUID;
+
+/**
+ * Abstract base class for things that can go inside bindings (stack refs, advice and interceptor-ref)
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class BindingEntry
+{
+ String name = new GUID().toString();
+ AspectManager manager;
+ AspectBinding aspectBinding;
+
+ public abstract InterceptorFactory[] getInterceptorFactories();
+
+ public abstract void start();
+
+ public abstract void stop();
+
+ public AspectBinding getAspectBinding()
+ {
+ return aspectBinding;
+ }
+
+ public void setAspectBinding(AspectBinding aspectBinding)
+ {
+ this.aspectBinding = aspectBinding;
+ }
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/CFlowStack.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/CFlowStack.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/CFlowStack.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,107 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.pointcut.CFlow;
+
+/**
+ * Bean to install a CFlowStack
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class CFlowStack
+{
+ /**
+ * The AspectManager
+ */
+ private AspectManager manager;
+
+ /**
+ * The name of the resulting CFlowStack
+ */
+ private String name;
+
+ /**
+ * The CFlowStack entries
+ */
+ private List<CFlowStackEntry> entries;
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public List<CFlowStackEntry> getEntries()
+ {
+ return entries;
+ }
+
+ public void setEntries(List<CFlowStackEntry> entries)
+ {
+ this.entries = entries;
+ }
+
+ public void start()
+ {
+ if (name == null || name.length() == 0)
+ {
+ throw new IllegalArgumentException("Null name");
+ }
+ if (entries == null || entries.size() == 0)
+ {
+ throw new IllegalArgumentException("No entries");
+ }
+
+ org.jboss.aop.pointcut.CFlowStack stack = new org.jboss.aop.pointcut.CFlowStack(name);
+ for (CFlowStackEntry entry : entries)
+ {
+ boolean notCalled = !entry.getCalled();
+ stack.addCFlow(new CFlow(entry.getExpr(), notCalled));
+ }
+ manager.addCFlowStack(stack);
+ }
+
+ public void stop()
+ {
+ manager.removeCFlowStack(name);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/CFlowStackEntry.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/CFlowStackEntry.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/CFlowStackEntry.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.aop.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class CFlowStackEntry
+{
+ private boolean called;
+ private String expr;
+
+ public boolean getCalled()
+ {
+ return called;
+ }
+
+ public void setCalled(boolean called)
+ {
+ this.called = called;
+ }
+
+ public String getExpr()
+ {
+ return expr;
+ }
+
+ public void setExpr(String expr)
+ {
+ this.expr = expr;
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/ClassMetaData.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/ClassMetaData.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/ClassMetaData.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,122 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.metadata.ClassMetaDataBinding;
+import org.jboss.aop.metadata.ClassMetaDataLoader;
+import org.jboss.util.id.GUID;
+import org.w3c.dom.Element;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClassMetaData
+{
+ AspectManager manager;
+ String name = GUID.asString();
+
+ //Should we read these from the element instead?
+ String tag;
+ String className;
+
+ Element element;
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getTag()
+ {
+ return tag;
+ }
+
+ public void setTag(String tag)
+ {
+ this.tag = tag;
+ }
+
+ public String getClassName()
+ {
+ return className;
+ }
+
+ public void setClassName(String className)
+ {
+ this.className = className;
+ }
+
+ public Element getElement()
+ {
+ return element;
+ }
+
+ public void setElement(Element element)
+ {
+ this.element = element;
+ }
+
+ public void start()
+ {
+ if (manager == null)
+ throw new IllegalArgumentException("Null manager");
+ if (tag == null)
+ throw new IllegalArgumentException("Null tag");
+ if (className == null)
+ throw new IllegalArgumentException("Null className");
+
+ ClassMetaDataLoader loader = manager.findClassMetaDataLoader(tag);
+ try
+ {
+ ClassMetaDataBinding data = loader.importMetaData(element, name, tag, className);
+ manager.addClassMetaData(data);
+ }
+ catch (Exception e)
+ {
+ // AutoGenerated
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void stop()
+ {
+ manager.removeClassMetaData(name);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/ClassMetaDataLoader.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/ClassMetaDataLoader.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/ClassMetaDataLoader.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,95 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.aop.AspectManager;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClassMetaDataLoader
+{
+ AspectManager manager;
+ String tag;
+ String className;
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getTag()
+ {
+ return tag;
+ }
+
+ public void setTag(String tag)
+ {
+ this.tag = tag;
+ }
+
+ public String getClassName()
+ {
+ return className;
+ }
+
+ public void setClassName(String className)
+ {
+ this.className = className;
+ }
+
+ public void start()
+ {
+ if (manager == null)
+ throw new IllegalArgumentException("Null manager");
+ if (tag == null)
+ throw new IllegalArgumentException("Null tag");
+ if (className == null)
+ throw new IllegalArgumentException("Null className");
+
+ try
+ {
+ //FIXME Probably need to use something else
+ ClassLoader cl = SecurityActions.getContextClassLoader();
+ Class clazz = cl.loadClass(className);
+ org.jboss.aop.metadata.ClassMetaDataLoader loader = (org.jboss.aop.metadata.ClassMetaDataLoader)clazz.newInstance();
+
+ manager.addClassMetaDataLoader(tag, loader);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void stop()
+ {
+ manager.removeClassMetaDataLoader(tag);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/DelegatingBeanAspectFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/DelegatingBeanAspectFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/DelegatingBeanAspectFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,104 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.InstanceAdvisor;
+import org.jboss.aop.advice.AspectFactory;
+import org.jboss.aop.joinpoint.Joinpoint;
+import org.jboss.beans.metadata.plugins.factory.GenericBeanFactory;
+import org.jboss.beans.metadata.spi.factory.BeanFactory;
+import org.jboss.logging.Logger;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DelegatingBeanAspectFactory implements AspectFactory
+{
+ private static final Logger log = Logger.getLogger(GenericBeanAspectFactory.class);
+
+ protected BeanFactory factory;
+
+ protected String name;
+
+ public DelegatingBeanAspectFactory(String name, BeanFactory factory)
+ {
+ this.name = name;
+ this.factory = factory;
+ }
+
+ public void setBeanFactory(GenericBeanFactory factory)
+ {
+ this.factory = factory;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public Object createPerVM()
+ {
+ AspectFactory factory = doCreate();
+ return factory.createPerVM();
+ }
+
+ public Object createPerClass(Advisor advisor)
+ {
+ AspectFactory factory = doCreate();
+ return factory.createPerClass(advisor);
+ }
+
+ public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)
+ {
+ AspectFactory factory = doCreate();
+ return factory.createPerInstance(advisor, instanceAdvisor);
+ }
+
+ public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
+ {
+ AspectFactory factory = doCreate();
+ return factory.createPerJoinpoint(advisor, jp);
+ }
+
+ public Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
+ {
+ AspectFactory factory = doCreate();
+ return factory.createPerJoinpoint(advisor, instanceAdvisor, jp);
+ }
+
+ protected AspectFactory doCreate()
+ {
+ try
+ {
+ log.debug("Creating advice " + name);
+ return (AspectFactory)factory.createBean();
+ }
+ catch (Throwable throwable)
+ {
+ throw new RuntimeException(throwable);
+ }
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/DynamicCFlowDef.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/DynamicCFlowDef.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/DynamicCFlowDef.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,99 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import java.util.LinkedHashMap;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.DynamicCFlowDefinition;
+
+/**
+ * Bean to install a DynamicCFlow
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DynamicCFlowDef
+{
+ /**
+ * The AspectManager
+ */
+ private AspectManager manager;
+
+ /**
+ * The name of the resulting DynamicCFlow
+ */
+ private String name;
+
+ /**
+ * The name of the class implementing the dynamic cflow
+ */
+ private String className;
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getClassName()
+ {
+ return className;
+ }
+
+ public void setClassName(String className)
+ {
+ this.className = className;
+ }
+
+ public void start()
+ {
+ if (name == null || name.length() == 0)
+ throw new IllegalArgumentException("Null name");
+ if (className == null || className.length() == 0)
+ throw new IllegalArgumentException("Null className");
+ if (manager == null)
+ throw new IllegalArgumentException("Null manager");
+
+ DynamicCFlowDefinition dynamic = new DynamicCFlowDefinition(null, className, name);
+ manager.addDynamicCFlow(name, dynamic);
+ }
+
+ public void stop()
+ {
+ manager.removeCFlowStack(name);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/InterceptorEntry.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/InterceptorEntry.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/InterceptorEntry.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,131 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.aop.advice.AdviceFactory;
+import org.jboss.aop.advice.AdviceType;
+import org.jboss.aop.advice.InterceptorFactory;
+import org.jboss.aop.advice.ScopedInterceptorFactory;
+
+/**
+ * An interceptor-ref or advice entry. Installs an InterceptorFactory into its binding and into aop
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorEntry extends BindingEntry implements Cloneable
+{
+ Aspect aspect;
+ String aspectMethod;
+ InterceptorFactory interceptorFactory;
+ boolean forStack;
+ AdviceType type = AdviceType.AROUND;
+
+ public AdviceType getType()
+ {
+ return type;
+ }
+
+ public void setType(AdviceType type)
+ {
+ this.type = type;
+ }
+
+ public Aspect getAspect(Aspect aspect)
+ {
+ return aspect;
+ }
+
+ public void setAspect(Aspect aspect)
+ {
+ this.aspect = aspect;
+ }
+
+ public void setForStack(boolean forStack)
+ {
+ this.forStack = forStack;
+ }
+
+ public String getAspectMethod()
+ {
+ return aspectMethod;
+ }
+
+ public void setAspectMethod(String aspectMethod)
+ {
+ this.aspectMethod = aspectMethod;
+ }
+
+ public InterceptorFactory[] getInterceptorFactories()
+ {
+ return new InterceptorFactory[] {interceptorFactory};
+ }
+
+ public InterceptorFactory getInterceptorFactory()
+ {
+ return interceptorFactory;
+ }
+
+ public void start()
+ {
+ if (manager == null)
+ {
+ throw new IllegalArgumentException("Null manager");
+ }
+ if (aspectBinding == null && !forStack)
+ {
+ throw new IllegalArgumentException("Null aspect binding");
+ }
+ if (aspect == null)
+ {
+ throw new IllegalArgumentException("Null aspect");
+ }
+ interceptorFactory = (aspectMethod == null) ?
+ new ScopedInterceptorFactory(aspect.getDefinition()) : new AdviceFactory(aspect.getDefinition(), aspectMethod);
+
+ manager.addInterceptorFactory(name, interceptorFactory);
+ if (aspectBinding != null)
+ {
+ aspect.addAspectBinding(aspectBinding);
+ }
+ }
+
+ public void stop()
+ {
+ manager.removeInterceptorFactory(name);
+ if (aspectBinding != null)
+ {
+ aspect.removeAspectBinding(aspectBinding);
+ }
+ interceptorFactory = null;
+ }
+
+ public Object clone()
+ {
+ InterceptorEntry entry = new InterceptorEntry();
+ entry.manager = manager;
+ entry.aspectBinding = aspectBinding;
+ entry.aspect = aspect;
+ entry.aspectMethod = aspectMethod;
+ return entry;
+ }
+}
Modified: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/IntroductionBinding.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/IntroductionBinding.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/IntroductionBinding.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -21,10 +21,13 @@
*/
package org.jboss.aop.microcontainer.beans;
+import java.io.StringReader;
import java.util.List;
import org.jboss.aop.AspectManager;
import org.jboss.aop.introduction.InterfaceIntroduction;
+import org.jboss.aop.pointcut.ast.ASTStart;
+import org.jboss.aop.pointcut.ast.TypeExpressionParser;
import org.jboss.util.id.GUID;
/**
@@ -33,16 +36,50 @@
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision$
*/
-public class IntroductionBinding
+public class IntroductionBinding
{
protected AspectManager manager;
-
protected String name = GUID.asString();
-
protected String classes;
-
+ protected String expr;
protected List<String> interfaces;
+ protected List<MixinEntry> mixins;
+ public IntroductionBinding()
+ {
+ super();
+ }
+
+ /**
+ * Get the interfaces.
+ *
+ * @return the interfaces.
+ */
+ public List<String> getInterfaces()
+ {
+ return interfaces;
+ }
+
+ /**
+ * Set the interfaces.
+ *
+ * @param interfaces The interfaces to set.
+ */
+ public void setInterfaces(List<String> interfaces)
+ {
+ this.interfaces = interfaces;
+ }
+
+ public List<MixinEntry> getMixins()
+ {
+ return mixins;
+ }
+
+ public void setMixins(List<MixinEntry> mixins)
+ {
+ this.mixins = mixins;
+ }
+
public String getName()
{
return name;
@@ -73,24 +110,14 @@
this.classes = classes;
}
- /**
- * Get the interfaces.
- *
- * @return the interfaces.
- */
- public List getInterfaces()
+ public String getExpr()
{
- return interfaces;
+ return expr;
}
- /**
- * Set the interfaces.
- *
- * @param interfaces The interfaces to set.
- */
- public void setInterfaces(List<String> interfaces)
+ public void setExpr(String expr)
{
- this.interfaces = interfaces;
+ this.expr = expr;
}
/**
@@ -117,12 +144,39 @@
{
if (manager == null)
throw new IllegalArgumentException("Null manager");
- if (classes == null)
- throw new IllegalArgumentException("Null classes");
- if (interfaces == null)
- throw new IllegalArgumentException("Null interfaces");
- String[] intfs = interfaces.toArray(new String[interfaces.size()]);
- InterfaceIntroduction introduction = new InterfaceIntroduction(name, classes, intfs);
+ if (classes == null && expr == null)
+ throw new IllegalArgumentException("Neither classes nor expr set");
+ if (classes != null && expr != null)
+ throw new IllegalArgumentException("Cannot set both classes and expr");
+ if (interfaces == null && mixins == null)
+ throw new IllegalArgumentException("Neither interfaces nor mixins set");
+
+ String[] intfs = (interfaces != null) ? interfaces.toArray(new String[interfaces.size()]) : null;
+
+ InterfaceIntroduction introduction = null;
+ if (classes != null)
+ {
+ introduction = new InterfaceIntroduction(name, classes, intfs);
+ }
+ else
+ {
+ ASTStart start = new TypeExpressionParser(new StringReader(expr)).Start();
+ introduction = new InterfaceIntroduction(name, start, intfs);
+ }
+
+ if (mixins != null)
+ {
+ for (MixinEntry entry : mixins)
+ {
+ if (entry.getInterfaces() == null)
+ throw new IllegalArgumentException("MixinEntry with null interfaces");
+ if (entry.getMixin() == null)
+ throw new IllegalArgumentException("MixinEntry with null mixin");
+ String[] intfaces = entry.getInterfaces().toArray(new String[entry.getInterfaces().size()]);
+
+ introduction.addMixin(new InterfaceIntroduction.Mixin(entry.getMixin(), intfaces, entry.getConstruction(), entry.isTransient()));
+ }
+ }
manager.addInterfaceIntroduction(introduction);
}
Modified: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/LifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/LifecycleBeanMetaDataFactory.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/LifecycleBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -26,6 +26,7 @@
import java.util.Iterator;
import java.util.List;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.BeanMetaDataUtil;
import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
import org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData;
@@ -50,7 +51,7 @@
private String installMethod;
private String uninstallMethod;
- AspectBeanMetaDataUtil util = new AspectBeanMetaDataUtil();
+ BeanMetaDataUtil util = new BeanMetaDataUtil();
HashSet<PropertyMetaData> properties = new HashSet<PropertyMetaData>();
public void setManagerBean(String managerBean)
Deleted: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/MixinBinding.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/MixinBinding.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/MixinBinding.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -1,87 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.microcontainer.beans;
-
-import org.jboss.aop.introduction.InterfaceIntroduction;
-
-/**
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision$
- */
-public class MixinBinding extends IntroductionBinding
-{
- /** The mixin class name */
- protected String mixin;
-
- /** How to construct the mixin class */
- protected String construction;
-
- /** Should the mixin be transient or not */
- protected boolean trans;
-
- public String getMixin()
- {
- return mixin;
- }
-
- public void setMixin(String mixinClass)
- {
- this.mixin = mixinClass;
- }
-
- public String getConstruction()
- {
- return construction;
- }
-
- public void setConstruction(String construction)
- {
- this.construction = construction;
- }
-
- public boolean isTransient()
- {
- return trans;
- }
-
- public void setTransient(boolean trans)
- {
- this.trans = trans;
- }
-
- public void start() throws Exception
- {
- if (manager == null)
- throw new IllegalArgumentException("Null manager");
- if (classes == null)
- throw new IllegalArgumentException("Null classes");
- if (interfaces == null)
- throw new IllegalArgumentException("Null interfaces");
- if (mixin == null)
- throw new IllegalArgumentException("Null interfaces");
- String[] intfs = interfaces.toArray(new String[interfaces.size()]);
- InterfaceIntroduction introduction = new InterfaceIntroduction(name, classes, null);
- introduction.addMixin(new InterfaceIntroduction.Mixin(mixin, intfs, construction, trans));
- manager.addInterfaceIntroduction(introduction);
- }
-}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/MixinEntry.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/MixinEntry.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/MixinEntry.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,90 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import java.util.List;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MixinEntry
+{
+ /** The interfaces implemented by the mixin */
+ protected List<String> interfaces;
+
+ /** The mixin class name */
+ protected String mixin;
+
+ /** How to construct the mixin class */
+ protected String construction;
+
+ /** Should the mixin be transient or not */
+ protected boolean trans = true;
+
+
+ public String getMixin()
+ {
+ return mixin;
+ }
+
+ public void setMixin(String mixinClass)
+ {
+ this.mixin = mixinClass;
+ }
+
+ public String getConstruction()
+ {
+ return construction;
+ }
+
+ public void setConstruction(String construction)
+ {
+ this.construction = construction;
+ }
+
+ public boolean isTransient()
+ {
+ return trans;
+ }
+
+ public void setTransient(boolean trans)
+ {
+ this.trans = trans;
+ }
+
+ public List<String> getInterfaces()
+ {
+ return interfaces;
+ }
+
+ public void setInterfaces(List<String> interfaces)
+ {
+ this.interfaces = interfaces;
+ }
+
+ public void start()
+ {
+
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/NamedPointcut.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/NamedPointcut.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/NamedPointcut.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,105 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.pointcut.Pointcut;
+import org.jboss.aop.pointcut.PointcutExpression;
+import org.jboss.aop.pointcut.ast.ParseException;
+
+/**
+ * Defines a named pointcut in the underlying aspectmanager
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class NamedPointcut
+{
+ AspectManager manager;
+
+ String name;
+
+ String expr;
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getExpr()
+ {
+ return expr;
+ }
+
+ public void setExpr(String expr)
+ {
+ this.expr = expr;
+ }
+
+ public void start()
+ {
+ if (manager == null)
+ {
+ throw new IllegalArgumentException("Null manager");
+ }
+ if (name == null || name.length() == 0)
+ {
+ throw new IllegalArgumentException("No name");
+ }
+ if (expr == null || expr.length() == 0)
+ {
+ throw new IllegalArgumentException("No expr");
+ }
+
+ Pointcut p = null;
+ try
+ {
+ p = new PointcutExpression(name, expr);
+ manager.addPointcut(p);
+ }
+ catch (ParseException ex)
+ {
+ throw new RuntimeException("<pointcut name='" + name + "' expr='" + expr + "'/> failed", ex);
+ }
+ }
+
+ public void stop()
+ {
+ manager.removePointcut(name);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PrecedenceDef.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PrecedenceDef.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PrecedenceDef.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,94 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.util.id.GUID;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PrecedenceDef
+{
+ private AspectManager manager;
+ private List<PrecedenceDefEntry> entries;
+ private String name = GUID.asString();
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public List<PrecedenceDefEntry> getEntries()
+ {
+ return entries;
+ }
+
+ public void setEntries(List<PrecedenceDefEntry> precedenceEntries)
+ {
+ this.entries = precedenceEntries;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public void start()
+ {
+ if (manager == null)
+ throw new IllegalArgumentException("Null manager");
+ if (entries == null)
+ throw new IllegalArgumentException("Null entries");
+ if (entries.size() == 0)
+ throw new IllegalArgumentException("No entries");
+
+ org.jboss.aop.advice.PrecedenceDefEntry[] pentries = new org.jboss.aop.advice.PrecedenceDefEntry[entries.size()];
+ int i = 0;
+ for (PrecedenceDefEntry entry : entries)
+ {
+ pentries[i++] = new org.jboss.aop.advice.PrecedenceDefEntry(entry.getAspectName(), entry.getAspectMethod());
+ }
+
+ manager.addPrecedence(new org.jboss.aop.advice.PrecedenceDef(name, pentries));
+ }
+
+ public void stop()
+ {
+ manager.removePrecedence(name);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PrecedenceDefEntry.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PrecedenceDefEntry.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PrecedenceDefEntry.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PrecedenceDefEntry
+{
+ private String aspectName;
+ private String aspectMethod;
+
+ public String getAspectName()
+ {
+ return aspectName;
+ }
+
+ public void setAspectName(String aspectName)
+ {
+ this.aspectName = aspectName;
+ }
+
+ public String getAspectMethod()
+ {
+ return aspectMethod;
+ }
+
+ public void setAspectMethod(String aspectMethod)
+ {
+ this.aspectMethod = aspectMethod;
+ }
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Prepare.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Prepare.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Prepare.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,99 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.pointcut.Pointcut;
+import org.jboss.aop.pointcut.PointcutExpression;
+import org.jboss.aop.pointcut.ast.ParseException;
+import org.jboss.util.id.GUID;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Prepare
+{
+ protected AspectManager manager;
+
+ protected String name = GUID.asString();
+
+ protected String expr;
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getExpr()
+ {
+ return expr;
+ }
+
+ public void setExpr(String pointcut)
+ {
+ this.expr = pointcut;
+ }
+
+ public void start()
+ {
+ if (manager == null)
+ {
+ throw new IllegalArgumentException("Null manager");
+ }
+ if (expr == null || expr.length() == 0)
+ {
+ throw new IllegalArgumentException("No pointcut");
+ }
+ Pointcut p = null;
+ try
+ {
+ p = new PointcutExpression(name, expr);
+ }
+ catch (ParseException ex)
+ {
+ throw new RuntimeException("<pointcut name='" + name + "' expr='" + expr + "'/> failed", ex);
+ }
+ manager.addPointcut(p);
+ }
+
+ public void stop()
+ {
+ manager.removePointcut(name);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/SecurityActions.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/SecurityActions.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/SecurityActions.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+class SecurityActions
+{
+ private interface GetContextClassLoaderAction
+ {
+ ClassLoader getContextClassLoader();
+
+ GetContextClassLoaderAction PRIVILEGED = new GetContextClassLoaderAction() {
+
+ public ClassLoader getContextClassLoader()
+ {
+ return null;
+ }
+ };
+
+ GetContextClassLoaderAction NOT_PRIVILEGED = new GetContextClassLoaderAction() {
+
+ public ClassLoader getContextClassLoader()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ };
+ }
+
+ public static ClassLoader getContextClassLoader()
+ {
+ if (System.getSecurityManager() == null)
+ {
+ return GetContextClassLoaderAction.NOT_PRIVILEGED.getContextClassLoader();
+ }
+ else
+ {
+ return GetContextClassLoaderAction.PRIVILEGED.getContextClassLoader();
+ }
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Stack.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Stack.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/Stack.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,86 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.aop.AspectManager;
+
+/**
+ * Defines an interceptor stack
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Stack
+{
+ private AspectManager manager;
+
+ private String name;
+
+ private List<InterceptorEntry> advices;
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public List<InterceptorEntry> getAdvices()
+ {
+ return advices;
+ }
+
+ public void setAdvices(List<InterceptorEntry> advices)
+ {
+ this.advices = advices;
+ }
+
+ public List<InterceptorEntry> getClonedAdvices(AspectBinding binding)
+ {
+ List<InterceptorEntry> entries = new ArrayList<InterceptorEntry>();
+
+ for (InterceptorEntry entry : advices)
+ {
+ InterceptorEntry cloned = (InterceptorEntry)entry.clone();
+ cloned.setAspectBinding(binding);
+ entries.add(cloned);
+ }
+
+ return entries;
+ }
+}
Deleted: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/StackBinding.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/StackBinding.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/StackBinding.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -1,124 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.aop.microcontainer.beans;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.advice.AdviceBinding;
-import org.jboss.aop.advice.AspectDefinition;
-import org.jboss.aop.advice.ScopedInterceptorFactory;
-import org.jboss.util.id.GUID;
-
-public class StackBinding
-{
- protected String name = GUID.asString();
-
- protected AspectManager manager;
-
- protected String pointcut;
-
- protected List advices;
-
- /**
- * Get the manager.
- *
- * @return the manager.
- */
- public AspectManager getManager()
- {
- return manager;
- }
-
- /**
- * Set the manager.
- *
- * @param manager The manager to set.
- */
- public void setManager(AspectManager manager)
- {
- this.manager = manager;
- }
-
- /**
- * Get the pointcut.
- *
- * @return the pointcut.
- */
- public String getPointcut()
- {
- return pointcut;
- }
-
- /**
- * Set the pointcut.
- *
- * @param pointcut The pointcut to set.
- */
- public void setPointcut(String pointcut)
- {
- this.pointcut = pointcut;
- }
-
- /**
- * Get the advices.
- *
- * @return the advices.
- */
- public List getAdvices()
- {
- return advices;
- }
-
- /**
- * Set the advices.
- *
- * @param advices The advices to set.
- */
- public void setAdvices(List advices)
- {
- this.advices = advices;
- }
-
- public void start() throws Exception
- {
- if (pointcut == null)
- throw new IllegalArgumentException("Null pointcut");
- if (manager == null)
- throw new IllegalArgumentException("Null manager");
- if (advices == null || advices.size() == 0)
- throw new IllegalArgumentException("No advices");
- AdviceBinding binding = new AdviceBinding(name, pointcut, null);
- for (Iterator i = advices.iterator(); i.hasNext();)
- {
- AspectDefinition aspect = (AspectDefinition) i.next();
- binding.addInterceptorFactory(new ScopedInterceptorFactory(aspect));
- }
- manager.addBinding(binding);
- }
-
- public void stop() throws Exception
- {
- manager.removeBinding(name);
- }
-}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/StackEntry.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/StackEntry.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/StackEntry.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,91 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import java.util.List;
+
+import org.jboss.aop.advice.InterceptorFactory;
+
+/**
+ * A stack-ref entry.
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackEntry extends BindingEntry
+{
+ Stack stack;
+ List<InterceptorEntry> advices;
+ InterceptorFactory[] factories;
+
+ public Stack getStack()
+ {
+ return stack;
+ }
+
+ public void setStack(Stack stack)
+ {
+ this.stack = stack;
+ }
+
+ public InterceptorFactory[] getInterceptorFactories()
+ {
+ return factories;
+ }
+
+ public void start()
+ {
+ if (manager == null)
+ {
+ throw new IllegalArgumentException("Null manager");
+ }
+ if (aspectBinding == null)
+ {
+ throw new IllegalArgumentException("Null aspect binding");
+ }
+ if (stack == null)
+ {
+ throw new IllegalArgumentException("Null stack");
+ }
+ advices = stack.getClonedAdvices(aspectBinding);
+ if (advices == null)
+ {
+ throw new IllegalArgumentException("Null advices");
+ }
+
+
+ factories = new InterceptorFactory[advices.size()];
+ int i = 0;
+ for (InterceptorEntry entry : advices)
+ {
+ entry.start();
+ factories[i++] = entry.getInterceptorFactory();
+ }
+ }
+
+ public void stop()
+ {
+ advices = null;
+ factories = null;
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/TypeDef.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/TypeDef.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/TypeDef.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,107 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.pointcut.Typedef;
+import org.jboss.aop.pointcut.TypedefExpression;
+import org.jboss.aop.pointcut.ast.ParseException;
+
+/**
+ * Installs a typedef into the underlying aspect manager
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TypeDef
+{
+ private AspectManager manager;
+
+ private String name;
+
+ private String expr;
+
+ public AspectManager getManager()
+ {
+ return manager;
+ }
+
+ public void setManager(AspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getExpr()
+ {
+ return expr;
+ }
+
+ public void setExpr(String expr)
+ {
+ this.expr = expr;
+ }
+
+ public void start()
+ {
+ if (manager == null)
+ {
+ throw new IllegalArgumentException("No manager");
+ }
+ if (name == null || name.length() == 0)
+ {
+ throw new IllegalArgumentException("No name");
+ }
+ if (expr == null || expr.length() == 0)
+ {
+ throw new IllegalArgumentException("No expr");
+ }
+
+ try
+ {
+ Typedef typedef = new TypedefExpression(name, expr);
+ manager.addTypedef(typedef);
+ }
+ catch(ParseException e)
+ {
+ throw new IllegalArgumentException("");
+ }
+ catch(Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void stop()
+ {
+ manager.removeTypedef(name);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AdviceData.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AdviceData.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AdviceData.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,62 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.aop.advice.AdviceType;
+import org.jboss.aop.microcontainer.beans.InterceptorEntry;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AdviceData extends BaseInterceptorData
+{
+ AdviceType type = AdviceType.AROUND;
+ String adviceMethod;
+
+ public String getAdviceMethod()
+ {
+ return adviceMethod;
+ }
+
+ public void setAdviceMethod(String method)
+ {
+ this.adviceMethod = method;
+ }
+
+ public AdviceType getType()
+ {
+ return type;
+ }
+
+ public void setType(AdviceType type)
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String getBeanClassName()
+ {
+ return InterceptorEntry.class.getName();
+ }
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AspectBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AspectBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AspectBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,229 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.aop.microcontainer.beans.Aspect;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractInstallMetaData;
+import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
+import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
+import org.jboss.beans.metadata.plugins.ThisValueMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.beans.metadata.spi.InstallMetaData;
+import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
+import org.jboss.beans.metadata.spi.ParameterMetaData;
+
+/**
+ * AspectBeanMetaDataFactory.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 61194 $
+ */
+public class AspectBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
+ implements BeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ private String scope = "PER_VM";
+
+ private String factory;
+
+ public void setScope(String scope)
+ {
+ this.scope = scope;
+ }
+
+ public void setFactory(String clazz)
+ {
+ this.factory = clazz;
+ if (getBeanClass() != null)
+ {
+ throw new RuntimeException("Cannot set both factory and clazz");
+ }
+ //Meeded to satisfy validation in BeanFactoryHandler.endElement()
+ super.setBeanClass(clazz);
+ }
+
+ @Override
+ public void setBeanClass(String bean)
+ {
+ if (factory != null)
+ {
+ throw new RuntimeException("Cannot set both factory and clazz");
+ }
+ super.setBeanClass(bean);
+ }
+
+ @Override
+ public List<BeanMetaData> getBeans()
+ {
+ ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+
+ if (this.name == null)
+ {
+ this.name = super.getBeanClass();
+ }
+
+ String aspectName = this.name;
+ //Add the bean factory
+ this.name = "Factory$" + name;
+ result.add(this);
+ //TODO dependencies and properties for aspect/interceptor
+
+ //Add the Aspect
+ AbstractBeanMetaData aspect = new AbstractBeanMetaData();
+ aspect.setName(aspectName);
+ aspect.setBean(Aspect.class.getName());
+ util.setSimpleProperty(aspect, "scope", scope);
+ util.setAspectManagerProperty(aspect, "manager");
+ if (factory != null)
+ {
+ util.setSimpleProperty(aspect, "factory", Boolean.TRUE);
+ }
+ result.add(aspect);
+
+// String aspectBindingName = name + "$AspectBinding";
+// AbstractBeanMetaData aspectBinding = new AbstractBeanMetaData();
+// aspectBinding.setName(aspectBindingName);
+// aspectBinding.setBean(AspectBinding.class.getName());
+// util.setSimpleProperty(aspectBinding, "pointcut", pointcut);
+// util.setDependencyProperty(aspectBinding, "aspect", aspectName, "definition");
+// util.setAspectManagerProperty(aspectBinding, "manager");
+// if (adviceMethod != null)
+// {
+// util.setSimpleProperty(aspectBinding, "method", adviceMethod);
+// }
+// result.add(aspectBinding);
+//
+// if (hasInjectedBeans())
+// {
+// configureWithDependencies(aspect, aspectBinding);
+// }
+// else
+// {
+// configureNoDependencies(aspect, aspectBinding);
+// }
+
+
+ if (hasInjectedBeans())
+ {
+ configureWithDependencies(aspect);
+ }
+ else
+ {
+ configureNoDependencies(aspect);
+ }
+
+ return result;
+ }
+
+ private void configureWithDependencies(AbstractBeanMetaData aspect)
+ {
+ aspect.addProperty(new AbstractPropertyMetaData("adviceBean", name));
+
+ AbstractInstallMetaData installAspect = new AbstractInstallMetaData();
+ installAspect.setBean(aspect.getName());
+ installAspect.setMethodName("install");
+ ArrayList<ParameterMetaData> parameters = new ArrayList<ParameterMetaData>();
+ parameters.add(new AbstractParameterMetaData(new ThisValueMetaData()));
+ installAspect.setParameters(parameters);
+
+/* <beanfactory name="Factory$org.jboss.test.microcontainer.beans2.TestAspectWithDependency" class="org.jboss.test.microcontainer.beans2.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency"/></property>
+ <!-- Need to be able to configure with attributes and stuff -->
+ <install bean="org.jboss.test.microcontainer.beans2.TestAspectWithDependency" method="install">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="org.jboss.test.microcontainer.beans2.TestAspectWithDependency" method="uninstall"/>
+ </beanfactory>
+*/
+
+// AbstractInstallMetaData installBinding = new AbstractInstallMetaData();
+// installBinding.setBean(aspectBinding.getName());
+// installBinding.setMethodName("rebind");
+// parameters = new ArrayList<ParameterMetaData>();
+// parameters.add(new AbstractParameterMetaData(new AbstractDependencyValueMetaData(aspect.getName(), "definition")));
+// installBinding.setParameters(parameters);
+
+ List<InstallMetaData> installs = getInstalls();
+ if (installs == null)
+ installs = new ArrayList<InstallMetaData>();
+ installs.add(installAspect);
+ setInstalls(installs);
+
+ AbstractInstallMetaData uninstallAspect = new AbstractInstallMetaData();
+ uninstallAspect.setBean(aspect.getName());
+ uninstallAspect.setMethodName("uninstall");
+
+ List<InstallMetaData> uninstalls = getUninstalls();
+ if (uninstalls == null)
+ uninstalls = new ArrayList<InstallMetaData>();
+ uninstalls.add(uninstallAspect);
+ setUninstalls(uninstalls);
+
+ }
+
+ private void configureNoDependencies(AbstractBeanMetaData aspect/*, AbstractBeanMetaData aspectBinding*/)
+ {
+ aspect.addProperty(new AbstractPropertyMetaData("advice", new AbstractDependencyValueMetaData(name)));
+ }
+
+
+ private boolean hasInjectedBeans()
+ {
+ ArrayList<AbstractDependencyValueMetaData> dependencies = new ArrayList<AbstractDependencyValueMetaData>();
+ getDependencies(dependencies, this);
+
+ for (AbstractDependencyValueMetaData dep : dependencies)
+ {
+ if(!((String)dep.getValue()).startsWith("jboss.kernel:service="))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private void getDependencies(ArrayList<AbstractDependencyValueMetaData> dependencies, MetaDataVisitorNode node)
+ {
+ Iterator children = node.getChildren();
+
+ if (children != null)
+ {
+ while (children.hasNext())
+ {
+ MetaDataVisitorNode child = (MetaDataVisitorNode)children.next();
+ if (child instanceof AbstractDependencyValueMetaData)
+ {
+ dependencies.add((AbstractDependencyValueMetaData)child);
+ }
+ getDependencies(dependencies, child);
+ }
+ }
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AspectManagerAwareBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AspectManagerAwareBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/AspectManagerAwareBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData;
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectManagerAwareBeanMetaDataFactory extends GenericBeanFactoryMetaData
+{
+ private static final long serialVersionUID = 1L;
+
+ protected BeanMetaDataUtil util = new BeanMetaDataUtil();
+
+ public void setManagerBean(String managerBean)
+ {
+ util.setManagerBean(managerBean);
+ }
+
+ public void setManagerProperty(String aspectManagerProperty)
+ {
+ util.setManagerProperty(aspectManagerProperty);
+ }
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BaseInterceptorData.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BaseInterceptorData.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BaseInterceptorData.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class BaseInterceptorData
+{
+
+ String refName;
+
+ public BaseInterceptorData()
+ {
+ super();
+ }
+
+ public String getRefName()
+ {
+ return refName;
+ }
+
+ public void setRefName(String name)
+ {
+ this.refName = name;
+ }
+
+ public abstract String getBeanClassName();
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BeanMetaDataUtil.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BeanMetaDataUtil.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BeanMetaDataUtil.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,172 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class BeanMetaDataUtil
+{
+ private static final long serialVersionUID = 1L;
+
+ /** Unless specified use the bean with this name as the aspect manager */
+ protected final static String DEFAULT_ASPECT_MANAGER = "AspectManager";
+
+ /** The bean name of the aspect manager to use */
+ protected String managerBean = DEFAULT_ASPECT_MANAGER;
+
+ /** The property of the aspect manager bean, if any, containing the aspect manager */
+ protected String managerProperty;
+
+
+ public String getManager()
+ {
+ return managerBean;
+ }
+
+ public void setManagerBean(String managerBean)
+ {
+ this.managerBean = managerBean;
+ }
+
+ public String getManagerProperty()
+ {
+ return managerProperty;
+ }
+
+ public void setManagerProperty(String aspectManagerProperty)
+ {
+ this.managerProperty = aspectManagerProperty;
+ }
+
+ public static void setSimpleProperty(AbstractBeanMetaData bean, String propertyName, Object value)
+ {
+ bean.addProperty(new AbstractPropertyMetaData(propertyName, value));
+ }
+
+ public static void setSimpleProperty(AbstractBeanMetaData bean, String propertyName, ValueMetaData value)
+ {
+ bean.addProperty(new AbstractPropertyMetaData(propertyName, value));
+ }
+
+// public static void setDependencyProperty(AbstractBeanMetaData bean, String propertyName, Object dependencyBean)
+// {
+// setDependencyProperty(bean, propertyName, dependencyBean, null, null);
+// }
+
+// public static void setDependencyProperty(AbstractBeanMetaData bean, String propertyName, Object dependencyBean, String state)
+// {
+// setDependencyProperty(bean, propertyName, dependencyBean, propertyName, state);
+// }
+
+// public static void setDependencyProperty(AbstractBeanMetaData bean, String propertyName, Object dependencyBean, String dependencyProperty, String state)
+// {
+// }
+
+
+ public static void setDependencyProperty(DependencyBuilder builder)
+ {
+ AbstractDependencyValueMetaData advmd = new AbstractDependencyValueMetaData(builder.getDependencyBean(), builder.getDependencyProperty());
+ if (builder.getState() != null)
+ {
+ advmd.setDependentState(new ControllerState(builder.getState()));
+ }
+ builder.getBean().addProperty(new AbstractPropertyMetaData(builder.getPropertyName(), advmd));
+ }
+
+ public void setAspectManagerProperty(AbstractBeanMetaData bean, String propertyName)
+ {
+ DependencyBuilder builder = new DependencyBuilder(bean, propertyName, managerBean).setDependencyProperty(managerProperty);
+ setDependencyProperty(builder);
+ }
+
+ public static class DependencyBuilder
+ {
+ AbstractBeanMetaData bean;
+ String propertyName;
+ String dependencyBean;
+ String dependencyProperty;
+ String state;
+
+ public DependencyBuilder(AbstractBeanMetaData bean, String propertyName, String dependencyBean)
+ {
+ if (bean == null)
+ throw new IllegalArgumentException("Null bean");
+ if (propertyName == null)
+ throw new IllegalArgumentException("Null property name");
+ if (dependencyBean == null)
+ throw new IllegalArgumentException("Null dependency bean");
+ this.bean = bean;
+ this.propertyName = propertyName;
+ this.dependencyBean = dependencyBean;
+ }
+
+ DependencyBuilder setDependencyProperty(String dependencyProperty)
+ {
+ this.dependencyProperty = dependencyProperty;
+ return this;
+ }
+
+ DependencyBuilder setState(String state)
+ {
+ this.state = state;
+ return this;
+ }
+
+ public AbstractBeanMetaData getBean()
+ {
+ return bean;
+ }
+
+ public String getPropertyName()
+ {
+ return propertyName;
+ }
+
+ public String getDependencyBean()
+ {
+ return dependencyBean;
+ }
+
+ public String getDependencyProperty()
+ {
+ return dependencyProperty;
+ }
+
+ public String getState()
+ {
+ return state;
+ }
+
+
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BindBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BindBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/BindBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,127 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.aop.microcontainer.beans.AspectBinding;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractListMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.util.id.GUID;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class BindBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+ private String pointcut;
+ private String cflow;
+ private List<BaseInterceptorData> interceptors = new ArrayList<BaseInterceptorData>();
+
+ public BindBeanMetaDataFactory()
+ {
+ //Meeded to satisfy validation in BeanFactoryHandler.endElement()
+ setBeanClass("IGNORED");
+ }
+
+ public void setPointcut(String pointcut)
+ {
+ this.pointcut = pointcut;
+ }
+
+ public void setCflow(String cflow)
+ {
+ this.cflow = cflow;
+ }
+
+ @Override
+ public List<BeanMetaData> getBeans()
+ {
+ ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+
+ //Create AspectBinding
+ AbstractBeanMetaData binding = new AbstractBeanMetaData();
+ if (name == null)
+ {
+ name = GUID.asString();
+ }
+ binding.setName(name);
+ BeanMetaDataUtil.setSimpleProperty(binding, "name", name);
+ binding.setBean(AspectBinding.class.getName());
+
+ BeanMetaDataUtil.setSimpleProperty(binding, "pointcut", pointcut);
+
+ if (cflow != null)
+ {
+ BeanMetaDataUtil.setSimpleProperty(binding, "cflow", cflow);
+ }
+ util.setAspectManagerProperty(binding, "manager");
+ result.add(binding);
+
+ if (interceptors.size() > 0)
+ {
+ AbstractListMetaData almd = new AbstractListMetaData();
+ int i = 0;
+ for (BaseInterceptorData interceptor : interceptors)
+ {
+ AbstractBeanMetaData bmd = new AbstractBeanMetaData(interceptor.getBeanClassName());
+ String intName = name + "$" + i++;
+ bmd.setName(intName);
+ util.setAspectManagerProperty(bmd, "manager");
+ BeanMetaDataUtil.DependencyBuilder builder = new BeanMetaDataUtil.DependencyBuilder(bmd, "aspectBinding", name).setState("Instantiated");
+ BeanMetaDataUtil.setDependencyProperty(builder);
+
+ if (interceptor instanceof AdviceData)
+ {
+ BeanMetaDataUtil.DependencyBuilder db = new BeanMetaDataUtil.DependencyBuilder(bmd, "aspect", interceptor.getRefName());
+ BeanMetaDataUtil.setDependencyProperty(db);
+ if (((AdviceData)interceptor).getAdviceMethod() != null)
+ {
+ BeanMetaDataUtil.setSimpleProperty(bmd, "aspectMethod", ((AdviceData)interceptor).getAdviceMethod());
+ }
+ BeanMetaDataUtil.setSimpleProperty(bmd, "type", ((AdviceData)interceptor).getType());
+ }
+ else
+ {
+ BeanMetaDataUtil.DependencyBuilder db = new BeanMetaDataUtil.DependencyBuilder(bmd, "stack", interceptor.getRefName());
+ BeanMetaDataUtil.setDependencyProperty(db);
+ }
+ result.add(bmd);
+ almd.add(new AbstractInjectionValueMetaData(intName));
+ BeanMetaDataUtil.setSimpleProperty(binding, "advices", almd);
+ }
+ }
+
+ return result;
+ }
+
+ public void addInterceptor(BaseInterceptorData interceptorData)
+ {
+ interceptors.add(interceptorData);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/CFlowStackBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/CFlowStackBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/CFlowStackBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.aop.microcontainer.beans.CFlowStack;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractListMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.beans.metadata.spi.PropertyMetaData;
+
+/**
+ * AspectBeanMetaDataFactory.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 61194 $
+ */
+public class CFlowStackBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
+ implements BeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+ private ArrayList<AbstractBeanMetaData> entries = new ArrayList<AbstractBeanMetaData>();
+
+ public CFlowStackBeanMetaDataFactory()
+ {
+ setBeanClass("IGNORED");
+ }
+
+ @Override
+ public List<BeanMetaData> getBeans()
+ {
+ ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+
+ //Add the Aspect
+ AbstractBeanMetaData cflowStack = new AbstractBeanMetaData(CFlowStack.class.getName());
+ cflowStack.setName(getName());
+ util.setSimpleProperty(cflowStack, "name", getName());
+ util.setAspectManagerProperty(cflowStack, "manager");
+ result.add(cflowStack);
+
+ AbstractListMetaData lmd = new AbstractListMetaData();
+ lmd.setType(ArrayList.class.getName());
+ BeanMetaDataUtil.setSimpleProperty(cflowStack, "entries", lmd);
+ int i = 0;
+ for (AbstractBeanMetaData entry : entries)
+ {
+ String entryName = cflowStack.getName() + "$" + i++;
+ entry.setName(entryName);
+ lmd.add(new AbstractInjectionValueMetaData(entryName));
+ result.add(entry);
+ }
+
+ return result;
+ }
+
+ public void addEntry(AbstractBeanMetaData entry)
+ {
+ entries.add(entry);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/ConfigureLifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/ConfigureLifecycleBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/ConfigureLifecycleBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConfigureLifecycleBeanMetaDataFactory extends LifecycleBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected ControllerState getState()
+ {
+ return ControllerState.CONFIGURED;
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/CreateLifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/CreateLifecycleBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/CreateLifecycleBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class CreateLifecycleBeanMetaDataFactory extends LifecycleBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected ControllerState getState()
+ {
+ return ControllerState.CREATE;
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/DescribeLifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/DescribeLifecycleBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/DescribeLifecycleBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DescribeLifecycleBeanMetaDataFactory extends LifecycleBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected ControllerState getState()
+ {
+ return ControllerState.DESCRIBED;
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/InstallLifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/InstallLifecycleBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/InstallLifecycleBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InstallLifecycleBeanMetaDataFactory extends LifecycleBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected ControllerState getState()
+ {
+ return ControllerState.INSTALLED;
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/InstantiateLifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/InstantiateLifecycleBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/InstantiateLifecycleBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InstantiateLifecycleBeanMetaDataFactory extends LifecycleBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected ControllerState getState()
+ {
+ return ControllerState.INSTANTIATED;
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/IntroductionBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/IntroductionBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/IntroductionBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,162 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.jboss.aop.microcontainer.beans.IntroductionBinding;
+import org.jboss.aop.microcontainer.beans.PrecedenceDefEntry;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractListMetaData;
+import org.jboss.beans.metadata.plugins.StringValueMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.util.id.GUID;
+
+/**
+ * AspectBeanMetaDataFactory.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 61194 $
+ */
+public class IntroductionBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
+ implements BeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ private String clazz;
+ private String expr;
+ private String interfaces;
+ private ArrayList<AbstractBeanMetaData> mixins = new ArrayList<AbstractBeanMetaData>();
+
+ public IntroductionBeanMetaDataFactory()
+ {
+ setBeanClass("IGNORED");
+ }
+
+ public String getClazz()
+ {
+ return clazz;
+ }
+
+ public void setClazz(String clazz)
+ {
+ this.clazz = clazz;
+ }
+
+ public String getExpr()
+ {
+ return expr;
+ }
+
+ public void setExpr(String expr)
+ {
+ this.expr = expr;
+ }
+
+
+ public String getInterfaces()
+ {
+ return interfaces;
+ }
+
+ public void setInterfaces(String interfaces)
+ {
+ this.interfaces = interfaces;
+ }
+
+ public void addMixinEntry(AbstractBeanMetaData mixin)
+ {
+ mixins.add(mixin);
+ }
+
+ @Override
+ public List<BeanMetaData> getBeans()
+ {
+ ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+
+ //Add the Aspect
+ AbstractBeanMetaData introduction = new AbstractBeanMetaData(IntroductionBinding.class.getName());
+ String name = getName();
+ if (name == null)
+ {
+ name = GUID.asString();
+ }
+ introduction.setName(name);
+ util.setAspectManagerProperty(introduction, "manager");
+ if (clazz != null)
+ {
+ BeanMetaDataUtil.setSimpleProperty(introduction, "classes", clazz);
+ }
+ if (expr != null)
+ {
+ BeanMetaDataUtil.setSimpleProperty(introduction, "expr", expr);
+ }
+
+ result.add(introduction);
+
+ if (interfaces != null)
+ {
+ addInterfaces(introduction, "interfaces", interfaces);
+ }
+ if (mixins != null)
+ {
+ addMixins(introduction, result);
+ }
+
+ return result;
+ }
+
+ public static void addInterfaces(AbstractBeanMetaData introduction, String propertyName, String interfaces)
+ {
+ AbstractListMetaData lmd = new AbstractListMetaData();
+ lmd.setType(ArrayList.class.getName());
+ lmd.setElementType(String.class.getName());
+ BeanMetaDataUtil.setSimpleProperty(introduction, propertyName, lmd);
+
+ StringTokenizer tok = new StringTokenizer(interfaces, ",");
+ while (tok.hasMoreTokens())
+ {
+ String token = tok.nextToken();
+ lmd.add(new StringValueMetaData(token.trim()));
+ }
+ }
+
+ private void addMixins(AbstractBeanMetaData introduction, List<BeanMetaData> result)
+ {
+ AbstractListMetaData lmd = new AbstractListMetaData();
+ lmd.setType(ArrayList.class.getName());
+ BeanMetaDataUtil.setSimpleProperty(introduction, "mixins", lmd);
+ int i = 0;
+ for (AbstractBeanMetaData mixin : mixins)
+ {
+ String name = introduction.getName() + "$" + i++;
+ mixin.setName(name);
+ result.add(mixin);
+
+ lmd.add(new AbstractInjectionValueMetaData(name));
+ }
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/LifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/LifecycleBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/LifecycleBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,163 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.aop.microcontainer.beans.LifecycleBinding;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
+import org.jboss.beans.metadata.plugins.factory.GenericBeanFactoryMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
+import org.jboss.beans.metadata.spi.PropertyMetaData;
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class LifecycleBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
+implements BeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ private String classes;
+ private String expr;
+ private String installMethod;
+ private String uninstallMethod;
+
+ HashSet<PropertyMetaData> properties = new HashSet<PropertyMetaData>();
+
+ public void setClasses(String classes)
+ {
+ this.classes = classes;
+ }
+
+ public void setExpr(String classes)
+ {
+ this.expr = classes;
+ }
+
+ public void setInstallMethod(String installMethod)
+ {
+ this.installMethod = installMethod;
+ }
+
+ public void setUninstallMethod(String uninstallMethod)
+ {
+ this.uninstallMethod = uninstallMethod;
+ }
+
+ protected abstract ControllerState getState();
+
+ public List<BeanMetaData> getBeans()
+ {
+ ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+
+ //Do not include the bean factory here, just install the bean directly and the binding
+ AbstractBeanMetaData lifecycle = new AbstractBeanMetaData();
+ lifecycle.setName(name);
+ lifecycle.setBean(getBeanClass());
+ for (PropertyMetaData pmd : properties)
+ {
+ lifecycle.addProperty(pmd);
+ }
+ lifecycle.setDepends(getDepends());
+ result.add(lifecycle);
+
+
+ String aspectBindingName = name + "$AspectBinding";
+ AbstractBeanMetaData aspectBinding = new AbstractBeanMetaData();
+ aspectBinding.setName(aspectBindingName);
+ aspectBinding.setBean(LifecycleBinding.class.getName());
+
+ util.setSimpleProperty(aspectBinding, "callbackBean", name);
+ util.setAspectManagerProperty(aspectBinding, "manager");
+ if (expr != null)
+ {
+ util.setSimpleProperty(aspectBinding, "expr", expr);
+ }
+ else if (classes != null)
+ {
+ util.setSimpleProperty(aspectBinding, "classes", classes);
+ }
+ util.setSimpleProperty(aspectBinding, "state", getState());
+ if (installMethod != null)
+ {
+ util.setSimpleProperty(aspectBinding, "installMethod", installMethod);
+ }
+ if (uninstallMethod != null)
+ {
+ util.setSimpleProperty(aspectBinding, "uninstallMethod", uninstallMethod);
+ }
+ result.add(aspectBinding);
+
+ return result;
+ }
+
+
+ protected boolean hasInjectedBeans()
+ {
+ ArrayList<AbstractDependencyValueMetaData> dependencies = new ArrayList<AbstractDependencyValueMetaData>();
+ getDependencies(dependencies, this);
+
+ for (AbstractDependencyValueMetaData dep : dependencies)
+ {
+ if(!((String)dep.getValue()).startsWith("jboss.kernel:service="))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private void getDependencies(ArrayList<AbstractDependencyValueMetaData> dependencies, MetaDataVisitorNode node)
+ {
+ Iterator children = node.getChildren();
+
+ if (children != null)
+ {
+ while (children.hasNext())
+ {
+ MetaDataVisitorNode child = (MetaDataVisitorNode)children.next();
+ if (child instanceof AbstractDependencyValueMetaData)
+ {
+ dependencies.add((AbstractDependencyValueMetaData)child);
+ }
+ getDependencies(dependencies, child);
+ }
+ }
+ }
+
+ @Override
+ public void addBeanProperty(PropertyMetaData property)
+ {
+ properties.add(property);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/PreInstallLifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/PreInstallLifecycleBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/PreInstallLifecycleBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ * PreInstall lifecycle callback.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class PreInstallLifecycleBeanMetaDataFactory extends LifecycleBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected ControllerState getState()
+ {
+ return ControllerState.PRE_INSTALL;
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/PrecedenceBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/PrecedenceBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/PrecedenceBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,94 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.aop.microcontainer.beans.PrecedenceDef;
+import org.jboss.aop.microcontainer.beans.PrecedenceDefEntry;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractListMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.util.id.GUID;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PrecedenceBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+ private ArrayList<BaseInterceptorData> entries = new ArrayList<BaseInterceptorData>();
+
+ public PrecedenceBeanMetaDataFactory()
+ {
+ setBeanClass("IGNORED");
+ }
+
+
+ @Override
+ public List<BeanMetaData> getBeans()
+ {
+ ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+
+ //Add the PrecedenceDef
+ AbstractBeanMetaData precedence = new AbstractBeanMetaData(PrecedenceDef.class.getName());
+ String name = getName();
+ if (name == null)
+ {
+ name = GUID.asString();
+ }
+ precedence.setName(name);
+ BeanMetaDataUtil.setSimpleProperty(precedence, "name", getName());
+ util.setAspectManagerProperty(precedence, "manager");
+ result.add(precedence);
+
+ AbstractListMetaData lmd = new AbstractListMetaData();
+ lmd.setType(ArrayList.class.getName());
+ BeanMetaDataUtil.setSimpleProperty(precedence, "entries", lmd);
+ int i = 0;
+ for (BaseInterceptorData entry : entries)
+ {
+ String entryName = name + "$" + i++;
+ AbstractBeanMetaData entryBean = new AbstractBeanMetaData(PrecedenceDefEntry.class.getName());
+ entryBean.setName(entryName);
+ BeanMetaDataUtil.setSimpleProperty(entryBean, "aspectName", entry.getRefName());
+ if (entry instanceof AdviceData)
+ {
+ BeanMetaDataUtil.setSimpleProperty(entryBean, "aspectMethod", ((AdviceData)entry).getAdviceMethod());
+ }
+ lmd.add(new AbstractInjectionValueMetaData(entryName));
+ result.add(entryBean);
+ }
+
+ return result;
+ }
+
+ public void addEntry(BaseInterceptorData interceptor)
+ {
+ entries.add(interceptor);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StackBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StackBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StackBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,105 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.aop.microcontainer.beans.Stack;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractListMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+ private List<BaseInterceptorData> interceptors = new ArrayList<BaseInterceptorData>();
+
+ public StackBeanMetaDataFactory()
+ {
+ //Meeded to satisfy validation in BeanFactoryHandler.endElement()
+ setBeanClass("IGNORED");
+ }
+
+ @Override
+ public List<BeanMetaData> getBeans()
+ {
+ ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+
+ //Create AspectBinding
+ AbstractBeanMetaData stack = new AbstractBeanMetaData();
+ stack.setName(name);
+ BeanMetaDataUtil.setSimpleProperty(stack, "name", name);
+ stack.setBean(Stack.class.getName());
+
+ util.setAspectManagerProperty(stack, "manager");
+ result.add(stack);
+
+ if (interceptors.size() > 0)
+ {
+ AbstractListMetaData almd = new AbstractListMetaData();
+ int i = 0;
+ for (BaseInterceptorData interceptor : interceptors)
+ {
+ AbstractBeanMetaData bmd = new AbstractBeanMetaData(interceptor.getBeanClassName());
+ String intName = name + "$" + i++;
+ bmd.setName(intName);
+ util.setAspectManagerProperty(bmd, "manager");
+ BeanMetaDataUtil.setSimpleProperty(bmd, "forStack", Boolean.TRUE);
+
+ if (interceptor instanceof AdviceData)
+ {
+ BeanMetaDataUtil.DependencyBuilder db = new BeanMetaDataUtil.DependencyBuilder(bmd, "aspect", interceptor.getRefName());
+ BeanMetaDataUtil.setDependencyProperty(db);
+ if (((AdviceData)interceptor).getAdviceMethod() != null)
+ {
+ BeanMetaDataUtil.setSimpleProperty(bmd, "aspectMethod", ((AdviceData)interceptor).getAdviceMethod());
+ }
+ BeanMetaDataUtil.setSimpleProperty(bmd, "type", ((AdviceData)interceptor).getType());
+
+ }
+ else
+ {
+ BeanMetaDataUtil.DependencyBuilder db = new BeanMetaDataUtil.DependencyBuilder(bmd, "stack", interceptor.getRefName());
+ BeanMetaDataUtil.setDependencyProperty(db);
+ }
+ result.add(bmd);
+ almd.add(new AbstractInjectionValueMetaData(intName));
+ BeanMetaDataUtil.setSimpleProperty(stack, "advices", almd);
+ }
+ }
+
+ return result;
+ }
+
+ public void addInterceptor(BaseInterceptorData interceptorData)
+ {
+ interceptors.add(interceptorData);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StackRefData.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StackRefData.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StackRefData.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.aop.microcontainer.beans.StackEntry;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackRefData extends BaseInterceptorData
+{
+ @Override
+ public String getBeanClassName()
+ {
+ return StackEntry.class.getName();
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StartLifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StartLifecycleBeanMetaDataFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/beanmetadatafactory/StartLifecycleBeanMetaDataFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans.beanmetadatafactory;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StartLifecycleBeanMetaDataFactory extends LifecycleBeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected ControllerState getState()
+ {
+ return ControllerState.START;
+ }
+}
Modified: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/xml/AOPBeansSchemaInitializer.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/xml/AOPBeansSchemaInitializer.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/xml/AOPBeansSchemaInitializer.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -24,18 +24,42 @@
import javax.xml.namespace.NamespaceContext;
import javax.xml.namespace.QName;
-import org.jboss.aop.microcontainer.beans.AspectBeanMetaDataFactory;
-import org.jboss.aop.microcontainer.beans.ConfigureLifecycleBeanMetaDataFactory;
-import org.jboss.aop.microcontainer.beans.CreateLifecycleBeanMetaDataFactory;
-import org.jboss.aop.microcontainer.beans.DescribeLifecycleBeanMetaDataFactory;
-import org.jboss.aop.microcontainer.beans.InstallLifecycleBeanMetaDataFactory;
-import org.jboss.aop.microcontainer.beans.InstantiateLifecycleBeanMetaDataFactory;
-import org.jboss.aop.microcontainer.beans.LifecycleBeanMetaDataFactory;
-import org.jboss.aop.microcontainer.beans.StartLifecycleBeanMetaDataFactory;
-import org.jboss.aop.microcontainer.beans.PreInstallLifecycleBeanMetaDataFactory;
+import org.jboss.aop.advice.AdviceType;
+import org.jboss.aop.microcontainer.beans.AnnotationIntroduction;
+import org.jboss.aop.microcontainer.beans.AnnotationOverride;
+import org.jboss.aop.microcontainer.beans.CFlowStackEntry;
+import org.jboss.aop.microcontainer.beans.DynamicCFlowDef;
+import org.jboss.aop.microcontainer.beans.MixinEntry;
+import org.jboss.aop.microcontainer.beans.NamedPointcut;
+import org.jboss.aop.microcontainer.beans.Prepare;
+import org.jboss.aop.microcontainer.beans.TypeDef;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.AdviceData;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.AspectBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.BeanMetaDataUtil;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.AspectManagerAwareBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.BaseInterceptorData;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.BindBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.CFlowStackBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.ConfigureLifecycleBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.CreateLifecycleBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.DescribeLifecycleBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.InstallLifecycleBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.InstantiateLifecycleBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.IntroductionBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.LifecycleBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.PreInstallLifecycleBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.PrecedenceBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.StackBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.StackRefData;
+import org.jboss.aop.microcontainer.beans.beanmetadatafactory.StartLifecycleBeanMetaDataFactory;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
import org.jboss.kernel.plugins.deployment.xml.BeanFactoryHandler;
import org.jboss.kernel.plugins.deployment.xml.BeanSchemaBinding20;
import org.jboss.kernel.plugins.deployment.xml.BeanSchemaBindingHelper;
+import org.jboss.util.id.GUID;
+import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingInitializer;
@@ -50,12 +74,98 @@
*/
public class AOPBeansSchemaInitializer implements SchemaBindingInitializer
{
+ private final static String MANAGER_BEAN_NAME = "manager-bean";
+ private final static String MANAGER_PROPERTY_NAME = "manager-property";
+
/** The namespace */
private static final String AOP_BEANS_NS = "urn:jboss:aop-beans:1.0";
- /** The aspect binding */
- private static final QName aspectTypeQName = new QName(AOP_BEANS_NS, "aspectType");
+ /** The aspect or interceptor binding */
+ private static final QName aspectOrInterceptorTypeQName = new QName(AOP_BEANS_NS, "aspectOrInterceptorType");
+
+ /** The aspect or interceptor binding */
+ private static final QName bindTypeQName = new QName(AOP_BEANS_NS, "bindType");
+ private static final QName stackTypeQName = new QName(AOP_BEANS_NS, "stackType");
+
+ private static final QName stackRefQName = new QName(AOP_BEANS_NS, "stack-ref");
+
+ private static final QName stackRefTypeQName = new QName(AOP_BEANS_NS, "stackRefType");
+
+ private static final QName interceptorRefQName = new QName(AOP_BEANS_NS, "interceptor-ref");
+
+ private static final QName interceptorRefTypeQName = new QName(AOP_BEANS_NS, "interceptorRefType");
+
+ private static final QName adviceQName = new QName(AOP_BEANS_NS, "advice");
+
+ private static final QName adviceTypeQName = new QName(AOP_BEANS_NS, "adviceType");
+
+ private static final QName aroundQName = new QName(AOP_BEANS_NS, "around");
+
+ private static final QName beforeQName = new QName(AOP_BEANS_NS, "before");
+
+ private static final QName beforeTypeQName = new QName(AOP_BEANS_NS, "beforeType");
+
+ private static final QName afterQName = new QName(AOP_BEANS_NS, "after");
+
+ private static final QName afterTypeQName = new QName(AOP_BEANS_NS, "afterType");
+
+ private static final QName throwingQName = new QName(AOP_BEANS_NS, "throwing");
+
+ private static final QName throwingTypeQName = new QName(AOP_BEANS_NS, "throwingType");
+
+ private static final QName finallyQName = new QName(AOP_BEANS_NS, "finally");
+
+ private static final QName finallyTypeQName = new QName(AOP_BEANS_NS, "finallyType");
+
+ private static final QName typedefTypeQName = new QName(AOP_BEANS_NS, "typedefType");
+
+ private static final QName cflowStackTypeQName = new QName(AOP_BEANS_NS, "cflowStackType");
+
+ private static final QName cflowStackEntryTypeQName = new QName(AOP_BEANS_NS, "cflowStackEntryType");
+
+ private static final QName calledQName = new QName(AOP_BEANS_NS, "called");
+
+ private static final QName notCalledQName = new QName(AOP_BEANS_NS, "not-called");
+
+ private static final QName dynamicCflowStackTypeQName = new QName(AOP_BEANS_NS, "dynamicCflowStackType");
+
+ private static final QName pointcutTypeQName = new QName(AOP_BEANS_NS, "pointcutType");
+
+ private static final QName prepareTypeQName = new QName(AOP_BEANS_NS, "prepareType");
+
+ private static final QName annotationTypeQName = new QName(AOP_BEANS_NS, "annotationType");
+
+ private static final QName annotationIntroductionTypeQName = new QName(AOP_BEANS_NS, "annotationIntroductionType");
+
+ private static final QName precedenceTypeQName = new QName(AOP_BEANS_NS, "precedenceType");
+
+ private static final QName introductionTypeQName = new QName(AOP_BEANS_NS, "introductionType");
+
+ private static final QName interfacesQName = new QName(AOP_BEANS_NS, "interfaces");
+
+ private static final QName interfacesTypeQName = new QName(AOP_BEANS_NS, "interfacesType");
+
+ private static final QName mixinQName = new QName(AOP_BEANS_NS, "mixin");
+
+ private static final QName mixinTypeQName = new QName(AOP_BEANS_NS, "mixinType");
+
+ private static final QName classQName = new QName(AOP_BEANS_NS, "class");
+
+ private static final QName classTypeQName = new QName(AOP_BEANS_NS, "classType");
+
+ private static final QName transientQName = new QName(AOP_BEANS_NS, "transient");
+
+ private static final QName transientTypeQName = new QName(AOP_BEANS_NS, "transientType");
+
+ private static final QName constructionQName = new QName(AOP_BEANS_NS, "construction");
+
+ private static final QName constructionTypeQName = new QName(AOP_BEANS_NS, "constructionType");
+
+// private static final QName propertyQName = new QName(AOP_BEANS_NS, "property");
+//
+// private static final QName attributeQName = new QName(AOP_BEANS_NS, "attribute");
+
/** The lifecycle configure aspect binding */
private static final QName lifecycleTypeQName = new QName(AOP_BEANS_NS, "lifecycleType");
@@ -65,65 +175,303 @@
// ignore XB property replacement
schema.setReplacePropertyRefs(false);
- // aspect binding
- TypeBinding aspectType = schema.getType(aspectTypeQName);
- BeanSchemaBindingHelper.initBeanFactoryHandlers(aspectType);
- aspectType.setHandler(new AspectBeanFactoryHandler());
+ initTopLevelBindings(schema);
+ initChildBindings(schema);
+
+
- //Configure binding
- TypeBinding lifecycleConfigureTypeQ = schema.getType(lifecycleTypeQName);
- BeanSchemaBindingHelper.initBeanFactoryHandlers(lifecycleConfigureTypeQ);
- lifecycleConfigureTypeQ.setHandler(new LifecycleBeanFactoryHandler());
-
// TODO FIXME???
BeanSchemaBinding20.initArtifacts(schema);
return schema;
}
- private static class AspectBeanFactoryHandler extends BeanFactoryHandler
+ private void initTopLevelBindings(SchemaBinding schema)
{
- public Object startElement(Object parent, QName name, ElementBinding element)
- {
- return new AspectBeanMetaDataFactory();
- }
+ initAspectOrInterceptorType(schema); // aspect and interceptor binding
+ initBindType(schema); // bind binding
+ initStackType(schema);
+ initTypedefType(schema);
+ initCFlowStackType(schema);
+ initDynamicCFlowStackType(schema);
+ initPrepareType(schema);
+ initPointcutType(schema);
+ initAnnotationIntroductionType(schema);
+ initAnnotationType(schema);
+ initPrecedenceType(schema);
+ initIntroductionType(schema);
+ initLifecycleType(schema);
+ }
+ private void initChildBindings(SchemaBinding schema)
+ {
+ //Children of bind
+ initInterceptorRefType(schema); // interceptor-ref binding
+ initStackRefType(schema); //stack-ref binding
+ initAdviceType(schema); //advice binding
+ initBeforeType(schema);
+ initAfterType(schema);
+ initThrowingType(schema);
+ initFinallyType(schema);
+ initCFlowStackEntryType(schema); //called/not-called within a cflow-stack
+ initInterfacesType(schema);
+ initMixinType(schema);
+ initClassType(schema);
+ initTransientType(schema);
+ initConstructionType(schema);
+ }
+
+ private void initAspectOrInterceptorType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(aspectOrInterceptorTypeQName);
+ BeanSchemaBindingHelper.initBeanFactoryHandlers(type);
+ type.setHandler(new AspectBeanFactoryHandler());
+
+// type.pushInterceptor(propertyQName, BeanFactoryPropertyInterceptor.INTERCEPTOR);
+// type.pushInterceptor(attributeQName, BeanFactoryPropertyInterceptor.INTERCEPTOR);
+ }
+
+ private void initBindType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(bindTypeQName);
+ type.pushInterceptor(stackRefQName, BindContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(interceptorRefQName, BindContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(adviceQName, BindContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(aroundQName, BindContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(beforeQName, BindContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(afterQName, BindContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(throwingQName, BindContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(finallyQName, BindContentInterceptor.INTERCEPTOR);
+ type.setHandler(new BindBeanFactoryHandler());
+ }
+
+ private void initStackType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(stackTypeQName);
+ type.pushInterceptor(stackRefQName, StackContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(interceptorRefQName, StackContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(adviceQName, StackContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(aroundQName, StackContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(beforeQName, StackContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(afterQName, StackContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(throwingQName, StackContentInterceptor.INTERCEPTOR);
+ type.pushInterceptor(finallyQName, StackContentInterceptor.INTERCEPTOR);
+ type.setHandler(new StackBeanFactoryHandler());
+ }
+
+ private void initTypedefType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(typedefTypeQName);
+ type.setHandler(new TypeDefHandler());
+ }
+
+ private void initCFlowStackType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(cflowStackTypeQName);
+ type.pushInterceptor(calledQName, CFlowStackCalledInterceptor.INTERCEPTOR);
+ type.pushInterceptor(notCalledQName, CFlowStackNotCalledInterceptor.INTERCEPTOR);
+ type.setHandler(CFlowStackHandler.HANDLER);
+ }
+
+ private void initDynamicCFlowStackType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(dynamicCflowStackTypeQName);
+ type.setHandler(DynamicCFlowHandler.HANDLER);
+ }
+
+ private void initPointcutType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(pointcutTypeQName);
+ type.setHandler(PointcutHandler.HANDLER);
+ }
+
+ private void initPrepareType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(prepareTypeQName);
+ type.setHandler(PrepareHandler.HANDLER);
+ }
+
+ private void initAnnotationIntroductionType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(annotationIntroductionTypeQName);
+ type.setHandler(AnnotationIntroductionHandler.HANDLER);
+ type.setSimpleType(AnnotationCharactersHandler.HANDLER);
+ }
+
+ private void initAnnotationType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(annotationTypeQName);
+ type.setHandler(AnnotationOverrideHandler.HANDLER);
+ type.setSimpleType(AnnotationCharactersHandler.HANDLER);
+ }
+
+ private void initPrecedenceType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(precedenceTypeQName);
+ type.setHandler(PrecedenceHandler.HANDLER);
+ type.pushInterceptor(adviceQName, PrecedenceInterceptor.INTERCEPTOR);
+ type.pushInterceptor(interceptorRefQName, PrecedenceInterceptor.INTERCEPTOR);
+ }
+
+ private void initIntroductionType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(introductionTypeQName);
+ type.pushInterceptor(interfacesQName, IntroductionInterfacesInterceptor.INTERCEPTOR);
+ type.pushInterceptor(mixinQName, IntroductionMixinInterceptor.INTERCEPTOR);
+ type.setHandler(IntroductionHandler.HANDLER);
+ }
+
+ private void initLifecycleType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(lifecycleTypeQName);
+ BeanSchemaBindingHelper.initBeanFactoryHandlers(type);
+ type.setHandler(new LifecycleBeanFactoryHandler());
+ }
+
+ private void initInterceptorRefType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(interceptorRefTypeQName);
+ type.setHandler(InterceptorRefHandler.HANDLER);
+ }
+
+ private void initStackRefType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(stackRefTypeQName);
+ type.setHandler(StackRefHandler.HANDLER);
+ }
+
+ private void initAdviceType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(adviceTypeQName);
+ type.setHandler(AdviceHandler.HANDLER);
+ }
+
+ private void initBeforeType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(beforeTypeQName);
+ type.setHandler(BeforeHandler.HANDLER);
+ }
+
+ private void initAfterType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(afterTypeQName);
+ type.setHandler(AfterHandler.HANDLER);
+ }
+
+ private void initThrowingType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(throwingTypeQName);
+ type.setHandler(ThrowingHandler.HANDLER);
+ }
+
+ private void initFinallyType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(finallyTypeQName);
+ type.setHandler(FinallyHandler.HANDLER);
+ }
+
+ private void initCFlowStackEntryType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(cflowStackEntryTypeQName);
+ type.setHandler(CFlowStackEntryHandler.HANDLER);
+ }
+
+ private void initInterfacesType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(interfacesTypeQName);
+ type.setSimpleType(StringBufferCharacterHandler.HANDLER);
+ type.setHandler(InterfacesHandler.HANDLER);
+ }
+
+ private void initMixinType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(mixinTypeQName);
+ type.pushInterceptor(classQName, MixinClassInterceptor.INTERCEPTOR);
+ type.pushInterceptor(transientQName, MixinTransientInterceptor.INTERCEPTOR);
+ type.pushInterceptor(interfacesQName, MixinInterfacesInterceptor.INTERCEPTOR);
+ type.pushInterceptor(constructionQName, MixinConstructionInterceptor.INTERCEPTOR);
+ type.setHandler(MixinHandler.HANDLER);
+ }
+
+ private void initClassType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(classTypeQName);
+ type.setHandler(StringBufferHandler.HANDLER);
+ type.setSimpleType(StringBufferCharacterHandler.HANDLER);
+ }
+
+ private void initTransientType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(transientTypeQName);
+ type.setHandler(StringBufferHandler.HANDLER);
+ type.setSimpleType(StringBufferCharacterHandler.HANDLER);
+ }
+
+ private void initConstructionType(SchemaBinding schema)
+ {
+ TypeBinding type = schema.getType(constructionTypeQName);
+ type.setHandler(StringBufferHandler.HANDLER);
+ type.setSimpleType(StringBufferCharacterHandler.HANDLER);
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////////////////
+ //BeanFactoryHandlers
+ private static class AspectManagerAwareBeanFactoryHandler extends BeanFactoryHandler
+ {
+ @Override
public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
{
super.attributes(o, elementName, element, attrs, nsCtx);
- AspectBeanMetaDataFactory factory = (AspectBeanMetaDataFactory) o;
+ AspectManagerAwareBeanMetaDataFactory factory = (AspectManagerAwareBeanMetaDataFactory) o;
for (int i = 0; i < attrs.getLength(); ++i)
{
String localName = attrs.getLocalName(i);
- setAttribute(factory, localName, attrs.getValue(i));
+ if (MANAGER_BEAN_NAME.equals(localName))
+ {
+ factory.setManagerBean(attrs.getValue(i));
+ }
+ else if (MANAGER_PROPERTY_NAME.equals(localName))
+ {
+ factory.setManagerProperty(attrs.getValue(i));
+ }
}
}
+ }
+
+ private static class AspectBeanFactoryHandler extends AspectManagerAwareBeanFactoryHandler
+ {
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AspectBeanMetaDataFactory();
+ }
- protected void setAttribute(AspectBeanMetaDataFactory factory, String localName, String attr)
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
{
-
- if ("pointcut".equals(localName))
+ super.attributes(o, elementName, element, attrs, nsCtx);
+
+ AspectBeanMetaDataFactory factory = (AspectBeanMetaDataFactory) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
{
- factory.setPointcut(attr);
+ String localName = attrs.getLocalName(i);
+ if ("scope".equals(localName))
+ {
+ factory.setScope(attrs.getValue(i));
+ }
+ else if ("factory".equals(localName))
+ {
+ factory.setFactory(attrs.getValue(i));
+ }
}
- else if ("manager-bean".equals(localName))
- {
- factory.setManagerBean(attr);
- }
- else if ("manager-property".equals(localName))
- {
- factory.setManagerProperty(attr);
- }
- else if ("method".equals(localName))
- {
- factory.setAdviceMethod(attr);
- }
}
}
- private static class LifecycleBeanFactoryHandler extends BeanFactoryHandler
+ private static class LifecycleBeanFactoryHandler extends AspectManagerAwareBeanFactoryHandler
{
+ @Override
public Object startElement(Object parent, QName name, ElementBinding element)
{
String localname = name.getLocalPart();
@@ -159,46 +507,702 @@
throw new IllegalStateException(name + " is not a recognized element");
}
+ @Override
public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
{
- //TODO see TODO in setAttribute()
super.attributes(o, elementName, element, attrs, nsCtx);
LifecycleBeanMetaDataFactory factory = (LifecycleBeanMetaDataFactory) o;
for (int i = 0; i < attrs.getLength(); ++i)
{
String localName = attrs.getLocalName(i);
- setAttribute(factory, localName, attrs.getValue(i));
+ if ("classes".equals(localName))
+ {
+ factory.setClasses(attrs.getValue(i));
+ }
+ else if ("expr".equals(localName))
+ {
+ factory.setExpr(attrs.getValue(i));
+ }
+ else if ("install".equals(localName))
+ {
+ factory.setInstallMethod(attrs.getValue(i));
+ }
+ else if ("uninstall".equals(localName))
+ {
+ factory.setUninstallMethod(attrs.getValue(i));
+ }
}
}
+ }
- protected void setAttribute(LifecycleBeanMetaDataFactory factory, String localName, String attr)
+ private static class BindBeanFactoryHandler extends AspectManagerAwareBeanFactoryHandler
+ {
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
{
- if ("classes".equals(localName))
+ return new BindBeanMetaDataFactory();
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ super.attributes(o, elementName, element, attrs, nsCtx);
+
+ BindBeanMetaDataFactory factory = (BindBeanMetaDataFactory) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
{
- factory.setClasses(attr);
+ String localName = attrs.getLocalName(i);
+ if ("pointcut".equals(localName))
+ {
+ factory.setPointcut(attrs.getValue(i));
+ }
+ else if ("cflow".equals(localName))
+ {
+ factory.setCflow(attrs.getValue(i));
+ }
}
- else if ("expr".equals(localName))
+ }
+
+ @Override
+ public Object endElement(Object o, QName name, ElementBinding element)
+ {
+ return super.endElement(o, name, element);
+ }
+ }
+
+ private static class StackBeanFactoryHandler extends AspectManagerAwareBeanFactoryHandler
+ {
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new StackBeanMetaDataFactory();
+ }
+ }
+
+ private static class CFlowStackHandler extends AspectManagerAwareBeanFactoryHandler
+ {
+ public static final CFlowStackHandler HANDLER = new CFlowStackHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new CFlowStackBeanMetaDataFactory();
+ }
+ }
+
+ private static class PrecedenceHandler extends AspectManagerAwareBeanFactoryHandler
+ {
+ public static final PrecedenceHandler HANDLER = new PrecedenceHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new PrecedenceBeanMetaDataFactory();
+ }
+ }
+
+ private static class IntroductionHandler extends AspectManagerAwareBeanFactoryHandler
+ {
+ public static final IntroductionHandler HANDLER = new IntroductionHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new IntroductionBeanMetaDataFactory();
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ super.attributes(o, elementName, element, attrs, nsCtx);
+
+ IntroductionBeanMetaDataFactory factory = (IntroductionBeanMetaDataFactory) o;
+ for (int i = 0; i < attrs.getLength(); ++i)
{
- factory.setExpr(attr);
- return;
- }
- else if ("manager-bean".equals(localName))
+ String localName = attrs.getLocalName(i);
+ if ("expr".equals(localName))
+ {
+ factory.setExpr(attrs.getValue(i));
+ }
+ else if ("class".equals(localName))
+ {
+ factory.setClazz(attrs.getValue(i));
+ }
+ }
+ }
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////////////////
+ //DefaultElementHandlers
+
+ private static class InterceptorRefHandler extends DefaultElementHandler
+ {
+ public static final InterceptorRefHandler HANDLER = new InterceptorRefHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AdviceData();
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ BaseInterceptorData interceptorRef = (BaseInterceptorData)o;
+ for (int i = 0; i < attrs.getLength(); ++i)
{
- factory.setManagerBean(attr);
+ String localName = attrs.getLocalName(i);
+ if ("name".equals(localName))
+ {
+ interceptorRef.setRefName(attrs.getValue(i));
+ }
}
- else if ("manager-property".equals(localName))
+ }
+ }
+
+ private static class StackRefHandler extends DefaultElementHandler
+ {
+ public static final StackRefHandler HANDLER = new StackRefHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new StackRefData();
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ BaseInterceptorData interceptorRef = (BaseInterceptorData)o;
+ for (int i = 0; i < attrs.getLength(); ++i)
{
- factory.setManagerProperty(attr);
+ String localName = attrs.getLocalName(i);
+ if ("name".equals(localName))
+ {
+ interceptorRef.setRefName(attrs.getValue(i));
+ }
}
- else if ("install".equals(localName))
+ }
+ }
+
+ private static class AdviceHandler extends DefaultElementHandler
+ {
+ public static final AdviceHandler HANDLER = new AdviceHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AdviceData();
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ super.attributes(o, elementName, element, attrs, nsCtx);
+ AdviceData advice = (AdviceData)o;
+ for (int i = 0; i < attrs.getLength(); ++i)
{
- factory.setInstallMethod(attr);
+ String localName = attrs.getLocalName(i);
+ if ("aspect".equals(localName))
+ {
+ advice.setRefName(attrs.getValue(i));
+ }
+ else if ("name".equals(localName))
+ {
+ advice.setAdviceMethod(attrs.getValue(i));
+ }
}
- else if ("uninstall".equals(localName))
+ }
+ }
+
+ private static class BeforeHandler extends AdviceHandler
+ {
+ public static final BeforeHandler HANDLER = new BeforeHandler();
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ super.attributes(o, elementName, element, attrs, nsCtx);
+ AdviceData advice = (AdviceData)o;
+ advice.setType(AdviceType.BEFORE);
+ }
+ }
+
+ private static class AfterHandler extends AdviceHandler
+ {
+ public static final AfterHandler HANDLER = new AfterHandler();
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ super.attributes(o, elementName, element, attrs, nsCtx);
+ AdviceData advice = (AdviceData)o;
+ advice.setType(AdviceType.AFTER);
+ }
+ }
+
+ private static class ThrowingHandler extends AdviceHandler
+ {
+ public static final ThrowingHandler HANDLER = new ThrowingHandler();
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ super.attributes(o, elementName, element, attrs, nsCtx);
+ AdviceData advice = (AdviceData)o;
+ advice.setType(AdviceType.THROWING);
+ }
+ }
+
+ private static class FinallyHandler extends AdviceHandler
+ {
+ public static final FinallyHandler HANDLER = new FinallyHandler();
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ super.attributes(o, elementName, element, attrs, nsCtx);
+ AdviceData advice = (AdviceData)o;
+ advice.setType(AdviceType.FINALLY);
+ }
+ }
+
+ private static class TypeDefHandler extends DefaultElementHandler
+ {
+ public static final TypeDefHandler HANDLER = new TypeDefHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractBeanMetaData(TypeDef.class.getName());
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ BeanMetaDataUtil util = new BeanMetaDataUtil();
+ AbstractBeanMetaData typedef = (AbstractBeanMetaData)o;
+
+ for (int i = 0; i < attrs.getLength(); ++i)
{
- factory.setUninstallMethod(attr);
+ String localName = attrs.getLocalName(i);
+ if ("name".equals(localName))
+ {
+ typedef.setName(attrs.getValue(i));
+ BeanMetaDataUtil.setSimpleProperty(typedef, "name", attrs.getValue(i));
+ }
+ else if ("expr".equals(localName))
+ {
+ BeanMetaDataUtil.setSimpleProperty(typedef, "expr", attrs.getValue(i));
+ }
+ else if (MANAGER_BEAN_NAME.equals(localName))
+ {
+ util.setManagerBean(attrs.getValue(i));
+ }
+ else if (MANAGER_PROPERTY_NAME.equals(localName))
+ {
+ util.setManagerProperty(attrs.getValue(i));
+ }
}
+ util.setAspectManagerProperty(typedef, "manager");
}
}
+
+ private static class CFlowStackEntryHandler extends DefaultElementHandler
+ {
+ public static final CFlowStackEntryHandler HANDLER = new CFlowStackEntryHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractBeanMetaData(CFlowStackEntry.class.getName());
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ AbstractBeanMetaData entry = (AbstractBeanMetaData)o;
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("expr".equals(localName))
+ {
+ BeanMetaDataUtil.setSimpleProperty(entry, "expr", attrs.getValue(i));
+ }
+ }
+ }
+ }
+
+ private static class DynamicCFlowHandler extends DefaultElementHandler
+ {
+ public static final DynamicCFlowHandler HANDLER = new DynamicCFlowHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractBeanMetaData(DynamicCFlowDef.class.getName());
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ BeanMetaDataUtil util = new BeanMetaDataUtil();
+ AbstractBeanMetaData dynamicCFlow = (AbstractBeanMetaData)o;
+
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("name".equals(localName))
+ {
+ dynamicCFlow.setName(attrs.getValue(i));
+ BeanMetaDataUtil.setSimpleProperty(dynamicCFlow, "name", attrs.getValue(i));
+ }
+ else if ("class".equals(localName))
+ {
+ BeanMetaDataUtil.setSimpleProperty(dynamicCFlow, "className", attrs.getValue(i));
+ }
+ else if (MANAGER_BEAN_NAME.equals(localName))
+ {
+ util.setManagerBean(attrs.getValue(i));
+ }
+ else if (MANAGER_PROPERTY_NAME.equals(localName))
+ {
+ util.setManagerProperty(attrs.getValue(i));
+ }
+ }
+ util.setAspectManagerProperty(dynamicCFlow, "manager");
+ }
+ }
+
+ private static class PrepareHandler extends DefaultElementHandler
+ {
+ public static final PrepareHandler HANDLER = new PrepareHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractBeanMetaData(Prepare.class.getName());
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ BeanMetaDataUtil util = new BeanMetaDataUtil();
+ AbstractBeanMetaData pointcut = (AbstractBeanMetaData)o;
+
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("name".equals(localName))
+ {
+ pointcut.setName(attrs.getValue(i));
+ BeanMetaDataUtil.setSimpleProperty(pointcut, "name", attrs.getValue(i));
+ }
+ else if ("expr".equals(localName))
+ {
+ BeanMetaDataUtil.setSimpleProperty(pointcut, "expr", attrs.getValue(i));
+ }
+ else if (MANAGER_BEAN_NAME.equals(localName))
+ {
+ util.setManagerBean(attrs.getValue(i));
+ }
+ else if (MANAGER_PROPERTY_NAME.equals(localName))
+ {
+ util.setManagerProperty(attrs.getValue(i));
+ }
+ }
+ util.setAspectManagerProperty(pointcut, "manager");
+ }
+ }
+
+ private static class PointcutHandler extends PrepareHandler
+ {
+ public static final PointcutHandler HANDLER = new PointcutHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractBeanMetaData(NamedPointcut.class.getName());
+ }
+ }
+
+ private static class AnnotationIntroductionHandler extends DefaultElementHandler
+ {
+ public static final AnnotationIntroductionHandler HANDLER = new AnnotationIntroductionHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractBeanMetaData(AnnotationIntroduction.class.getName());
+ }
+
+ @Override
+ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+ {
+ BeanMetaDataUtil util = new BeanMetaDataUtil();
+ AbstractBeanMetaData annotation = (AbstractBeanMetaData)o;
+
+ for (int i = 0; i < attrs.getLength(); ++i)
+ {
+ String localName = attrs.getLocalName(i);
+ if ("invisible".equals(localName))
+ {
+ BeanMetaDataUtil.setSimpleProperty(annotation, "invisible", attrs.getValue(i));
+ }
+ else if ("expr".equals(localName))
+ {
+ BeanMetaDataUtil.setSimpleProperty(annotation, "expr", attrs.getValue(i));
+ }
+ else if (MANAGER_BEAN_NAME.equals(localName))
+ {
+ util.setManagerBean(attrs.getValue(i));
+ }
+ else if (MANAGER_PROPERTY_NAME.equals(localName))
+ {
+ util.setManagerProperty(attrs.getValue(i));
+ }
+ }
+ util.setAspectManagerProperty(annotation, "manager");
+ annotation.setName(GUID.asString());
+ }
+
+ @Override
+ public Object endElement(Object o, QName name, ElementBinding element)
+ {
+ return super.endElement(o, name, element);
+ }
+
+
+ }
+
+ private static class AnnotationOverrideHandler extends AnnotationIntroductionHandler
+ {
+ public static final AnnotationOverrideHandler HANDLER = new AnnotationOverrideHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractBeanMetaData(AnnotationOverride.class.getName());
+ }
+
+ }
+
+ private static class InterfacesHandler extends DefaultElementHandler
+ {
+ public static final InterfacesHandler HANDLER = new InterfacesHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new StringBuffer();
+ }
+ }
+
+ private static class MixinHandler extends DefaultElementHandler
+ {
+ public static final MixinHandler HANDLER = new MixinHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new AbstractBeanMetaData(MixinEntry.class.getName());
+ }
+ }
+
+ private static class StringBufferHandler extends DefaultElementHandler
+ {
+ public static final StringBufferHandler HANDLER = new StringBufferHandler();
+
+ @Override
+ public Object startElement(Object parent, QName name, ElementBinding element)
+ {
+ return new StringBuffer();
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////////////
+ //Interceptors
+
+ private static class BindContentInterceptor extends DefaultElementInterceptor
+ {
+ public static final BindContentInterceptor INTERCEPTOR = new BindContentInterceptor();
+
+ @Override
+ public void add (Object parent, Object child, QName name)
+ {
+ BindBeanMetaDataFactory factory = (BindBeanMetaDataFactory) parent;
+ BaseInterceptorData interceptorData = (BaseInterceptorData)child;
+ factory.addInterceptor(interceptorData);
+ }
+ }
+
+ private static class StackContentInterceptor extends DefaultElementInterceptor
+ {
+ public static final StackContentInterceptor INTERCEPTOR = new StackContentInterceptor();
+
+ @Override
+ public void add (Object parent, Object child, QName name)
+ {
+ StackBeanMetaDataFactory factory = (StackBeanMetaDataFactory) parent;
+ BaseInterceptorData interceptorData = (BaseInterceptorData)child;
+ factory.addInterceptor(interceptorData);
+ }
+ }
+
+ private static class CFlowStackInterceptor extends DefaultElementInterceptor
+ {
+ public void addEntry(Object parent, Object child, QName name, boolean called)
+ {
+ CFlowStackBeanMetaDataFactory cflowStack = (CFlowStackBeanMetaDataFactory)parent;
+ AbstractBeanMetaData entry = (AbstractBeanMetaData)child;
+ BeanMetaDataUtil.setSimpleProperty(entry, "called", called);
+ cflowStack.addEntry(entry);
+ }
+ }
+
+ private static class CFlowStackNotCalledInterceptor extends CFlowStackInterceptor
+ {
+ public static final CFlowStackNotCalledInterceptor INTERCEPTOR = new CFlowStackNotCalledInterceptor();
+
+ @Override
+ public void add (Object parent, Object child, QName name)
+ {
+ super.addEntry(parent, child, name, false);
+ }
+ }
+
+ private static class CFlowStackCalledInterceptor extends CFlowStackInterceptor
+ {
+ public static final CFlowStackCalledInterceptor INTERCEPTOR = new CFlowStackCalledInterceptor();
+
+ @Override
+ public void add (Object parent, Object child, QName name)
+ {
+ super.addEntry(parent, child, name, true);
+ }
+ }
+
+ private static class PrecedenceInterceptor extends DefaultElementInterceptor
+ {
+ public static final PrecedenceInterceptor INTERCEPTOR = new PrecedenceInterceptor();
+
+ @Override
+ public void add(Object parent, Object child, QName name)
+ {
+ PrecedenceBeanMetaDataFactory precedence = (PrecedenceBeanMetaDataFactory)parent;
+ BaseInterceptorData interceptorData = (BaseInterceptorData)child;
+ precedence.addEntry(interceptorData);
+ }
+ }
+
+ private static class IntroductionInterfacesInterceptor extends DefaultElementInterceptor
+ {
+ public static final IntroductionInterfacesInterceptor INTERCEPTOR = new IntroductionInterfacesInterceptor();
+
+ @Override
+ public void add(Object parent, Object child, QName name)
+ {
+ IntroductionBeanMetaDataFactory intro = (IntroductionBeanMetaDataFactory)parent;
+ intro.setInterfaces(((StringBuffer)child).toString());
+ }
+ }
+
+ private static class IntroductionMixinInterceptor extends DefaultElementInterceptor
+ {
+ public static final IntroductionMixinInterceptor INTERCEPTOR = new IntroductionMixinInterceptor();
+
+ @Override
+ public void add(Object parent, Object child, QName name)
+ {
+ IntroductionBeanMetaDataFactory intro = (IntroductionBeanMetaDataFactory)parent;
+ intro.addMixinEntry((AbstractBeanMetaData)child);
+ }
+ }
+
+ private static class MixinClassInterceptor extends DefaultElementInterceptor
+ {
+ public static final MixinClassInterceptor INTERCEPTOR = new MixinClassInterceptor();
+
+ @Override
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData mixin = (AbstractBeanMetaData)parent;
+ BeanMetaDataUtil.setSimpleProperty(mixin, "mixin", ((StringBuffer)child).toString());
+ }
+ }
+
+ private static class MixinTransientInterceptor extends DefaultElementInterceptor
+ {
+ public static final MixinTransientInterceptor INTERCEPTOR = new MixinTransientInterceptor();
+
+ @Override
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData mixin = (AbstractBeanMetaData)parent;
+ BeanMetaDataUtil.setSimpleProperty(mixin, "transient", ((StringBuffer)child).toString());
+ }
+ }
+
+ private static class MixinConstructionInterceptor extends DefaultElementInterceptor
+ {
+ public static final MixinConstructionInterceptor INTERCEPTOR = new MixinConstructionInterceptor();
+
+ @Override
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData mixin = (AbstractBeanMetaData)parent;
+ BeanMetaDataUtil.setSimpleProperty(mixin, "construction", ((StringBuffer)child).toString());
+ }
+ }
+
+ private static class MixinInterfacesInterceptor extends DefaultElementInterceptor
+ {
+ public static final MixinInterfacesInterceptor INTERCEPTOR = new MixinInterfacesInterceptor();
+
+ @Override
+ public void add(Object parent, Object child, QName name)
+ {
+ AbstractBeanMetaData mixin = (AbstractBeanMetaData)parent;
+ IntroductionBeanMetaDataFactory.addInterfaces(mixin, "interfaces", ((StringBuffer)child).toString());
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////////////
+ //Characters Handlers
+ private static class AnnotationCharactersHandler extends CharactersHandler
+ {
+ public static final AnnotationCharactersHandler HANDLER = new AnnotationCharactersHandler();
+
+ @Override
+ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
+ {
+ return value;
+ }
+
+ @Override
+ public void setValue(QName qname, ElementBinding element, Object owner, Object value)
+ {
+ BeanMetaDataUtil.setSimpleProperty((AbstractBeanMetaData)owner, "annotation", ((String)value).trim());
+ }
+ }
+
+ private static class StringBufferCharacterHandler extends CharactersHandler
+ {
+ public static final StringBufferCharacterHandler HANDLER = new StringBufferCharacterHandler();
+
+ @Override
+ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
+ {
+ return value;
+ }
+
+ @Override
+ public void setValue(QName qname, ElementBinding element, Object owner, Object value)
+ {
+ ((StringBuffer)owner).append(((String)value).trim());
+ }
+ }
+
}
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/main/schema/aop-beans_1_0.xsd
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/main/schema/aop-beans_1_0.xsd 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/main/schema/aop-beans_1_0.xsd 2007-11-23 00:19:15 UTC (rev 67390)
@@ -10,7 +10,7 @@
attributeFormDefault="unqualified"
version="1.0"
>
-
+
<xsd:import namespace="urn:jboss:bean-deployer:2.0"/>
<xsd:annotation>
@@ -21,48 +21,527 @@
</xsd:documentation>
</xsd:annotation>
- <xsd:element name="aspect" type="aspectType">
+ <xsd:element name="interceptor" type="aspectOrInterceptorType">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
+ An interceptor
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="aspect" type="aspectOrInterceptorType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
An aspect
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
- <xsd:complexType name="aspectBaseType">
+ <xsd:complexType name="aspectOrInterceptorType">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
- Base type for aspects or lifecycle aspects
+ aspects or interceptors
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="mc:beanfactoryType">
+ <!-- xsd:choice minOccurs="0" maxOccurs="1">
+ <xsd:element name="attribute" type="mc:propertyType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="property" type="mc:propertyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice -->
+ <xsd:attribute name="scope" type="xsd:string" use="optional"/>
+ <xsd:attribute name="factory" type="xsd:string" use="optional"/>
<xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
<xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
- <xsd:attribute name="method" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
+
+ <xsd:element name="bind" type="bindType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A binding
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
- <xsd:complexType name="aspectType">
+ <xsd:complexType name="bindType">
<xsd:annotation>
<xsd:documentation>
+ <![CDATA[
+ A binding
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="1" maxOccurs="unbounded">
+ <xsd:element name="interceptor-ref" type="interceptorRefType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="stack-ref" type="stackRefType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="advice" type="adviceType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="around" type="adviceType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="before" type="beforeType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="after" type="afterType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="throwing" type="throwingType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="finally" type="finallyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name="name" type="xsd:string" use="optional" />
+ <xsd:attribute name="pointcut" type="xsd:string" use="required" />
+ <xsd:attribute name="cflow" type="xsd:string" use="optional" />
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:element name="stack" type="stackType">
+ <xsd:annotation>
+ <xsd:documentation>
<![CDATA[
- An aspect
+ A binding
]]>
</xsd:documentation>
</xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="stackType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A binding
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="1" maxOccurs="unbounded">
+ <xsd:element name="interceptor-ref" type="interceptorRefType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="stack-ref" type="stackRefType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="advice" type="adviceType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="around" type="adviceType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="before" type="beforeType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="after" type="afterType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="throwing" type="throwingType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="finally" type="finallyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="bindContentType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ base type for bind content: stack-ref, interceptor-ref and advice
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="name" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="interceptorRefType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A interceptor-ref within a bind or intereptor-stack
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
<xsd:complexContent>
- <xsd:extension base="aspectBaseType">
- <xsd:attribute name="pointcut" type="xsd:string" use="required"/>
+ <xsd:extension base="bindContentType">
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
+ <xsd:complexType name="stackRefType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A stack-ref within a bind or interceptor-stack
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="bindContentType">
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="adviceType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A advice or around within a bind or interceptor-stack
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="bindContentType">
+ <xsd:attribute name="aspect" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="beforeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A before within a bind or interceptor-stack
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="adviceType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="afterType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A after within a bind or interceptor-stack
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="adviceType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="throwingType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A throwing within a bind or interceptor-stack
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="adviceType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="finallyType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A finally within a bind or interceptor-stack
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="adviceType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:element name="typedef" type="typedefType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An aspect
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="typedefType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ aspects or interceptors
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="expr" type="xsd:string" use="required"/>
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:element name="cflow-stack" type="cflowStackType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A cflow-stack
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="cflowStackType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A cflow-stack
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="1" maxOccurs="unbounded">
+ <xsd:element name="called" type="cflowStackEntryType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="not-called" type="cflowStackEntryType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="cflowStackEntryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The called or not-called children of cflow-stack
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="expr" use="required"/>
+ </xsd:complexType>
+
+ <xsd:element name="dynamic-cflow" type="dynamicCflowStackType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dynamic cflow
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="dynamicCflowStackType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dynamic cflow
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="class" type="xsd:string" use="required"/>
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:element name="pointcut" type="pointcutType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A named pointcut
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="pointcutType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A named pointcut
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="expr" type="xsd:string" use="required"/>
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:element name="prepare" type="prepareType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A prepare statement
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="prepareType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A prepare statement
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="name" type="xsd:string" use="optional"/>
+ <xsd:attribute name="expr" type="xsd:string" use="required"/>
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:element name="annotation-introduction" type="annotationIntroductionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A annotation-introduction
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="annotationIntroductionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A annotation-introduction
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="expr" type="xsd:string" use="required"/>
+ <xsd:attribute name="invisible" type="xsd:string" use="required"/>
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:element name="annotation" type="annotationType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A annotation override
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="annotationType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A annotation override
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="annotationIntroductionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:element name="precedence" type="precedenceType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A precedence
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="precedenceType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A annotation override
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="1" maxOccurs="unbounded">
+ <xsd:element name="interceptor-ref" type="interceptorRefType" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="advice" type="adviceType" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:choice>
+ <xsd:attribute name="name" type="xsd:string" use="optional"></xsd:attribute>
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:element name="introduction" type="introductionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A interface introduction
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="introductionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A interface introduction
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="1" maxOccurs="1">
+ <xsd:element name="interfaces" type="interfacesType" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="mixin" type="mixinType" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:choice>
+ <xsd:attribute name="class" type="xsd:string" use="optional"></xsd:attribute>
+ <xsd:attribute name="expr" type="xsd:string" use="optional"></xsd:attribute>
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="mixinType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A mixin within an interface introduction
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="1" maxOccurs="1">
+ <xsd:element name="interfaces" type="interfacesType" minOccurs="1" maxOccurs="1" />
+ <xsd:element name="class" type="classType" minOccurs="1" maxOccurs="1" />
+ <xsd:element name="construction" type="constructionType" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="transient" type="transientType" minOccurs="0" maxOccurs="1" />
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="interfacesType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A interfaces within an introduction or an introduction/mixin
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="classType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A class within an interface/mixin
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="constructionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A class within an interface/mixin
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="transientType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A class within an interface/mixin
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
<xsd:complexType name="lifecycleType">
<xsd:annotation>
<xsd:documentation>
@@ -72,7 +551,10 @@
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
- <xsd:extension base="aspectBaseType">
+ <xsd:extension base="mc:beanfactoryType">
+ <xsd:attribute name="manager-bean" type="xsd:string" use="optional"/>
+ <xsd:attribute name="manager-property" type="xsd:string" use="optional"/>
+ <xsd:attribute name="method" type="xsd:string" use="optional"/>
<xsd:attribute name="classes" type="xsd:string" use="optional"/>
<xsd:attribute name="expr" type="xsd:string" use="optional"/>
<xsd:attribute name="install" type="xsd:string" use="optional"/>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/aop/junit/MicrocontainerJunitSmokeTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/aop/junit/MicrocontainerJunitSmokeTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/aop/junit/MicrocontainerJunitSmokeTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -5,20 +5,13 @@
<bean name="AspectManager" class="org.jboss.aop.AspectManager">
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
+
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" name="TestInterceptor" class="org.jboss.test.aop.junit.TestInterceptor"/>
- <beanfactory name="TestInterceptor" class="org.jboss.test.aop.junit.TestInterceptor"/>
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.aop.junit.TestIntercepted->*(..))">
+ <interceptor-ref name="TestInterceptor"/>
+ </bind>
- <bean name="TestInterceptorAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="TestInterceptor"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <bean name="TestInterceptorBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* org.jboss.test.aop.junit.TestIntercepted->*(..))</property>
- <property name="aspect"><inject bean="TestInterceptorAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
<bean name="TestIntercepted" class="org.jboss.test.aop.junit.TestIntercepted"/>
</deployment>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerAdvisedAnnotationOverrideProxyAdvisorTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerAdvisedAnnotationOverrideProxyAdvisorTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerAdvisedAnnotationOverrideProxyAdvisorTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -3,12 +3,14 @@
<bean name="AspectManager" class="org.jboss.aop.AspectManager">
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.MetaDataContextInterceptor"
- pointcut="execution(* @org.jboss.test.microcontainer.advisor.test.AnnotationWithValue->doSomething(..)) OR execution(* @org.jboss.test.microcontainer.advisor.test.AnnotationWithValue->@org.jboss.test.microcontainer.advisor.test.AnnotationWithValue(..))">
+
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.MetaDataContextInterceptor">
<property name="annotation">org.jboss.test.microcontainer.advisor.test.AnnotationWithValue</property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.advisor.test.AnnotationWithValue->doSomething(..)) OR execution(* @org.jboss.test.microcontainer.advisor.test.AnnotationWithValue->@org.jboss.test.microcontainer.advisor.test.AnnotationWithValue(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="Intercepted" class="org.jboss.test.microcontainer.advisor.test.SomeBean"/>
</deployment>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerAdvisedInstanceAdvisorTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerAdvisedInstanceAdvisorTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerAdvisedInstanceAdvisorTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,19 +6,12 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <beanfactory name="InterceptedAdvice" class="org.jboss.test.microcontainer.advisor.test.TestInterceptor"/>
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.advisor.test.TestInterceptor"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.advisor.test.TestAnnotation->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
- <bean name="InterceptedAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="InterceptedAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <bean name="InterceptedBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* @org.jboss.test.microcontainer.advisor.test.TestAnnotation->*(..))</property>
- <property name="aspect"><inject bean="InterceptedAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
<bean name="Test" class="org.jboss.test.microcontainer.advisor.test.TestObject">
<annotation>@org.jboss.test.microcontainer.advisor.test.TestAnnotation</annotation>
</bean>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerNotAdvisedProxyAdvisorTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerNotAdvisedProxyAdvisorTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/advisor/test/MicrocontainerNotAdvisedProxyAdvisorTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,19 +6,12 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <beanfactory name="InterceptedAdvice" class="org.jboss.test.microcontainer.advisor.test.TestInterceptor"/>
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" name="InterceptedAspect" class="org.jboss.test.microcontainer.advisor.test.TestInterceptor"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.advisor.test.TestAnnotation->*(..))">
+ <interceptor-ref name="InterceptedAspect"/>
+ </bind>
- <bean name="InterceptedAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="InterceptedAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <bean name="InterceptedBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* @org.jboss.test.microcontainer.advisor.test.TestAnnotation->*(..))</property>
- <property name="aspect"><inject bean="InterceptedAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
<bean name="Test" class="org.jboss.test.microcontainer.advisor.test.UnadvisedTest">
<annotation>@org.jboss.test.microcontainer.advisor.test.TestAnnotation</annotation>
</bean>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <annotation xmlns="urn:jboss:aop-beans:1.0" expr="class(org.jboss.test.microcontainer.beans.POJO)" invisible="false">
+ @org.jboss.test.microcontainer.beans.Annotation1
+ </annotation>
+
+ <annotation xmlns="urn:jboss:aop-beans:1.0" expr="method(void org.jboss.test.microcontainer.beans.POJO->method())" invisible="false">
+ @org.jboss.test.microcontainer.beans.Annotation2
+ </annotation>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.beans.Annotation1->@org.jboss.test.microcontainer.beans.Annotation2(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <bean name="ClassAnnotationOverride" class="org.jboss.aop.microcontainer.beans.AnnotationOverride">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="expr">class(org.jboss.test.microcontainer.beans.POJO)</property>
+ <property name="annotation">@org.jboss.test.microcontainer.beans.Annotation1</property>
+ <property name="invisible">false</property>
+ </bean>
+
+ <bean name="MethodAnnotationOverride" class="org.jboss.aop.microcontainer.beans.AnnotationOverride">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="expr">method(void org.jboss.test.microcontainer.beans.POJO->method())</property>
+ <property name="annotation">@org.jboss.test.microcontainer.beans.Annotation2</property>
+ <property name="invisible">false</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* @org.jboss.test.microcontainer.beans.Annotation1->@org.jboss.test.microcontainer.beans.Annotation2(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" factory="org.jboss.test.microcontainer.beans.SimpleAspectFactory">
+ </aspect>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.SimpleAspectFactory" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.SimpleAspectFactory" class="org.jboss.test.microcontainer.beans.SimpleAspectFactory"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.SimpleAspectFactory" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.SimpleAspectFactory"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="factory">true</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.SimpleAspectFactory"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect">
+ </aspect>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency" class="org.jboss.test.microcontainer.beans.Dependency"/>
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency"/></property>
+ </aop:aspect>
+
+ <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <aop:advice aspect="org.jboss.test.microcontainer.beans.TestAspectWithDependency" name="advice"/>
+ </aop:bind>
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency" class="org.jboss.test.microcontainer.beans.Dependency"/>
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency"/></property>
+ <install bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="install">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="uninstall"/>
+ </beanfactory>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="adviceBean">Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/CFlowAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/CFlowAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/CFlowAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <cflow-stack xmlns="urn:jboss:aop-beans:1.0" name="CFlow">
+ <not-called expr="void org.jboss.test.microcontainer.beans.test.CFlowTest->notCallPOJO(..)"/>
+ <called expr="void org.jboss.test.microcontainer.beans.test.CFlowTest->callPOJO(..)"/>
+ </cflow-stack>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))" cflow="CFlow">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/CFlowBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/CFlowBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/CFlowBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="CFlow" class="org.jboss.aop.microcontainer.beans.CFlowStack">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">CFlow</property>
+ <property name="entries">
+ <list>
+ <inject bean="CFlow$1"/>
+ <inject bean="CFlow$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="CFlow$1" class="org.jboss.aop.microcontainer.beans.CFlowStackEntry">
+ <property name="called">false</property>
+ <property name="expr">void org.jboss.test.microcontainer.beans.test.CFlowTest->notCallPOJO(..)</property>
+ </bean>
+ <bean name="CFlow$2" class="org.jboss.aop.microcontainer.beans.CFlowStackEntry">
+ <property name="called">true</property>
+ <property name="expr">void org.jboss.test.microcontainer.beans.test.CFlowTest->callPOJO(..)</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="cflow">CFlow</property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <bean name="ClassMetaData" class="org.jboss.aop.microcontainer.beans.ClassMetaData">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="tag">SomeTag</property>
+ <property name="className">org.jboss.test.microcontainer.beans.POJO</property>
+ <property name="element">
+ <![CDATA[
+ <metadata>
+ <constructor expr="POJO()">
+ <data>ctor</data>
+ </constructor>
+ <method expr="int *(..)">
+ <data>method1</data>
+ </method>
+ <method expr="void *()">
+ <data>method2</data>
+ </method>
+ </metadata>
+ ]]>
+ </property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestClassMetaDataAspect" class="org.jboss.test.microcontainer.beans.TestClassMetaDataAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestClassMetaDataAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestClassMetaDataAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(org.jboss.test.microcontainer.beans.POJO->new(..)) OR execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <bean name="TestAspectBinding1$" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestClassMetaDataAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataLoaderBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataLoaderBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataLoaderBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <bean name="custom$loader" class="org.jboss.aop.microcontainer.beans.ClassMetaDataLoader">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="tag">custom</property>
+ <property name="className">org.jboss.test.microcontainer.beans.TestMetaDataLoader</property>
+ </bean>
+
+ <bean name="ClassMetaData" class="org.jboss.aop.microcontainer.beans.ClassMetaData">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="tag">custom</property>
+ <property name="className">org.jboss.test.microcontainer.beans.POJO</property>
+ <property name="element">
+ <![CDATA[
+ <metadata>
+ <data>custom1</data>
+ </metadata>
+ ]]>
+ </property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestClassMetaDataAspect" class="org.jboss.test.microcontainer.beans.TestClassMetaDataAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestClassMetaDataAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestClassMetaDataAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(org.jboss.test.microcontainer.beans.POJO->new(..)) OR execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <bean name="TestAspectBinding1$" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestClassMetaDataAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <dynamic-cflow xmlns="urn:jboss:aop-beans:1.0" name="DynamicCFlow" class="org.jboss.test.microcontainer.beans.DynamicCFlowImpl"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))" cflow="DynamicCFlow">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="DynamicCFlow" class="org.jboss.aop.microcontainer.beans.DynamicCFlowDef">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">DynamicCFlow</property>
+ <property name="className">org.jboss.test.microcontainer.beans.DynamicCFlowImpl</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="cflow">DynamicCFlow</property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" factory="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.SimpleInterceptorFactory" class="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="factory">true</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency" class="org.jboss.test.microcontainer.beans.Dependency"/>
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency">
+ <property name="dependency"><inject bean="Dependency"/></property>
+ </aop:interceptor>
+
+ <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <aop:interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency"/>
+ </aop:bind>
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency" class="org.jboss.test.microcontainer.beans.Dependency"/>
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" class="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency">
+ <property name="dependency"><inject bean="Dependency"/></property>
+ <install bean="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" method="install">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" method="uninstall"/>
+ </beanfactory>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="adviceBean">Factory$org.jboss.test.microcontainer.beans.TestInterceptorWithDependency</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestInterceptorBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <!-- We need cflow as well -->
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestInterceptorBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestInterceptorBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency"/></property>
+ <property name="aspectBinding"><inject bean="TestInterceptorBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <introduction xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.POJO">
+ <interfaces>org.jboss.test.microcontainer.beans.IntroductionInterface</interfaces>
+ </introduction>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.beans.IntroductionInterface}->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <bean name="IntroductionBinding" class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
+ <property name="classes">org.jboss.test.microcontainer.beans.POJO</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="interfaces">
+ <list elementClass="java.lang.String">
+ <value>org.jboss.test.microcontainer.beans.IntroductionInterface</value>
+ </list>
+ </property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* $instanceof{org.jboss.test.microcontainer.beans.IntroductionInterface}->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <introduction xmlns="urn:jboss:aop-beans:1.0" expr="has(* *->method())">
+ <interfaces>org.jboss.test.microcontainer.beans.IntroductionInterface</interfaces>
+ </introduction>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.beans.IntroductionInterface}->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
+
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <bean name="IntroductionBinding" class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
+ <property name="expr">has(* *->method())</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="interfaces">
+ <list elementClass="java.lang.String">
+ <value>org.jboss.test.microcontainer.beans.IntroductionInterface</value>
+ </list>
+ </property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* $instanceof{org.jboss.test.microcontainer.beans.IntroductionInterface}->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.LightweightAspect"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" name="Binding" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <before aspect="org.jboss.test.microcontainer.beans.LightweightAspect" name="before"/>
+ <around aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ <after aspect="org.jboss.test.microcontainer.beans.LightweightAspect" name="after"/>
+ <throwing aspect="org.jboss.test.microcontainer.beans.LightweightAspect" name="throwing"/>
+ <finally aspect="org.jboss.test.microcontainer.beans.LightweightAspect" name="finaly"/>
+ </bind>
+
+ <!-- TODO This test should go somewhere so it is only run as woven
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+ -->
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectBeanTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectBeanTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectBeanTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.LightweightAspect" class="org.jboss.test.microcontainer.beans.LightweightAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.LightweightAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.LightweightAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="Binding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ <inject bean="TestAspectBinding$2"/>
+ <inject bean="TestAspectBinding$3"/>
+ <inject bean="TestAspectBinding$4"/>
+ <inject bean="TestAspectBinding$5"/>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.LightweightAspect"/></property>
+ <property name="aspectMethod">before</property>
+ <property name="type">BEFORE</property>
+ <property name="aspectBinding"><inject bean="Binding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="Binding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$3" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.LightweightAspect"/></property>
+ <property name="aspectMethod">after</property>
+ <property name="type">AFTER</property>
+ <property name="aspectBinding"><inject bean="Binding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$4" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.LightweightAspect"/></property>
+ <property name="aspectMethod">throwing</property>
+ <property name="type">THROWING</property>
+ <property name="aspectBinding"><inject bean="Binding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$5" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.LightweightAspect"/></property>
+ <property name="aspectMethod">finally</property>
+ <property name="type">FINALLY</property>
+ <property name="aspectBinding"><inject bean="Binding" state="Instantiated"/></property>
+ </bean>
+
+<!-- TODO: Test should be run with weaving
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+ -->
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinClassesAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinClassesAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinClassesAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <introduction xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.POJO">
+ <mixin>
+ <interfaces>org.jboss.test.microcontainer.beans.MixinInterface</interfaces>
+ <class>org.jboss.test.microcontainer.beans.MixinImpl</class>
+ <transient>true</transient>
+ </mixin>
+ </introduction>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.beans.MixinInterface}->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinClassesBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinClassesBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinClassesBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <bean name="MixinBinding" class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
+ <property name="classes">org.jboss.test.microcontainer.beans.POJO</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="mixins">
+ <list>
+ <inject bean="MixinBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="MixinBinding$1" class="org.jboss.aop.microcontainer.beans.MixinEntry">
+ <property name="interfaces">
+ <list elementClass="java.lang.String">
+ <value>org.jboss.test.microcontainer.beans.MixinInterface</value>
+ </list>
+ </property>
+ <property name="mixin">org.jboss.test.microcontainer.beans.MixinImpl</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* $instanceof{org.jboss.test.microcontainer.beans.MixinInterface}->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinExprAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinExprAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinExprAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <introduction xmlns="urn:jboss:aop-beans:1.0" expr="has(* *->method())">
+ <mixin>
+ <construction>new org.jboss.test.microcontainer.beans.MixinImpl(this, "CUSTOM CONSTRUCTION")</construction>
+ <interfaces>
+ org.jboss.test.microcontainer.beans.MixinInterface
+ </interfaces>
+ <class>org.jboss.test.microcontainer.beans.MixinImpl</class>
+ </mixin>
+ </introduction>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.beans.MixinInterface}->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinExprBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinExprBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MixinExprBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <bean name="MixinBinding" class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
+ <property name="expr">has(* *->method())</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="mixins">
+ <list>
+ <inject bean="MixinBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="MixinBinding$1" class="org.jboss.aop.microcontainer.beans.MixinEntry">
+ <property name="construction">new org.jboss.test.microcontainer.beans.MixinImpl(this, "CUSTOM CONSTRUCTION")</property>
+ <property name="interfaces">
+ <list elementClass="java.lang.String">
+ <value>org.jboss.test.microcontainer.beans.MixinInterface</value>
+ </list>
+ </property>
+ <property name="mixin">org.jboss.test.microcontainer.beans.MixinImpl</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* $instanceof{org.jboss.test.microcontainer.beans.MixinInterface}->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency1" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency2" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic2.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic2.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic2.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency1"/></property>
+ </aop:aspect>
+
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency">
+ <property name="dependency"><inject bean="Dependency2"/></property>
+ </aop:interceptor>
+
+ <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.beans.Annotation1->*(..))">
+ <aop:advice aspect="org.jboss.test.microcontainer.beans.TestAspectWithDependency" name="advice"/>
+ </aop:bind>
+
+ <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.beans.Annotation2->*(..))">
+ <aop:interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency"/>
+ </aop:bind>
+
+ <bean name="Intercepted1" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation1</annotation>
+ </bean>
+
+ <bean name="Intercepted2" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation2</annotation>
+ </bean>
+
+ <bean name="Intercepted3" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation1</annotation>
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation2</annotation>
+ </bean>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency1" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency2" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic2.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic2.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic2.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency1"/></property>
+ <!-- Need to be able to configure with attributes and stuff -->
+ <install bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="install">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="uninstall"/>
+ </beanfactory>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="adviceBean">Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" class="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency">
+ <property name="dependency"><inject bean="Dependency2"/></property>
+ <install bean="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" method="install">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" method="uninstall"/>
+ </beanfactory>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="adviceBean">Factory$org.jboss.test.microcontainer.beans.TestInterceptorWithDependency</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* @org.jboss.test.microcontainer.beans.Annotation1->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="TestInterceptorBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* @org.jboss.test.microcontainer.beans.Annotation2->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestInterceptorBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestInterceptorBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency"/></property>
+ <property name="aspectBinding"><inject bean="TestInterceptorBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Intercepted1" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation1</annotation>
+ </bean>
+
+ <bean name="Intercepted2" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation2</annotation>
+ </bean>
+
+ <bean name="Intercepted3" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation1</annotation>
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation2</annotation>
+ </bean>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency"/></property>
+ </aop:aspect>
+
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <aop:advice aspect="org.jboss.test.microcontainer.beans.TestAspectWithDependency" name="advice"/>
+ <aop:interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+ </aop:bind>
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency"/></property>
+ <!-- Need to be able to configure with attributes and stuff -->
+ <install bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="install">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="uninstall"/>
+ </beanfactory>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="adviceBean">Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ <inject bean="TestAspectBinding$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleStackAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleStackAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleStackAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" factory="org.jboss.test.microcontainer.beans.SimpleAspectFactory"/>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" factory="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <stack xmlns="urn:jboss:aop-beans:1.0" name="TestStackA">
+ <advice aspect="org.jboss.test.microcontainer.beans.SimpleAspectFactory" name="advice"/>
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </stack>
+
+ <stack xmlns="urn:jboss:aop-beans:1.0" name="TestStackB">
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/>
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+ </stack>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <stack-ref name="TestStackA"/>
+ <stack-ref name="TestStackB"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleStackBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleStackBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/MultipleStackBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.SimpleAspectFactory" class="org.jboss.test.microcontainer.beans.SimpleAspectFactory"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.SimpleAspectFactory" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.SimpleAspectFactory"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="factory">true</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.SimpleInterceptorFactory" class="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="factory">true</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestStackA" class="org.jboss.aop.microcontainer.beans.Stack">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">TestStack</property>
+ <property name="advices">
+ <list>
+ <inject bean="TestStackA$1"/>
+ <inject bean="TestStackA$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestStackA$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.SimpleAspectFactory"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="forStack">true</property>
+ </bean>
+ <bean name="TestStackA$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="forStack">true</property>
+ </bean>
+
+ <bean name="TestStackB" class="org.jboss.aop.microcontainer.beans.Stack">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">TestStack</property>
+ <property name="advices">
+ <list>
+ <inject bean="TestStackB$1"/>
+ <inject bean="TestStackB$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestStackB$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.SimpleInterceptorFactory"/></property>
+ <property name="forStack">true</property>
+ </bean>
+ <bean name="TestStackB$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="forStack">true</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ <inject bean="TestAspectBinding$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.StackEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="stack"><inject bean="TestStackA"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$2" class="org.jboss.aop.microcontainer.beans.StackEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="stack"><inject bean="TestStackB"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <pointcut xmlns="urn:jboss:aop-beans:1.0" name="NamedPointcut" expr="execution(* org.jboss.test.microcontainer.beans.POJO->*())"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="NamedPointcut">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="NamedPointcut" class="org.jboss.aop.microcontainer.beans.NamedPointcut">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">NamedPointcut</property>
+ <property name="expr">execution(* org.jboss.test.microcontainer.beans.POJO->*())</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">NamedPointcut</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" name="AspectA" class="org.jboss.test.microcontainer.beans.TestAspectWithProperty">
+ <property name="someProperty">PropertyA</property>
+ </aop:aspect>
+
+ <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" name="AspectB" class="org.jboss.test.microcontainer.beans.TestAspectWithProperty">
+ <property name="someProperty">PropertyB</property>
+ </aop:aspect>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->method())">
+ <advice aspect="AspectA" name="advice"/>
+ </bind>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->method(int))">
+ <advice aspect="AspectB" name="advice"/>
+ </bind>
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
+
+
+
+
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$AspectA" class="org.jboss.test.microcontainer.beans.TestAspectWithProperty">
+ <property name="someProperty">PropertyA</property>
+ </beanfactory>
+
+ <bean name="AspectA" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$AspectA"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$AspectB" class="org.jboss.test.microcontainer.beans.TestAspectWithProperty">
+ <property name="someProperty">PropertyB</property>
+ </beanfactory>
+
+ <bean name="AspectB" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$AspectB"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="BindingA" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->method())</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="AspectA"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="BindingA" state="Instantiated"/></property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="BindingB" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->method(int))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <bean name="TestAspectBindingB$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="AspectB"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="BindingB" state="Instantiated"/></property>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
+
+
+
+
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/PrecedenceAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/PrecedenceAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/PrecedenceAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <precedence xmlns="urn:jboss:aop-beans:1.0">
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </precedence>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/PrecedenceBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/PrecedenceBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/PrecedenceBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="PrecedenceBinding" class="org.jboss.aop.microcontainer.beans.PrecedenceDef">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="entries">
+ <list>
+ <inject bean="PrecedenceBinding$1"/>
+ <inject bean="PrecedenceBinding$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="PrecedenceBinding$1" class="org.jboss.aop.microcontainer.beans.PrecedenceDefEntry">
+ <property name="aspectName">org.jboss.test.microcontainer.beans.TestInterceptor</property>
+ </bean>
+ <bean name="PrecedenceBinding$2" class="org.jboss.aop.microcontainer.beans.PrecedenceDefEntry">
+ <property name="aspectName">org.jboss.test.microcontainer.beans.TestAspect</property>
+ <property name="aspectMethod">advice</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ <inject bean="TestAspectBinding$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.PerVmAspect" scope="PER_VM"/>
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.PerClassAspect" scope="PER_CLASS"/>
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.PerInstanceAspect" scope="PER_INSTANCE"/>
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.PerJoinPointAspect" scope="PER_JOINPOINT"/>
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.PerClassJoinPointAspect" scope="PER_CLASS_JOINPOINT"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO*->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.PerVmAspect" name="advice"/>
+ <advice aspect="org.jboss.test.microcontainer.beans.PerClassAspect" name="advice"/>
+ <advice aspect="org.jboss.test.microcontainer.beans.PerInstanceAspect" name="advice"/>
+ <advice aspect="org.jboss.test.microcontainer.beans.PerJoinPointAspect" name="advice"/>
+ <advice aspect="org.jboss.test.microcontainer.beans.PerClassJoinPointAspect" name="advice"/>
+ </bind>
+
+ <bean name="POJO1A" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+ <bean name="POJO1B" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+ <bean name="POJO2" class="org.jboss.test.microcontainer.beans.POJO2"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.PerVmAspect" class="org.jboss.test.microcontainer.beans.PerVmAspect"/>
+ <bean name="org.jboss.test.microcontainer.beans.PerVmAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.PerVmAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="scope">PER_VM</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.PerClassAspect" class="org.jboss.test.microcontainer.beans.PerClassAspect"/>
+ <bean name="org.jboss.test.microcontainer.beans.PerClassAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.PerClassAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="scope">PER_CLASS</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.PerInstanceAspect" class="org.jboss.test.microcontainer.beans.PerInstanceAspect"/>
+ <bean name="org.jboss.test.microcontainer.beans.PerInstanceAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.PerInstanceAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="scope">PER_INSTANCE</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.PerJoinPointAspect" class="org.jboss.test.microcontainer.beans.PerJoinPointAspect"/>
+ <bean name="org.jboss.test.microcontainer.beans.PerJoinPointAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.PerJoinPointAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="scope">PER_JOINPOINT</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.PerClassJoinPointAspect" class="org.jboss.test.microcontainer.beans.PerClassJoinPointAspect"/>
+ <bean name="org.jboss.test.microcontainer.beans.PerClassJoinPointAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.PerClassJoinPointAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="scope">PER_CLASS_JOINPOINT</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO*->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ <inject bean="TestAspectBinding$2"/>
+ <inject bean="TestAspectBinding$3"/>
+ <inject bean="TestAspectBinding$4"/>
+ <inject bean="TestAspectBinding$5"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.PerVmAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.PerClassAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$3" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.PerInstanceAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$4" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.PerJoinPointAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+ <bean name="TestAspectBinding$5" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.PerClassJoinPointAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="POJO1A" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+ <bean name="POJO1B" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+ <bean name="POJO2" class="org.jboss.test.microcontainer.beans.POJO2"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" factory="org.jboss.test.microcontainer.beans.SimpleAspectFactory"/>
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <stack xmlns="urn:jboss:aop-beans:1.0" name="TestStack">
+ <advice aspect="org.jboss.test.microcontainer.beans.SimpleAspectFactory" name="advice"/>
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </stack>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <stack-ref name="TestStack"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.SimpleAspectFactory" class="org.jboss.test.microcontainer.beans.SimpleAspectFactory"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.SimpleAspectFactory" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.SimpleAspectFactory"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="factory">true</property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TestStack" class="org.jboss.aop.microcontainer.beans.Stack">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">TestStack</property>
+ <property name="advices">
+ <list>
+ <inject bean="TestStack$1"/>
+ <inject bean="TestStack$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestStack$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.SimpleAspectFactory"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="forStack">true</property>
+ </bean>
+ <bean name="TestStack$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="forStack">true</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.StackEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="stack"><inject bean="TestStack"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency1" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency2" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic2.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic2.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCaseNotAutomatic2.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency1"/></property>
+ </aop:aspect>
+
+ <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency">
+ <property name="dependency"><inject bean="Dependency2"/></property>
+ </aop:interceptor>
+
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <stack xmlns="urn:jboss:aop-beans:1.0" name="AspectStack">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspectWithDependency" name="advice"/>
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </stack>
+
+ <stack xmlns="urn:jboss:aop-beans:1.0" name="InterceptorStack">
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency"/>
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+ </stack>
+
+ <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.beans.Annotation1->*(..))">
+ <aop:stack-ref name="AspectStack"/>
+ </aop:bind>
+
+ <aop:bind xmlns:aop="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.beans.Annotation2->*(..))">
+ <aop:stack-ref name="InterceptorStack"/>
+ </aop:bind>
+
+ <bean name="Intercepted1" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation1</annotation>
+ </bean>
+
+ <bean name="Intercepted2" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation2</annotation>
+ </bean>
+
+ <bean name="Intercepted3" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation1</annotation>
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation2</annotation>
+ </bean>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency1" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency2" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic2.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic2.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCaseNotAutomatic2.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency1"/></property>
+ <!-- Need to be able to configure with attributes and stuff -->
+ <install bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="install">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="uninstall"/>
+ </beanfactory>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="adviceBean">Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" class="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency">
+ <property name="dependency"><inject bean="Dependency2"/></property>
+ <!-- Need to be able to configure with attributes and stuff -->
+ <install bean="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" method="install">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" method="uninstall"/>
+ </beanfactory>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="adviceBean">Factory$org.jboss.test.microcontainer.beans.TestInterceptorWithDependency</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="AspectStack" class="org.jboss.aop.microcontainer.beans.Stack">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">AspectStack</property>
+ <property name="advices">
+ <list>
+ <inject bean="AspectStack$1"/>
+ <inject bean="AspectStack$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="AspectStack$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="forStack">true</property>
+ </bean>
+ <bean name="AspectStack$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="forStack">true</property>
+ </bean>
+
+ <bean name="InterceptorStack" class="org.jboss.aop.microcontainer.beans.Stack">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">InterceptorStack</property>
+ <property name="advices">
+ <list>
+ <inject bean="InterceptorStack$1"/>
+ <inject bean="InterceptorStack$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="InterceptorStack$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptorWithDependency"/></property>
+ <property name="forStack">true</property>
+ </bean>
+ <bean name="InterceptorStack$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="forStack">true</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* @org.jboss.test.microcontainer.beans.Annotation1->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.StackEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="stack"><inject bean="AspectStack"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="TestInterceptorBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* @org.jboss.test.microcontainer.beans.Annotation2->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestInterceptorBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestInterceptorBinding$1" class="org.jboss.aop.microcontainer.beans.StackEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="stack"><inject bean="InterceptorStack"/></property>
+ <property name="aspectBinding"><inject bean="TestInterceptorBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Intercepted1" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation1</annotation>
+ </bean>
+
+ <bean name="Intercepted2" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation2</annotation>
+ </bean>
+
+ <bean name="Intercepted3" class="org.jboss.test.microcontainer.beans.POJO">
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation1</annotation>
+ <annotation>@org.jboss.test.microcontainer.beans.Annotation2</annotation>
+ </bean>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency"/></property>
+ </aop:aspect>
+
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <stack xmlns="urn:jboss:aop-beans:1.0" name="TestStack">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspectWithDependency" name="advice"/>
+ <interceptor-ref name="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+ </stack>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.beans.POJO->*(..))">
+ <stack-ref name="TestStack"/>
+ </bind>
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCaseNotAutomatic0.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCaseNotAutomatic0.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCaseNotAutomatic0.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="Dependency" class="org.jboss.test.microcontainer.beans.Dependency"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCaseNotAutomatic1.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.test.microcontainer.beans.TestAspectWithDependency">
+ <property name="dependency"><inject bean="Dependency"/></property>
+ <install bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="install">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency" method="uninstall"/>
+ </beanfactory>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspectWithDependency" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="adviceBean">Factory$org.jboss.test.microcontainer.beans.TestAspectWithDependency</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.test.microcontainer.beans.TestInterceptor"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestInterceptor" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+
+ <bean name="TestStack" class="org.jboss.aop.microcontainer.beans.Stack">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">TestStack</property>
+ <property name="advices">
+ <list>
+ <inject bean="TestStack$1"/>
+ <inject bean="TestStack$2"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestStack$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspectWithDependency"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="forStack">true</property>
+ </bean>
+ <bean name="TestStack$2" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestInterceptor"/></property>
+ <property name="forStack">true</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* org.jboss.test.microcontainer.beans.POJO->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.StackEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="stack"><inject bean="TestStack"/></property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+
+
+ <bean name="Intercepted" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TESTS.txt
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TESTS.txt (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TESTS.txt 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,66 @@
+*aspect/advice
+AspectSimpleBeansTestCase
+
+*interceptor
+InterceptorSimpleBeansTestCase
+
+*interceptor w/ dependency
+InterceptorWithDependencyBeansTestCase
+InterceptorWithDependencyBeansDifferentOrderTestCase
+
+*aspect/advice with dependency
+AspectWithDependencyBeansTestCase
+AspectWithDependencyBeansDifferentOrderTestCase
+
+*multiple aspects/interceptors
+MultipleAdviceBeansTestCase.java
+
+*multiple aspects/interceptors w/ dependency
+MultipleAdvicesWithSingleDependencyBeansTestCase
+MultipleAdvicesWithSingleDependencyBeansDifferentOrderTestCase
+MultipleAdvicesWithMultipleDependencyBeansTestCase
+MultipleAdvicesWithMultipleDependencyBeansDifferentOrderTestCase
+
+
+*interceptor/aspect factory
+AspectFactorySimpleBeansTestCase
+InterceptorFactorySimpleBeansTestCase
+
+* scoped aspects/interceptors (PER_CLASS, PER_VM etc.)
+ScopedAspectBeansTestCase *** SOME PROBLEMS WITH testPerClassJoinPoint() if any of the other tests are enabled?!?!?!
+
+*interceptor/aspect factory with dependency
+
+
+*named aspects/interceptors
+NonStandardNameAspectBeansTestCase
+*** Should maybe do one for beans with depenencies as well
+
+*cflow in bindings
+CFlowBeansTestCase
+
+*aspects/interceptors with attributes
+*** Need tests for the "magically" inserted advisor, instance advisor etc.
+
+*interceptor stacks
+StackBeansTestCase
+MultipleStackBeansTestCase
+
+*interceptor stacks where entries have dependencies
+StackWithSingleDependencyBeansTestCase
+StackWithSingleDependencyBeansDifferentOrderTestCase
+StackWithMultipleDependencyBeansTestCase
+StackWithMultipleDependencyBeansDifferentOrderTestCase
+
+*binding deployed seperately from aspect definition
+
+*domains
+
+*annotation overrides
+AnnotationOverrideBeansTestCase
+
+*typedefs
+TypeDefBeansTestCase
+
+*Named pointcuts
+NamedPointcutBeansTestCase
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TypeDefAopTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TypeDefAopTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TypeDefAopTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <typedef xmlns="urn:jboss:aop-beans:1.0" name="TypeDef" expr="class(org.jboss.test.microcontainer.beans.POJO)"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $typedef{TypeDef}->*(..))">
+ <advice aspect="org.jboss.test.microcontainer.beans.TestAspect" name="advice"/>
+ </bind>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+</deployment>
Added: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TypeDefBeansTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TypeDefBeansTestCase.xml (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/beans/test/TypeDefBeansTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="AspectManager" class="org.jboss.aop.AspectManager">
+ <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
+ </bean>
+
+ <beanfactory name="Factory$org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.test.microcontainer.beans.TestAspect"/>
+
+ <bean name="org.jboss.test.microcontainer.beans.TestAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
+ <property name="advice"><inject bean="Factory$org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ </bean>
+
+ <bean name="TypeDef" class="org.jboss.aop.microcontainer.beans.TypeDef">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="name">TypeDef</property>
+ <property name="expr">class(org.jboss.test.microcontainer.beans.POJO)</property>
+ </bean>
+
+ <bean name="TestAspectBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
+ <property name="pointcut">execution(* $typedef{TypeDef}->*(..))</property>
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="advices">
+ <list>
+ <inject bean="TestAspectBinding$1"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="TestAspectBinding$1" class="org.jboss.aop.microcontainer.beans.InterceptorEntry">
+ <property name="manager"><inject bean="AspectManager"/></property>
+ <property name="aspect"><inject bean="org.jboss.test.microcontainer.beans.TestAspect"/></property>
+ <property name="aspectMethod">advice</property>
+ <property name="aspectBinding"><inject bean="TestAspectBinding" state="Instantiated"/></property>
+ </bean>
+
+ <bean name="Bean" class="org.jboss.test.microcontainer.beans.POJO"/>
+
+</deployment>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/BeanCallingMethodInCtorTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/BeanCallingMethodInCtorTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/BeanCallingMethodInCtorTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,11 +6,11 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.CalledInterceptor"
- pointcut="execution(* org.jboss.test.microcontainer.support.BeanCallingMethodInCtor->*(..))">
- </aop:aspect>
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.CalledInterceptor"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.support.BeanCallingMethodInCtor->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="Bean" class="org.jboss.test.microcontainer.support.BeanCallingMethodInCtor"/>
</deployment>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/BeanNoDefaultCtorUsingParamTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/BeanNoDefaultCtorUsingParamTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/BeanNoDefaultCtorUsingParamTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,11 +6,11 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.CalledInterceptor"
- pointcut="execution(* org.jboss.test.microcontainer.support.BeanNoDefaultCtorUsingParam->*(..))">
- </aop:aspect>
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.CalledInterceptor"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.support.BeanNoDefaultCtorUsingParam->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="Bean" class="org.jboss.test.microcontainer.support.BeanNoDefaultCtorUsingParam">
<constructor>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/ConstructorInterceptorWithDependencyTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/ConstructorInterceptorWithDependencyTestCaseNotAutomatic1.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/ConstructorInterceptorWithDependencyTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,13 +6,18 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithDependency"
- manager-bean="TheAspectManager"
- pointcut="execution(@org.jboss.test.microcontainer.support.Test->new(..))">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0"
+ name="InterceptedAdvice"
+ class="org.jboss.test.microcontainer.support.InterceptorWithDependency"
+ manager-bean="TheAspectManager">
<property name="simpleBean"><inject bean="Dependency"/></property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0"
+ pointcut="execution(@org.jboss.test.microcontainer.support.Test->new(..))"
+ manager-bean="TheAspectManager">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl">
<annotation>@org.jboss.test.microcontainer.support.Test</annotation>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/DeployersInterceptedAspectManagerJMXTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/DeployersInterceptedAspectManagerJMXTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/DeployersInterceptedAspectManagerJMXTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -20,6 +20,20 @@
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
</bean>
+ <aspect xmlns="urn:jboss:aop-beans:1.0"
+ name="DeployersAdvice"
+ class="org.jboss.test.microcontainer.support.deployers.DeployerAspects"
+ manager-bean="AspectManager"
+ manager-property="aspectManager"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0"
+ pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.deployers.IDeployer}->$implements{org.jboss.test.microcontainer.support.deployers.IDeployer}(..))"
+ manager-bean="AspectManager"
+ manager-property="aspectManager">
+ <advice aspect="DeployersAdvice" name="invoke"/>
+ </bind>
+
+<!--
<beanfactory name="DeployersAdvice" class="org.jboss.test.microcontainer.support.deployers.DeployerAspects">
</beanfactory>
@@ -33,7 +47,7 @@
<property name="aspect"><inject bean="DeployersAspect" property="definition"/></property>
<property name="manager"><inject bean="AspectManager" property="aspectManager"/></property>
</bean>
-
+-->
<bean name="MainDeployer" class="org.jboss.test.microcontainer.support.deployers.SampleMainDeployer">
<property name="deployers">
<list>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/DeployersInterceptedTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/DeployersInterceptedTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/DeployersInterceptedTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,22 +6,12 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <beanfactory name="DeployersAdvice" class="org.jboss.test.microcontainer.support.deployers.DeployerAspects">
- </beanfactory>
+ <aspect xmlns="urn:jboss:aop-beans:1.0" name="DeployersAdvice" class="org.jboss.test.microcontainer.support.deployers.DeployerAspects"/>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.deployers.IDeployer}->$implements{org.jboss.test.microcontainer.support.deployers.IDeployer}(..))">
+ <advice aspect="DeployersAdvice" name="invoke"/>
+ </bind>
- <bean name="DeployersAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="DeployersAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <bean name="DeployersBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <!-- This fails to match anything
- -->
- <property name="pointcut">execution(* $instanceof{org.jboss.test.microcontainer.support.deployers.IDeployer}->$implements{org.jboss.test.microcontainer.support.deployers.IDeployer}(..))</property>
- <property name="aspect"><inject bean="DeployersAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
<bean name="MainDeployer" class="org.jboss.test.microcontainer.support.deployers.SampleMainDeployer">
<property name="deployers">
<list>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptedTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptedTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptedTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,19 +6,12 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <beanfactory name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.CalledInterceptor"/>
+ <interceptor xmlns="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.CalledInterceptor"/>
- <bean name="InterceptedAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="InterceptedAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <bean name="InterceptedBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->*(..))</property>
- <property name="aspect"><inject bean="InterceptedAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
+
<bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl"/>
</deployment>
Deleted: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptedUseCaseXmlTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptedUseCaseXmlTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptedUseCaseXmlTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="TheAspectManager" class="org.jboss.aop.AspectManager">
- <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
- </bean>
-
- <bean name="AspectManagerHolder" class="org.jboss.test.microcontainer.support.AspectManagerHolder">
- <property name="manager"><inject bean="TheAspectManager"/></property>
- </bean>
-
- <bean name="Dependency" class="org.jboss.test.microcontainer.support.SimpleBeanImpl"/>
-
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.CalledInterceptor"
- manager-bean="AspectManagerHolder"
- manager-property="manager"
- pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->*(..))">
- </aop:aspect>
-
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="DependentAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithDependency"
- manager-bean="AspectManagerHolder"
- manager-property="manager"
- pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->*(..))">
- <property name="simpleBean"><inject bean="Dependency"/></property>
- </aop:aspect>
-
- <bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl"/>
-
-</deployment>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithAnnotationDependencyTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithAnnotationDependencyTestCaseNotAutomatic1.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithAnnotationDependencyTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,12 +6,13 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithAnnotationDependency"
- pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.InterceptorWithAnnotationDependency">
<property name="controller"><inject bean="jboss.kernel:service=KernelController"/></property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl">
<annotation>@org.jboss.test.microcontainer.support.Test</annotation>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithDependencyTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithDependencyTestCaseNotAutomatic1.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithDependencyTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,12 +6,13 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithDependency"
- pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.InterceptorWithDependency">
<property name="simpleBean"><inject bean="Dependency"/></property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl">
<annotation>@org.jboss.test.microcontainer.support.Test</annotation>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithNestedAnnotationDependencyTestCaseNotAutomatic3.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithNestedAnnotationDependencyTestCaseNotAutomatic3.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithNestedAnnotationDependencyTestCaseNotAutomatic3.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,12 +6,13 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithNestedAnnotationDependency"
- pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.InterceptorWithNestedAnnotationDependency">
<property name="controller"><inject bean="jboss.kernel:service=KernelController"/></property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl">
<annotation>@org.jboss.test.microcontainer.support.Test</annotation>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithNestedMethodAnnotationDependencyTestCaseNotAutomatic3.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithNestedMethodAnnotationDependencyTestCaseNotAutomatic3.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithNestedMethodAnnotationDependencyTestCaseNotAutomatic3.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,12 +6,13 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithNestedAnnotationDependency"
- pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.InterceptorWithNestedAnnotationDependency">
<property name="controller"><inject bean="jboss.kernel:service=KernelController"/></property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl">
<annotation>@org.jboss.test.microcontainer.support.Test</annotation>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenClassAnnotationDependencyTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenClassAnnotationDependencyTestCaseNotAutomatic1.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenClassAnnotationDependencyTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,12 +6,13 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithAnnotationDependency"
- pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.InterceptorWithAnnotationDependency">
<property name="controller"><inject bean="jboss.kernel:service=KernelController"/></property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.support.Test->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="Intercepted" class="org.jboss.test.microcontainer.support.OverriddenAnnotationSimpleBeanImpl">
<annotation>@org.jboss.test.microcontainer.support.Test</annotation>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenMethodAnnotationDependencyForChildTestCaseNotAutomatic2.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenMethodAnnotationDependencyForChildTestCaseNotAutomatic2.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenMethodAnnotationDependencyForChildTestCaseNotAutomatic2.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,12 +6,13 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithAnnotationDependency"
- pointcut="execution(* @org.jboss.test.microcontainer.support.Test->@org.jboss.test.microcontainer.support.Test(..))">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.InterceptorWithAnnotationDependency">
<property name="controller"><inject bean="jboss.kernel:service=KernelController"/></property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.support.Test->@org.jboss.test.microcontainer.support.Test(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="NotDeployable" class="org.jboss.test.microcontainer.support.OverriddenPropertyAnnotatedChild">
</bean>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenMethodAnnotationDependencyTestCaseNotAutomatic2.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenMethodAnnotationDependencyTestCaseNotAutomatic2.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/InterceptorWithOverriddenMethodAnnotationDependencyTestCaseNotAutomatic2.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,12 +6,13 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithAnnotationDependency"
- pointcut="execution(* @org.jboss.test.microcontainer.support.Test->@org.jboss.test.microcontainer.support.Test(..))">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.InterceptorWithAnnotationDependency">
<property name="controller"><inject bean="jboss.kernel:service=KernelController"/></property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* @org.jboss.test.microcontainer.support.Test->@org.jboss.test.microcontainer.support.Test(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
<bean name="NotDeployable" class="org.jboss.test.microcontainer.support.OverriddenPropertyAnnotatedBean">
</bean>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/IntroductionDependencyTestCaseNotAutomatic1.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/IntroductionDependencyTestCaseNotAutomatic1.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/IntroductionDependencyTestCaseNotAutomatic1.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,23 +6,18 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="InterceptedAdvice"
- class="org.jboss.test.microcontainer.support.InterceptorWithDependency"
- pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.MarkerInterface}->*(..))">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.InterceptorWithDependency">
<property name="simpleBean"><inject bean="Dependency"/></property>
- </aop:aspect>
+ </aop:interceptor>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.MarkerInterface}->*(..))">
+ <interceptor-ref name="InterceptedAdvice"/>
+ </bind>
+
+ <introduction xmlns="urn:jboss:aop-beans:1.0" class="@org.jboss.test.microcontainer.support.Test">
+ <interfaces>org.jboss.test.microcontainer.support.MarkerInterface</interfaces>
+ </introduction>
- <bean name="MarkerIntroduction" class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
- <property name="classes">@org.jboss.test.microcontainer.support.Test</property>
- <property name="interfaces">
- <list elementClass="java.lang.String">
- <value>org.jboss.test.microcontainer.support.MarkerInterface</value>
- </list>
- </property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
<bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl">
<annotation>@org.jboss.test.microcontainer.support.Test</annotation>
</bean>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/JMXDecoratedTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/JMXDecoratedTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/JMXDecoratedTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -10,46 +10,26 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <beanfactory name="JMXAdvice" class="org.jboss.aop.microcontainer.aspects.jmx.JMXIntroduction">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="JMXAspect" class="org.jboss.aop.microcontainer.aspects.jmx.JMXIntroduction">
<property name="mbeanServer"><inject bean="MBeanServer"/></property>
- </beanfactory>
-
- <beanfactory name="MetaDataContextAdvice" class="org.jboss.test.microcontainer.support.MetaDataContextInterceptor">
+ </aop:interceptor>
+
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="MetaDataContextAspect" class="org.jboss.test.microcontainer.support.MetaDataContextInterceptor">
<property name="annotation">org.jboss.aop.microcontainer.aspects.jmx.JMX</property>
- </beanfactory>
+ </aop:interceptor>
+
+ <introduction xmlns="urn:jboss:aop-beans:1.0" class="@org.jboss.aop.microcontainer.aspects.jmx.JMX">
+ <interfaces>org.jboss.kernel.spi.dependency.KernelControllerContextAware</interfaces>
+ </introduction>
- <bean name="JMXAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="JMXAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.kernel.spi.dependency.KernelControllerContextAware}->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))">
+ <interceptor-ref name="JMXAspect"/>
+ </bind>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.support.SimpleBeanImpl->*(..))">
+ <interceptor-ref name="MetaDataContextAspect"/>
+ </bind>
- <bean name="MetaDataContextAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="MetaDataContextAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <bean name="JMXIntroduction" class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
- <property name="classes">@org.jboss.aop.microcontainer.aspects.jmx.JMX</property>
- <property name="interfaces">
- <list elementClass="java.lang.String">
- <value>org.jboss.kernel.spi.dependency.KernelControllerContextAware</value>
- </list>
- </property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <bean name="JMXBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* $instanceof{org.jboss.kernel.spi.dependency.KernelControllerContextAware}->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))</property>
- <property name="aspect"><inject bean="JMXAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <bean name="MetaDataContextBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* org.jboss.test.microcontainer.support.SimpleBeanImpl->*(..))</property>
- <property name="aspect"><inject bean="MetaDataContextAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
<bean name="Bean" class="org.jboss.test.microcontainer.support.SimpleBeanImpl">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="", exposedInterface=org.jboss.test.microcontainer.support.SimpleBean.class)</annotation>
</bean>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/JndiDecoratedTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/JndiDecoratedTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/JndiDecoratedTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,37 +6,22 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <!-- Define the jndi binding advice -->
- <beanfactory name="JndiAdvice" class="org.jboss.aop.microcontainer.aspects.jndi.JndiIntroduction">
- <property name="env">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="JndiAspect" class="org.jboss.aop.microcontainer.aspects.jndi.JndiIntroduction">
+ <property name="env">
<map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>java.naming.factory.initial</key><value>org.jboss.test.microcontainer.support.jndi.MockInitialContextFactory</value></entry>
</map>
- </property>
- </beanfactory>
-
- <bean name="JndiAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="JndiAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <!-- Introduce the KernelControllerContextAware interface to the JndiBinding annotation -->
- <bean name="JndiIntroduction" class="org.jboss.aop.microcontainer.beans.IntroductionBinding">
- <property name="classes">@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding</property>
- <property name="interfaces">
- <list elementClass="java.lang.String">
- <value>org.jboss.kernel.spi.dependency.KernelControllerContextAware</value>
- </list>
</property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
+ </aop:interceptor>
+
+ <introduction xmlns="urn:jboss:aop-beans:1.0" class="@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding">
+ <interfaces>org.jboss.kernel.spi.dependency.KernelControllerContextAware</interfaces>
+ </introduction>
- <!-- Apply the jndi binding to all KernelControllerContextAware interface callbacks -->
- <bean name="JndiBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* $instanceof{org.jboss.kernel.spi.dependency.KernelControllerContextAware}->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))</property>
- <property name="aspect"><inject bean="JndiAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.kernel.spi.dependency.KernelControllerContextAware}->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))">
+ <interceptor-ref name="JndiAspect"/>
+ </bind>
+
<bean name="Bean" class="org.jboss.test.microcontainer.support.jndi.SimpleBean">
<annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="beans/SimpleBean0", aliases={"beans/XmlAnnotatedSimpleBean0"})</annotation>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/MetaDataTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/MetaDataTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/MetaDataTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -6,21 +6,14 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <beanfactory name="MetaDataContextAdvice" class="org.jboss.test.microcontainer.support.MetaDataContextInterceptor">
+ <aop:interceptor xmlns:aop="urn:jboss:aop-beans:1.0" name="MetaDataContextAspect" class="org.jboss.test.microcontainer.support.MetaDataContextInterceptor">
<property name="annotation">org.jboss.test.microcontainer.support.Test</property>
- </beanfactory>
+ </aop:interceptor>
- <bean name="MetaDataContextAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="MetaDataContextAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* org.jboss.test.microcontainer.support.PropertyBean->*(..))">
+ <interceptor-ref name="MetaDataContextAspect"/>
+ </bind>
- <bean name="MetaDataContextBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* org.jboss.test.microcontainer.support.PropertyBean->*(..))</property>
- <property name="aspect"><inject bean="MetaDataContextAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
<bean name="Bean" class="org.jboss.test.microcontainer.support.PropertyBean">
<annotation>@org.jboss.test.microcontainer.support.Test</annotation>
<property name="intProperty">5</property>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/MixinTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/MixinTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/MixinTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -10,28 +10,17 @@
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
- <bean name="SomeMixin" class="org.jboss.aop.microcontainer.beans.MixinBinding">
- <property name="classes">@org.jboss.test.microcontainer.support.Test</property>
- <property name="interfaces">
- <list elementClass="java.lang.String">
- <value>org.jboss.test.microcontainer.support.SomeMixin</value>
- </list>
- </property>
- <property name="mixin">org.jboss.test.microcontainer.support.SomeMixinImpl</property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
+ <introduction xmlns="urn:jboss:aop-beans:1.0" class="@org.jboss.test.microcontainer.support.Test">
+ <mixin>
+ <interfaces>org.jboss.test.microcontainer.support.SomeMixin</interfaces>
+ <class>org.jboss.test.microcontainer.support.SomeMixinImpl</class>
+ </mixin>
+ <mixin>
+ <interfaces>org.jboss.test.microcontainer.support.OtherMixin</interfaces>
+ <class>org.jboss.test.microcontainer.support.OtherMixinImpl</class>
+ </mixin>
+ </introduction>
- <bean name="OtherMixin" class="org.jboss.aop.microcontainer.beans.MixinBinding">
- <property name="classes">@org.jboss.test.microcontainer.support.Test</property>
- <property name="interfaces">
- <list elementClass="java.lang.String">
- <value>org.jboss.test.microcontainer.support.OtherMixin</value>
- </list>
- </property>
- <property name="mixin">org.jboss.test.microcontainer.support.OtherMixinImpl</property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
<bean name="Bean" class="org.jboss.test.microcontainer.support.SimpleBeanImpl">
<annotation>@org.jboss.test.microcontainer.support.Test</annotation>
</bean>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/SimpleAspectTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/SimpleAspectTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/SimpleAspectTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -5,28 +5,17 @@
<bean name="AspectManager" class="org.jboss.aop.AspectManager">
<constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
</bean>
+
+ <aspect xmlns="urn:jboss:aop-beans:1.0" name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.TestAspect"/>
- <beanfactory name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.TestAspect"/>
-
- <bean name="InterceptedAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="InterceptedAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <bean name="FooBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->someMethod(..))</property>
- <property name="aspect"><inject bean="InterceptedAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- <property name="method">foo</property>
- </bean>
-
- <bean name="BarBinding" class="org.jboss.aop.microcontainer.beans.AspectBinding">
- <property name="pointcut">execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->someOtherMethod(..))</property>
- <property name="aspect"><inject bean="InterceptedAspect" property="definition"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- <property name="method">bar</property>
- </bean>
-
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->someMethod(..))">
+ <advice aspect="InterceptedAdvice" name="foo"/>
+ </bind>
+
+ <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->someOtherMethod(..))">
+ <advice aspect="InterceptedAdvice" name="bar"/>
+ </bind>
+
<bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl"/>
</deployment>
Deleted: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/SimpleAspectUseCaseXmlTestCase.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/SimpleAspectUseCaseXmlTestCase.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/test/SimpleAspectUseCaseXmlTestCase.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="AspectManager" class="org.jboss.aop.AspectManager">
- <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/>
- </bean>
-
- <beanfactory name="InterceptedAdvice" class="org.jboss.test.microcontainer.support.TestAspect"/>
-
- <bean name="InterceptedAspect" class="org.jboss.aop.microcontainer.beans.Aspect">
- <property name="advice"><inject bean="InterceptedAdvice"/></property>
- <property name="manager"><inject bean="AspectManager"/></property>
- </bean>
-
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="FooAdvice"
- class="org.jboss.test.microcontainer.support.TestAspect"
- method="foo"
- pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->someMethod(..))">
- </aop:aspect>
- <aop:aspect xmlns:aop="urn:jboss:aop-beans:1.0"
- name="BarAdvice"
- class="org.jboss.test.microcontainer.support.TestAspect"
- method="bar"
- pointcut="execution(* $instanceof{org.jboss.test.microcontainer.support.SimpleBean}->someOtherMethod(..))">
- </aop:aspect>
-
- <bean name="Intercepted" class="org.jboss.test.microcontainer.support.SimpleBeanImpl"/>
-
-</deployment>
Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/xml/test/Aspect.xml
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/xml/test/Aspect.xml 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/tests/org/jboss/test/microcontainer/xml/test/Aspect.xml 2007-11-23 00:19:15 UTC (rev 67390)
@@ -2,6 +2,6 @@
<aspect xmlns="urn:jboss:aop-beans:1.0"
xmlns:mc="urn:jboss:bean-deployer:2.0"
- name="TestAspect" class="TestClass">
+ name="TestAspect" class="TestClass" scope="PER_VM">
<mc:property name="testProperty">Hello</mc:property>
</aspect>
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Annotation1.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Annotation1.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Annotation1.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,31 @@
+/*
+* 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.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public @interface Annotation1 {
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Annotation2.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Annotation2.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Annotation2.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,31 @@
+/*
+* 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.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public @interface Annotation2 {
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Dependency.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Dependency.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Dependency.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Dependency
+{
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/DynamicCFlowImpl.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/DynamicCFlowImpl.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/DynamicCFlowImpl.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,41 @@
+/*
+* 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.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.pointcut.DynamicCFlow;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DynamicCFlowImpl implements DynamicCFlow
+{
+ public static boolean execute = false;
+
+ public boolean shouldExecute(Invocation invocation)
+ {
+ return execute;
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Interceptions.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Interceptions.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/Interceptions.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,50 @@
+/*
+* 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.microcontainer.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Interceptions
+{
+ private static List interceptions = new ArrayList();
+
+ public static void add(Object o)
+ {
+ interceptions.add(o);
+ }
+
+ public static List interceptions()
+ {
+ return interceptions;
+ }
+
+ public static void reset()
+ {
+ interceptions.clear();
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/IntroductionInterface.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/IntroductionInterface.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/IntroductionInterface.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface IntroductionInterface
+{
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/LightweightAspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/LightweightAspect.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/LightweightAspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans;
+
+import org.jboss.aop.advice.annotation.Thrown;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class LightweightAspect
+{
+ public void before()
+ {
+ Interceptions.add("BEFORE");
+ }
+
+ public void after()
+ {
+ Interceptions.add("AFTER");
+ }
+
+ public void throwing(@Thrown Throwable t)
+ {
+ Interceptions.add("THROWING");
+ }
+
+ public void finaly()
+ {
+ Interceptions.add("FINALLY");
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/MixinImpl.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/MixinImpl.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/MixinImpl.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,46 @@
+/*
+* 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.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MixinImpl implements MixinInterface
+{
+ private String mixinValue = "DEFAULT";
+
+ public MixinImpl(POJO pojo, String value)
+ {
+ this.mixinValue = value;
+ }
+
+ public MixinImpl()
+ {
+ }
+
+ public String getMixinValue()
+ {
+ return mixinValue;
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/MixinInterface.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/MixinInterface.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/MixinInterface.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface MixinInterface
+{
+ String getMixinValue();
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/POJO.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/POJO.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/POJO.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJO
+{
+ public int method(int i)
+ {
+ return i * 2;
+ }
+
+ public void method()
+ {
+
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/POJO2.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/POJO2.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/POJO2.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJO2
+{
+ public int method(int i)
+ {
+ return i * 2;
+ }
+
+ public void method()
+ {
+
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerClassAspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerClassAspect.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerClassAspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,41 @@
+/*
+* 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.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerClassAspect
+{
+ public static PerClassAspect last;
+
+ public Object advice(MethodInvocation mi) throws Throwable
+ {
+ last = this;
+ return mi.invokeNext();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerClassJoinPointAspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerClassJoinPointAspect.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerClassJoinPointAspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,41 @@
+/*
+* 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.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerClassJoinPointAspect
+{
+ public static PerClassJoinPointAspect last;
+
+ public Object advice(MethodInvocation mi) throws Throwable
+ {
+ last = this;
+ return mi.invokeNext();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerInstanceAspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerInstanceAspect.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerInstanceAspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,41 @@
+/*
+* 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.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerInstanceAspect
+{
+ public static PerInstanceAspect last;
+
+ public Object advice(MethodInvocation mi) throws Throwable
+ {
+ last = this;
+ return mi.invokeNext();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerJoinPointAspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerJoinPointAspect.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerJoinPointAspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerJoinPointAspect
+{
+ public static PerJoinPointAspect last;
+
+ public Object advice(MethodInvocation mi) throws Throwable
+ {
+ last = this;
+ return mi.invokeNext();
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerVmAspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerVmAspect.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/PerVmAspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,41 @@
+/*
+* 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.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerVmAspect
+{
+ public static PerVmAspect last;
+
+ public Object advice(MethodInvocation mi) throws Throwable
+ {
+ last = this;
+ return mi.invokeNext();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleAspectFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleAspectFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleAspectFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,66 @@
+/*
+* 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.microcontainer.beans;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.InstanceAdvisor;
+import org.jboss.aop.advice.AspectFactory;
+import org.jboss.aop.joinpoint.Joinpoint;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SimpleAspectFactory implements AspectFactory
+{
+ public Object createPerClass(Advisor advisor)
+ {
+ throw new RuntimeException("PER_VM only");
+ }
+
+ public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)
+ {
+ throw new RuntimeException("PER_VM only");
+ }
+
+ public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
+ {
+ throw new RuntimeException("PER_VM only");
+ }
+
+ public Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
+ {
+ throw new RuntimeException("PER_VM only");
+ }
+
+ public Object createPerVM()
+ {
+ return new SimpleFactoryAspect(100);
+ }
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleFactoryAspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleFactoryAspect.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleFactoryAspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SimpleFactoryAspect
+{
+ public static int invoked;
+ private int i;
+
+ public SimpleFactoryAspect(int i)
+ {
+ this.i = i;
+ }
+
+ public Object advice(MethodInvocation inv) throws Throwable
+ {
+ invoked = this.i;
+ return inv.invokeNext();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleFactoryInterceptor.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleFactoryInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleFactoryInterceptor.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SimpleFactoryInterceptor implements Interceptor
+{
+ public static int invoked;
+ private int i;
+
+ public SimpleFactoryInterceptor(int i)
+ {
+ this.i = i;
+ }
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ invoked = this.i;
+ return invocation.invokeNext();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleInterceptorFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleInterceptorFactory.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/SimpleInterceptorFactory.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,66 @@
+/*
+* 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.microcontainer.beans;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.InstanceAdvisor;
+import org.jboss.aop.advice.AspectFactory;
+import org.jboss.aop.joinpoint.Joinpoint;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SimpleInterceptorFactory implements AspectFactory
+{
+ public Object createPerClass(Advisor advisor)
+ {
+ throw new RuntimeException("PER_VM only");
+ }
+
+ public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)
+ {
+ throw new RuntimeException("PER_VM only");
+ }
+
+ public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
+ {
+ throw new RuntimeException("PER_VM only");
+ }
+
+ public Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
+ {
+ throw new RuntimeException("PER_VM only");
+ }
+
+ public Object createPerVM()
+ {
+ return new SimpleFactoryInterceptor(100);
+ }
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspect.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,41 @@
+/*
+* 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.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAspect
+{
+ public static boolean invoked;
+
+ public Object advice(MethodInvocation inv) throws Throwable
+ {
+ Interceptions.add(this);
+ invoked = true;
+ return inv.invokeNext();
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspectWithDependency.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspectWithDependency.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspectWithDependency.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAspectWithDependency
+{
+ public static int called;
+ public static Object invoked;
+ public static TestAspectWithDependency last;
+
+ public Dependency dependency;
+
+ public Dependency getDependency()
+ {
+ return dependency;
+ }
+
+ public void setDependency(Dependency dependency)
+ {
+ this.dependency = dependency;
+ }
+
+ public Object advice(MethodInvocation inv) throws Throwable
+ {
+ called++;
+ invoked = dependency;
+ last = this;
+ return inv.invokeNext();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspectWithProperty.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspectWithProperty.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestAspectWithProperty.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAspectWithProperty
+{
+ public static TestAspectWithProperty last;
+
+ private String someProperty;
+
+ public String getSomeProperty()
+ {
+ return someProperty;
+ }
+
+ public void setSomeProperty(String someProperty)
+ {
+ this.someProperty = someProperty;
+ }
+
+ public Object advice(MethodInvocation inv) throws Throwable
+ {
+ last = this;
+ return inv.invokeNext();
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestClassMetaDataAspect.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestClassMetaDataAspect.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestClassMetaDataAspect.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestClassMetaDataAspect
+{
+ public static boolean invoked;
+ public static String last;
+
+ public Object advice(Invocation inv) throws Throwable
+ {
+ Interceptions.add(this);
+ invoked = true;
+ last = (String)inv.getMetaData("SomeTag", "data");
+ return inv.invokeNext();
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestInterceptor.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestInterceptor.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestInterceptor.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestInterceptor implements Interceptor
+{
+ public static boolean invoked;
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ Interceptions.add(this);
+ invoked = true;
+ return invocation.invokeNext();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestInterceptorWithDependency.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestInterceptorWithDependency.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestInterceptorWithDependency.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,61 @@
+/*
+* 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.microcontainer.beans;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestInterceptorWithDependency implements Interceptor
+{
+ public static int called;
+ public static Object invoked;
+
+ public Dependency dependency;
+
+ public Dependency getDependency()
+ {
+ return dependency;
+ }
+
+ public void setDependency(Dependency dependency)
+ {
+ this.dependency = dependency;
+ }
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ called++;
+ invoked = dependency;
+ return invocation.invokeNext();
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestMetaDataBinding.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestMetaDataBinding.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestMetaDataBinding.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans;
+
+import org.jboss.aop.metadata.ClassMetaDataBinding;
+import org.jboss.aop.metadata.ClassMetaDataLoader;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision$
+ */
+public class TestMetaDataBinding extends ClassMetaDataBinding
+{
+ String data;
+
+ public TestMetaDataBinding(ClassMetaDataLoader loader, String name, String tag, String exp)
+ {
+ super(loader, name, tag, exp);
+ }
+
+ public String getData()
+ {
+ return data;
+ }
+
+ public void setData(String data)
+ {
+ this.data = data;
+ }
+
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestMetaDataLoader.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestMetaDataLoader.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/TestMetaDataLoader.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,80 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import javassist.CtConstructor;
+import javassist.CtField;
+import javassist.CtMethod;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.metadata.ClassMetaDataBinding;
+import org.jboss.aop.metadata.ClassMetaDataLoader;
+import org.jboss.aop.util.XmlHelper;
+import org.w3c.dom.Element;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision$
+ */
+public class TestMetaDataLoader implements ClassMetaDataLoader
+{
+ public ClassMetaDataBinding importMetaData(Element element, String name, String tag, String classExpr) throws Exception
+ {
+ TestMetaDataBinding data = new TestMetaDataBinding(this, name, tag, classExpr);
+ String value = XmlHelper.getOptionalChildContent(element, "data");
+ data.setData(value);
+
+ return data;
+ }
+
+ public void bind(Advisor advisor, ClassMetaDataBinding data, CtMethod[] methods, CtField[] fields, CtConstructor[] constructors) throws Exception
+ {
+ for (int i = 0 ; i < methods.length ; i++)
+ {
+ advisor.getMethodMetaData().addMethodMetaData(methods[i], "SomeTag", "data", "M" + ((TestMetaDataBinding)data).getData());
+ }
+ for (int i = 0 ; i < constructors.length ; i++)
+ {
+ advisor.getConstructorMetaData().addConstructorMetaData(constructors[i], "SomeTag", "data", "C" + ((TestMetaDataBinding)data).getData());
+ }
+ }
+
+ public void bind(Advisor advisor, ClassMetaDataBinding data, Method[] methods, Field[] fields, Constructor[] constructors) throws Exception
+ {
+ for (int i = 0 ; i < methods.length ; i++)
+ {
+ advisor.getMethodMetaData().addMethodMetaData(methods[i], "SomeTag", "data", "M" + ((TestMetaDataBinding)data).getData());
+ }
+ for (int i = 0 ; i < constructors.length ; i++)
+ {
+ advisor.getConstructorMetaData().addConstructorMetaData(constructors[i], "SomeTag", "data", "C" + ((TestMetaDataBinding)data).getData());
+ }
+ }
+
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnotationOverrideAopTestCase extends AnnotationOverrideTest
+{
+ public static Test suite()
+ {
+ return suite(AnnotationOverrideAopTestCase.class);
+ }
+
+ public AnnotationOverrideAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnotationOverrideBeansTestCase extends AnnotationOverrideTest
+{
+ public static Test suite()
+ {
+ return suite(AnnotationOverrideBeansTestCase.class);
+ }
+
+ public AnnotationOverrideBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AnnotationOverrideTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnotationOverrideTest extends AOPMicrocontainerTest
+{
+
+ public AnnotationOverrideTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ TestAspect.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ pojo.method(2);
+ assertFalse(TestAspect.invoked);
+
+ pojo.method();
+ assertTrue(TestAspect.invoked);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectFactorySimpleAopTestCase extends AspectFactorySimpleTest
+{
+ public static Test suite()
+ {
+ return suite(AspectFactorySimpleAopTestCase.class);
+ }
+
+ public AspectFactorySimpleAopTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectFactorySimpleBeansTestCase extends AspectFactorySimpleTest
+{
+ public static Test suite()
+ {
+ return suite(AspectFactorySimpleBeansTestCase.class);
+ }
+
+ public AspectFactorySimpleBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectFactorySimpleTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.SimpleFactoryAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectFactorySimpleTest extends AOPMicrocontainerTest
+{
+
+ public AspectFactorySimpleTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ SimpleFactoryAspect.invoked = 0;
+ POJO pojo = (POJO)getBean("Bean");
+ int ret = pojo.method(2);
+ assertEquals(4, ret);
+ assertTrue(SimpleFactoryAspect.invoked == 100);
+ }
+
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectSimpleAopTestCase extends AspectSimpleTest
+{
+
+ public static Test suite()
+ {
+ return suite(AspectSimpleAopTestCase.class);
+ }
+
+ public AspectSimpleAopTestCase(String name)
+ {
+ super(name);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectSimpleBeansTestCase extends AspectSimpleTest
+{
+ public static Test suite()
+ {
+ return suite(AspectSimpleBeansTestCase.class);
+ }
+
+ public AspectSimpleBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectSimpleTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,49 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectSimpleTest extends AOPMicrocontainerTest
+{
+ public AspectSimpleTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ TestAspect.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ int ret = pojo.method(2);
+ assertEquals(4, ret);
+ assertTrue(TestAspect.invoked);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectWithDependencyAopDifferentOrderTestCase extends AspectWithDependencyAopTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new AspectWithDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new AspectWithDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public AspectWithDependencyAopDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectWithDependencyAopTestCase extends AspectWithDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(AspectWithDependencyAopTestCase.class);
+ }
+
+ public AspectWithDependencyAopTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "AspectWithDependencyAopTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "AspectWithDependencyAopTestCaseNotAutomatic1.xml";
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectWithDependencyBeansDifferentOrderTestCase extends AspectWithDependencyBeansTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new AspectWithDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new AspectWithDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public AspectWithDependencyBeansDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AspectWithDependencyBeansTestCase extends AspectWithDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(AspectWithDependencyBeansTestCase.class);
+ }
+
+ public AspectWithDependencyBeansTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "AspectWithDependencyBeansTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "AspectWithDependencyBeansTestCaseNotAutomatic1.xml";
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/AspectWithDependencyTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,227 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.test.microcontainer.beans.Dependency;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspectWithDependency;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class AspectWithDependencyTest extends AOPMicrocontainerTest
+{
+
+ public AspectWithDependencyTest(String name)
+ {
+ super(name);
+ }
+
+ protected abstract String getFile0();
+
+ protected abstract String getFile1();
+
+ public void testInterceptorWithDependencyCorrectOrder() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ validate();
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertNotNull(TestAspectWithDependency.invoked);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+ public void testInterceptorWithDependencyWrongOrder() throws Exception
+ {
+ deploy(getFile1());
+ try
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("'Interceped' should not be installed yet");
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ pojo = (POJO) getBean("Intercepted", ControllerState.DESCRIBED);
+ assertNull("This should not be deployed until the interceptor is", pojo);
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy() throws Exception
+ {
+ deploy(getFile1());
+ try
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("Bean should not be installed until the dependency is");
+ }
+ catch (IllegalStateException expected)
+ {
+ KernelControllerContext context = getControllerContext("Intercepted", ControllerState.DESCRIBED);
+ assertNotNull(context);
+ }
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("Bean should not be installed after the dependency is undeployed");
+ }
+ catch (IllegalStateException expected)
+ {
+ KernelControllerContext context = getControllerContext("Intercepted", ControllerState.DESCRIBED);
+ assertNotNull(context);
+ }
+
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ int called = TestAspectWithDependency.called;
+ pojo.method(2);
+ assertTrue("Interceptor was not rebound", called + 1 == TestAspectWithDependency.called);
+ assertTrue("Should not be caching the interceptor/dependency across rebinding", dependency == TestAspectWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy2() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ validate();
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+
+ dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class CFlowAopTestCase extends CFlowTest
+{
+ public static Test suite()
+ {
+ return suite(CFlowAopTestCase.class);
+ }
+
+ public CFlowAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class CFlowBeansTestCase extends CFlowTest
+{
+ public static Test suite()
+ {
+ return suite(CFlowBeansTestCase.class);
+ }
+
+ public CFlowBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/CFlowTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,63 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class CFlowTest extends AOPMicrocontainerTest
+{
+
+ public CFlowTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ POJO pojo = (POJO)getBean("Bean");
+ TestAspect.invoked = false;
+ callPOJO(pojo);
+ assertTrue(TestAspect.invoked);
+
+ TestAspect.invoked = false;
+ notCallPOJO(pojo);
+ assertFalse(TestAspect.invoked);
+ }
+
+ private void callPOJO(POJO pojo)
+ {
+ pojo.method();
+ }
+
+ private void notCallPOJO(POJO pojo)
+ {
+ callPOJO(pojo);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,67 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestClassMetaDataAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClassMetaDataBeansTestCase extends AOPMicrocontainerTest
+{
+ public void testMetaData() throws Exception
+ {
+ POJO pojo = (POJO)getBean("Bean");
+ assertNotNull(pojo);
+
+ assertTrue(TestClassMetaDataAspect.invoked);
+ assertEquals("ctor", TestClassMetaDataAspect.last);
+
+ TestClassMetaDataAspect.invoked = false;
+ TestClassMetaDataAspect.last = null;
+ pojo.method(2);
+ assertTrue(TestClassMetaDataAspect.invoked);
+ assertEquals("method1", TestClassMetaDataAspect.last);
+
+ TestClassMetaDataAspect.invoked = false;
+ TestClassMetaDataAspect.last = null;
+ pojo.method();
+ assertTrue(TestClassMetaDataAspect.invoked);
+ assertEquals("method2", TestClassMetaDataAspect.last);
+ }
+
+ public static Test suite()
+ {
+ return suite(ClassMetaDataBeansTestCase.class);
+ }
+
+ public ClassMetaDataBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataLoaderBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataLoaderBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ClassMetaDataLoaderBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,67 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestClassMetaDataAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClassMetaDataLoaderBeansTestCase extends AOPMicrocontainerTest
+{
+ public void testMetaData() throws Exception
+ {
+ POJO pojo = (POJO)getBean("Bean");
+ assertNotNull(pojo);
+
+ assertTrue(TestClassMetaDataAspect.invoked);
+ assertEquals("Ccustom1", TestClassMetaDataAspect.last);
+
+ TestClassMetaDataAspect.invoked = false;
+ TestClassMetaDataAspect.last = null;
+ pojo.method(2);
+ assertTrue(TestClassMetaDataAspect.invoked);
+ assertEquals("Mcustom1", TestClassMetaDataAspect.last);
+
+ TestClassMetaDataAspect.invoked = false;
+ TestClassMetaDataAspect.last = null;
+ pojo.method();
+ assertTrue(TestClassMetaDataAspect.invoked);
+ assertEquals("Mcustom1", TestClassMetaDataAspect.last);
+ }
+
+ public static Test suite()
+ {
+ return suite(ClassMetaDataLoaderBeansTestCase.class);
+ }
+
+ public ClassMetaDataLoaderBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DynamicCFlowAopTestCase extends DynamicCFlowTest
+{
+ public static Test suite()
+ {
+ return suite(DynamicCFlowAopTestCase.class);
+ }
+
+ public DynamicCFlowAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DynamicCFlowBeansTestCase extends DynamicCFlowTest
+{
+ public static Test suite()
+ {
+ return suite(DynamicCFlowBeansTestCase.class);
+ }
+
+ public DynamicCFlowBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/DynamicCFlowTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.DynamicCFlowImpl;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class DynamicCFlowTest extends AOPMicrocontainerTest
+{
+
+ public DynamicCFlowTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ POJO pojo = (POJO)getBean("Bean");
+ TestAspect.invoked = false;
+ pojo.method();
+ assertFalse(TestAspect.invoked);
+
+ DynamicCFlowImpl.execute = true;
+ pojo.method();
+ assertTrue(TestAspect.invoked);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorFactorySimpleAopTestCase extends InterceptorFactorySimpleTest
+{
+ public static Test suite()
+ {
+ return suite(InterceptorFactorySimpleAopTestCase.class);
+ }
+
+ public InterceptorFactorySimpleAopTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorFactorySimpleBeansTestCase extends InterceptorFactorySimpleTest
+{
+ public static Test suite()
+ {
+ return suite(InterceptorFactorySimpleBeansTestCase.class);
+ }
+
+ public InterceptorFactorySimpleBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorFactorySimpleTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.SimpleFactoryInterceptor;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class InterceptorFactorySimpleTest extends AOPMicrocontainerTest
+{
+
+ public InterceptorFactorySimpleTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ TestAspect.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ int ret = pojo.method(2);
+ assertEquals(4, ret);
+ assertTrue(SimpleFactoryInterceptor.invoked == 100);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorSimpleAopTestCase extends InterceptorSimpleTest
+{
+
+ public static Test suite()
+ {
+ return suite(InterceptorSimpleAopTestCase.class);
+ }
+
+ public InterceptorSimpleAopTestCase(String name)
+ {
+ super(name);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorSimpleBeansTestCase extends InterceptorSimpleTest
+{
+ public static Test suite()
+ {
+ return suite(InterceptorSimpleBeansTestCase.class);
+ }
+
+ public InterceptorSimpleBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorSimpleTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,50 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestInterceptor;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class InterceptorSimpleTest extends AOPMicrocontainerTest
+{
+
+ public InterceptorSimpleTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ TestInterceptor.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ int ret = pojo.method(2);
+ assertEquals(4, ret);
+ assertTrue(TestInterceptor.invoked);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorWithDependencyAopDifferentOrderTestCase extends InterceptorWithDependencyAopTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new InterceptorWithDependencyAopTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new InterceptorWithDependencyAopTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public InterceptorWithDependencyAopDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorWithDependencyAopTestCase extends InterceptorWithDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(InterceptorWithDependencyAopTestCase.class);
+ }
+
+ public InterceptorWithDependencyAopTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "InterceptorWithDependencyAopTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "InterceptorWithDependencyAopTestCaseNotAutomatic1.xml";
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorWithDependencyBeansDifferentOrderTestCase extends InterceptorWithDependencyBeansTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new InterceptorWithDependencyBeansTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new InterceptorWithDependencyBeansTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public InterceptorWithDependencyBeansDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class InterceptorWithDependencyBeansTestCase extends InterceptorWithDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(InterceptorWithDependencyBeansTestCase.class);
+ }
+
+ public InterceptorWithDependencyBeansTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "InterceptorWithDependencyBeansTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "InterceptorWithDependencyBeansTestCaseNotAutomatic1.xml";
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/InterceptorWithDependencyTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,226 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.test.microcontainer.beans.Dependency;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestInterceptorWithDependency;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class InterceptorWithDependencyTest extends AOPMicrocontainerTest
+{
+
+ public InterceptorWithDependencyTest(String name)
+ {
+ super(name);
+ }
+
+ protected abstract String getFile0();
+ protected abstract String getFile1();
+
+ public void testInterceptorWithDependencyCorrectOrder() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ validate();
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertNotNull(TestInterceptorWithDependency.invoked);
+ assertTrue(dependency == TestInterceptorWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+ public void testInterceptorWithDependencyWrongOrder() throws Exception
+ {
+ deploy(getFile1());
+ try
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("'Interceped' should not be installed yet");
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ pojo = (POJO) getBean("Intercepted", ControllerState.DESCRIBED);
+ assertNull("This should not be deployed until the interceptor is", pojo);
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertTrue(dependency == TestInterceptorWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy() throws Exception
+ {
+ deploy(getFile1());
+ try
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("Bean should not be installed until the dependency is");
+ }
+ catch (IllegalStateException expected)
+ {
+ KernelControllerContext context = getControllerContext("Intercepted", ControllerState.DESCRIBED);
+ assertNotNull(context);
+ }
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertTrue(dependency == TestInterceptorWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("Bean should not be installed after the dependency is undeployed");
+ }
+ catch (IllegalStateException expected)
+ {
+ KernelControllerContext context = getControllerContext("Intercepted", ControllerState.DESCRIBED);
+ assertNotNull(context);
+ }
+
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ int called = TestInterceptorWithDependency.called;
+ pojo.method(2);
+ assertTrue("Interceptor was not rebound", called + 1 == TestInterceptorWithDependency.called);
+ assertTrue("Should not be caching the interceptor/dependency across rebinding", dependency == TestInterceptorWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy2() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ validate();
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertTrue(dependency == TestInterceptorWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+
+ dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ pojo.method(2);
+ assertTrue(dependency == TestInterceptorWithDependency.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class IntroductionClassesAopTestCase extends IntroductionClassesTest
+{
+ public static Test suite()
+ {
+ return suite(IntroductionClassesAopTestCase.class);
+ }
+
+ public IntroductionClassesAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class IntroductionClassesBeansTestCase extends IntroductionClassesTest
+{
+ public static Test suite()
+ {
+ return suite(IntroductionClassesBeansTestCase.class);
+ }
+
+ public IntroductionClassesBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionClassesTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.IntroductionInterface;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class IntroductionClassesTest extends AOPMicrocontainerTest
+{
+
+ public IntroductionClassesTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntroduced() throws Exception
+ {
+ TestAspect.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ assertTrue(pojo instanceof IntroductionInterface);
+ pojo.method();
+ assertTrue(TestAspect.invoked);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class IntroductionExprAopTestCase extends IntroductionExprTest
+{
+ public static Test suite()
+ {
+ return suite(IntroductionExprAopTestCase.class);
+ }
+
+ public IntroductionExprAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class IntroductionExprBeansTestCase extends IntroductionExprTest
+{
+ public static Test suite()
+ {
+ return suite(IntroductionExprBeansTestCase.class);
+ }
+
+ public IntroductionExprBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/IntroductionExprTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.IntroductionInterface;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class IntroductionExprTest extends AOPMicrocontainerTest
+{
+
+ public IntroductionExprTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntroduced() throws Exception
+ {
+ TestAspect.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ assertTrue(pojo instanceof IntroductionInterface);
+ pojo.method();
+ assertTrue(TestAspect.invoked);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,45 @@
+/*
+* 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.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class LightweightAspectAopTestCase extends LightweightAspectTest
+{
+ public static Test suite()
+ {
+ return suite(LightweightAspectAopTestCase.class);
+ }
+
+ public LightweightAspectAopTestCase(String test)
+ {
+ super(test);
+ }
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectBeanTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectBeanTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectBeanTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,45 @@
+/*
+* 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.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class LightweightAspectBeanTestCase extends LightweightAspectTest
+{
+ public static Test suite()
+ {
+ return suite(LightweightAspectBeanTestCase.class);
+ }
+
+ public LightweightAspectBeanTestCase(String test)
+ {
+ super(test);
+ }
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/LightweightAspectTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,104 @@
+/*
+* 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.microcontainer.beans.test;
+
+import java.util.List;
+
+import org.jboss.aop.Advised;
+import org.jboss.aop.advice.AdviceType;
+import org.jboss.aop.microcontainer.beans.AspectBinding;
+import org.jboss.aop.microcontainer.beans.BindingEntry;
+import org.jboss.aop.microcontainer.beans.InterceptorEntry;
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.aop.proxy.container.AspectManaged;
+import org.jboss.test.microcontainer.beans.Interceptions;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class LightweightAspectTest extends AOPMicrocontainerTest
+{
+
+ public LightweightAspectTest(String name)
+ {
+ super(name);
+ }
+
+ public void testBinding() throws Exception
+ {
+ AspectBinding binding = (AspectBinding)getBean("Binding");
+ assertNotNull(binding);
+ List<BindingEntry> entries = binding.getAdvices();
+ assertEquals(5, entries.size());
+ int i = 0;
+ for (BindingEntry entry : entries)
+ {
+ assertTrue(entry instanceof InterceptorEntry);
+ InterceptorEntry ie = (InterceptorEntry)entry;
+ i++;
+ switch (i)
+ {
+ case 1:
+ assertEquals(AdviceType.BEFORE, ie.getType());
+ break;
+ case 2:
+ assertEquals(AdviceType.AROUND, ie.getType());
+ break;
+ case 3:
+ assertEquals(AdviceType.AFTER, ie.getType());
+ break;
+ case 4:
+ assertEquals(AdviceType.THROWING, ie.getType());
+ break;
+ case 5:
+ assertEquals(AdviceType.FINALLY, ie.getType());
+ }
+ }
+ }
+
+// TODO this test should be run with weaving enabled
+// public void testWovenClass() throws Exception
+// {
+// POJO pojo = (POJO)getBean("Bean");
+// if (pojo instanceof AspectManaged == false && pojo instanceof Advised == false)
+// {
+// fail("POJO was neither proxied nor woven");
+// }
+//
+// if (pojo instanceof Advised)
+// {
+// //Only weaving supports B/A/T/F aspects
+// pojo.method();
+// assertTrue(TestAspect.invoked);
+// List interceptions = Interceptions.interceptions();
+// assertEquals(4, interceptions.size());
+// assertTrue(interceptions.contains("BEFORE"));
+// assertTrue(interceptions.contains("AFTER"));
+// assertTrue(interceptions.contains("FINALLY"));
+// }
+// }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MixinClassesAopTestCase extends MixinClassesTest
+{
+ public static Test suite()
+ {
+ return suite(MixinClassesAopTestCase.class);
+ }
+
+ public MixinClassesAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MixinClassesBeansTestCase extends MixinClassesTest
+{
+ public static Test suite()
+ {
+ return suite(MixinClassesBeansTestCase.class);
+ }
+
+ public MixinClassesBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinClassesTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.MixinInterface;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class MixinClassesTest extends AOPMicrocontainerTest
+{
+
+ public MixinClassesTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntroduced() throws Exception
+ {
+ TestAspect.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ assertTrue(pojo instanceof MixinInterface);
+ pojo.method();
+ assertTrue(TestAspect.invoked);
+ assertEquals("DEFAULT", ((MixinInterface)pojo).getMixinValue());
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MixinExprAopTestCase extends MixinExprTest
+{
+ public static Test suite()
+ {
+ return suite(MixinExprAopTestCase.class);
+ }
+
+ public MixinExprAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MixinExprBeansTestCase extends MixinExprTest
+{
+ public static Test suite()
+ {
+ return suite(MixinExprBeansTestCase.class);
+ }
+
+ public MixinExprBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MixinExprTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.MixinInterface;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class MixinExprTest extends AOPMicrocontainerTest
+{
+
+ public MixinExprTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntroduced() throws Exception
+ {
+ TestAspect.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ assertTrue(pojo instanceof MixinInterface);
+ pojo.method();
+ assertTrue(TestAspect.invoked);
+ assertEquals("CUSTOM CONSTRUCTION", ((MixinInterface)pojo).getMixinValue());
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,42 @@
+/*
+* 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.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdviceAopTestCase extends MultipleAdviceTest
+{
+ public static Test suite()
+ {
+ return suite(MultipleAdviceAopTestCase.class);
+ }
+
+ public MultipleAdviceAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdviceBeansTestCase extends MultipleAdviceTest
+{
+ public static Test suite()
+ {
+ return suite(MultipleAdviceBeansTestCase.class);
+ }
+
+ public MultipleAdviceBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdviceTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+import org.jboss.test.microcontainer.beans.TestInterceptor;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class MultipleAdviceTest extends AOPMicrocontainerTest
+{
+
+ public MultipleAdviceTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ TestAspect.invoked = false;
+ TestInterceptor.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ int ret = pojo.method(2);
+ assertEquals(4, ret);
+ assertTrue(TestAspect.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,49 @@
+/*
+* 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.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdvicesWithMultipleDependencyAopDifferentOrderTestCase
+ extends
+ MultipleAdvicesWithMultipleDependencyAopTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new MultipleAdvicesWithMultipleDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new MultipleAdvicesWithMultipleDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public MultipleAdvicesWithMultipleDependencyAopDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdvicesWithMultipleDependencyAopTestCase extends MultipleAdvicesWithMultipleDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(MultipleAdvicesWithMultipleDependencyAopTestCase.class);
+ }
+
+ public MultipleAdvicesWithMultipleDependencyAopTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ public String getFile0()
+ {
+ return "MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ public String getFile1()
+ {
+ return "MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic1.xml";
+ }
+
+ @Override
+ public String getFile2()
+ {
+ return "MultipleAdvicesWithMultipleDependencyAopTestCaseNotAutomatic2.xml";
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,49 @@
+/*
+* 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.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdvicesWithMultipleDependencyBeansDifferentOrderTestCase
+ extends
+ MultipleAdvicesWithMultipleDependencyBeansTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new MultipleAdvicesWithMultipleDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new MultipleAdvicesWithMultipleDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public MultipleAdvicesWithMultipleDependencyBeansDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdvicesWithMultipleDependencyBeansTestCase extends MultipleAdvicesWithMultipleDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(MultipleAdvicesWithMultipleDependencyBeansTestCase.class);
+ }
+
+ public MultipleAdvicesWithMultipleDependencyBeansTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ public String getFile0()
+ {
+ return "MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ public String getFile1()
+ {
+ return "MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic1.xml";
+ }
+
+ @Override
+ public String getFile2()
+ {
+ return "MultipleAdvicesWithMultipleDependencyBeansTestCaseNotAutomatic2.xml";
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithMultipleDependencyTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,337 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.test.microcontainer.beans.Dependency;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspectWithDependency;
+import org.jboss.test.microcontainer.beans.TestInterceptorWithDependency;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class MultipleAdvicesWithMultipleDependencyTest extends AOPMicrocontainerTest
+{
+
+ public MultipleAdvicesWithMultipleDependencyTest(String name)
+ {
+ super(name);
+ }
+
+ public abstract String getFile0();
+ public abstract String getFile1();
+ public abstract String getFile2();
+
+ public void testInterceptorWithDependencyCorrectOrder() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+ deploy(getFile1());
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+ try
+ {
+ deploy(getFile2());
+ try
+ {
+ validate();
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+ public void testInterceptorWithDependencyWrongOrder() throws Exception
+ {
+ deploy(getFile2());
+ try
+ {
+ checkNoIntercepted1();
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+ checkIntercepted1(dependency1);
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+
+ deploy(getFile1());
+ try
+ {
+ validate();
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy() throws Exception
+ {
+ deploy(getFile2());
+ try
+ {
+ checkNoIntercepted1();
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+
+ checkIntercepted1(dependency1);
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+
+ deploy(getFile1());
+ try
+ {
+ validate();
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+
+ checkNoIntercepted1();
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+
+ deploy(getFile1());
+ try
+ {
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+
+ checkNoIntercepted1();
+ checkIntercepted2(dependency2);
+ checkNoIntercepted3();
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy2() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+ deploy(getFile1());
+ try
+ {
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+ deploy(getFile2());
+ try
+ {
+ validate();
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+
+ assertNotNull(dependency1);
+ deploy(getFile1());
+ try
+ {
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+ deploy(getFile2());
+ try
+ {
+ validate();
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+ private void checkIntercepted1(Dependency dependency1)
+ {
+ POJO pojo1 = (POJO) getBean("Intercepted1");
+ assertNotNull(pojo1);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptorWithDependency.invoked = null;
+ pojo1.method(2);
+ assertNotNull(TestAspectWithDependency.invoked);
+ assertTrue(dependency1 == TestAspectWithDependency.invoked);
+ assertNull(TestInterceptorWithDependency.invoked);
+ }
+
+ private void checkIntercepted2(Dependency dependency2)
+ {
+ POJO pojo2 = (POJO) getBean("Intercepted2");
+ assertNotNull(pojo2);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptorWithDependency.invoked = null;
+ pojo2.method(2);
+ assertNull(TestAspectWithDependency.invoked);
+ assertNotNull(TestInterceptorWithDependency.invoked);
+ System.out.println(TestInterceptorWithDependency.invoked);
+ assertTrue(dependency2 == TestInterceptorWithDependency.invoked);
+ }
+
+ private void checkIntercepted3(Dependency dependency1, Dependency dependency2)
+ {
+ POJO pojo3 = (POJO) getBean("Intercepted3");
+ assertNotNull(pojo3);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptorWithDependency.invoked = null;
+ pojo3.method(2);
+ assertNotNull(TestAspectWithDependency.invoked);
+ assertTrue(dependency1 == TestAspectWithDependency.invoked);
+ assertNotNull(TestInterceptorWithDependency.invoked);
+ assertTrue(dependency2 == TestInterceptorWithDependency.invoked);
+ }
+
+ private void checkNoIntercepted1()
+ {
+ checkNoIntercepted("Intercepted1");
+ }
+
+ private void checkNoIntercepted2()
+ {
+ checkNoIntercepted("Intercepted2");
+ }
+
+ private void checkNoIntercepted3()
+ {
+ checkNoIntercepted("Intercepted3");
+ }
+
+ private void checkNoIntercepted(String name)
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean(name);
+ fail("'" + name + "' should not be installed yet");
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ pojo = (POJO) getBean(name, ControllerState.DESCRIBED);
+ assertNull(name + " should not be deployed until the interceptor is", pojo);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,49 @@
+/*
+* 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.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdvicesWithSingleDependencyAopDifferentOrderTestCase
+ extends
+ MultipleAdvicesWithSingleDependencyAopTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new MultipleAdvicesWithSingleDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new MultipleAdvicesWithSingleDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public MultipleAdvicesWithSingleDependencyAopDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdvicesWithSingleDependencyAopTestCase extends MultipleAdvicesWithSingleDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(MultipleAdvicesWithSingleDependencyAopTestCase.class);
+ }
+
+ public MultipleAdvicesWithSingleDependencyAopTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "MultipleAdvicesWithSingleDependencyAopTestCaseNotAutomatic1.xml";
+ }
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,49 @@
+/*
+* 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.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdvicesWithSingleDependencyBeansDifferentOrderTestCase
+ extends
+ MultipleAdvicesWithSingleDependencyBeansTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new MultipleAdvicesWithSingleDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new MultipleAdvicesWithSingleDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public MultipleAdvicesWithSingleDependencyBeansDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleAdvicesWithSingleDependencyBeansTestCase extends MultipleAdvicesWithSingleDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(MultipleAdvicesWithSingleDependencyBeansTestCase.class);
+ }
+
+ public MultipleAdvicesWithSingleDependencyBeansTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "MultipleAdvicesWithSingleDependencyBeansTestCaseNotAutomatic1.xml";
+ }
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleAdvicesWithSingleDependencyTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,244 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.test.microcontainer.beans.Dependency;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspectWithDependency;
+import org.jboss.test.microcontainer.beans.TestInterceptor;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class MultipleAdvicesWithSingleDependencyTest extends AOPMicrocontainerTest
+{
+
+ public MultipleAdvicesWithSingleDependencyTest(String name)
+ {
+ super(name);
+ }
+
+ protected abstract String getFile0();
+ protected abstract String getFile1();
+
+ public void testInterceptorWithDependencyCorrectOrder() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ validate();
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertNotNull(TestAspectWithDependency.invoked);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+ public void testInterceptorWithDependencyWrongOrder() throws Exception
+ {
+ deploy(getFile1());
+ try
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("'Interceped' should not be installed yet");
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ pojo = (POJO) getBean("Intercepted", ControllerState.DESCRIBED);
+ assertNull("This should not be deployed until the interceptor is", pojo);
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy() throws Exception
+ {
+ deploy(getFile1());
+ try
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("Bean should not be installed until the dependency is");
+ }
+ catch (IllegalStateException expected)
+ {
+ KernelControllerContext context = getControllerContext("Intercepted", ControllerState.DESCRIBED);
+ assertNotNull(context);
+ }
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("Bean should not be installed after the dependency is undeployed");
+ }
+ catch (IllegalStateException expected)
+ {
+ KernelControllerContext context = getControllerContext("Intercepted", ControllerState.DESCRIBED);
+ assertNotNull(context);
+ }
+
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ int called = TestAspectWithDependency.called;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue("Interceptor was not rebound", called + 1 == TestAspectWithDependency.called);
+ assertTrue("Should not be caching the interceptor/dependency across rebinding", dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy2() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ validate();
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+
+ dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleStackAopTestCase extends MultipleStackTest
+{
+ public static Test suite()
+ {
+ return suite(MultipleStackAopTestCase.class);
+ }
+
+ public MultipleStackAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MultipleStackBeansTestCase extends MultipleStackTest
+{
+ public static Test suite()
+ {
+ return suite(MultipleStackBeansTestCase.class);
+ }
+
+ public MultipleStackBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/MultipleStackTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,59 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.SimpleFactoryAspect;
+import org.jboss.test.microcontainer.beans.SimpleFactoryInterceptor;
+import org.jboss.test.microcontainer.beans.TestAspect;
+import org.jboss.test.microcontainer.beans.TestInterceptor;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class MultipleStackTest extends AOPMicrocontainerTest
+{
+
+ public MultipleStackTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ TestAspect.invoked = false;
+ SimpleFactoryAspect.invoked = 0;
+ TestInterceptor.invoked = false;
+ SimpleFactoryInterceptor.invoked = 0;
+ POJO pojo = (POJO)getBean("Bean");
+ int ret = pojo.method(2);
+ assertEquals(4, ret);
+ assertTrue(SimpleFactoryAspect.invoked == 100);
+ assertTrue(TestAspect.invoked);
+ assertTrue(SimpleFactoryInterceptor.invoked == 100);
+ assertTrue(TestInterceptor.invoked);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class NamedPointcutAopTestCase extends NamedPointcutTest
+{
+ public static Test suite()
+ {
+ return suite(NamedPointcutAopTestCase.class);
+ }
+
+ public NamedPointcutAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class NamedPointcutBeansTestCase extends NamedPointcutTest
+{
+ public static Test suite()
+ {
+ return suite(NamedPointcutBeansTestCase.class);
+ }
+
+ public NamedPointcutBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NamedPointcutTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class NamedPointcutTest extends AOPMicrocontainerTest
+{
+
+ public NamedPointcutTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ TestAspect.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ pojo.method(2);
+ assertFalse(TestAspect.invoked);
+
+ pojo.method();
+ assertTrue(TestAspect.invoked);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class NonStandardNameAspectAopTestCase extends NonStandardNameAspectTest
+{
+ public static Test suite()
+ {
+ return suite(NonStandardNameAspectAopTestCase.class);
+ }
+
+ public NonStandardNameAspectAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class NonStandardNameAspectBeansTestCase extends NonStandardNameAspectTest
+{
+ public static Test suite()
+ {
+ return suite(NonStandardNameAspectBeansTestCase.class);
+ }
+
+ public NonStandardNameAspectBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/NonStandardNameAspectTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,60 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspectWithProperty;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class NonStandardNameAspectTest extends AOPMicrocontainerTest
+{
+
+ public NonStandardNameAspectTest(String name)
+ {
+ super(name);
+ }
+
+ public void testDifferentInstances() throws Exception
+ {
+ POJO pojo = (POJO)getBean("Intercepted");
+
+ TestAspectWithProperty.last = null;
+ pojo.method();
+ TestAspectWithProperty a1 = TestAspectWithProperty.last;
+ assertNotNull(a1);
+ assertEquals("PropertyA", a1.getSomeProperty());
+
+ TestAspectWithProperty.last = null;
+ pojo.method(2);
+ TestAspectWithProperty a2 = TestAspectWithProperty.last;
+ assertNotNull(a2);
+ assertEquals("PropertyB", a2.getSomeProperty());
+
+ assertNotSame(a1, a2);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PrecedenceAopTestCase extends PrecedenceTest
+{
+ public static Test suite()
+ {
+ return suite(PrecedenceAopTestCase.class);
+ }
+
+ public PrecedenceAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PrecedenceBeansTestCase extends PrecedenceTest
+{
+ public static Test suite()
+ {
+ return suite(PrecedenceBeansTestCase.class);
+ }
+
+ public PrecedenceBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/PrecedenceTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,58 @@
+/*
+* 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.microcontainer.beans.test;
+
+import java.util.List;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.Interceptions;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+import org.jboss.test.microcontainer.beans.TestInterceptor;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class PrecedenceTest extends AOPMicrocontainerTest
+{
+
+ public PrecedenceTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ Interceptions.reset();
+ POJO pojo = (POJO)getBean("Bean");
+ pojo.method(2);
+
+ List interceptions = Interceptions.interceptions();
+ assertEquals(2, interceptions.size());
+
+ assertEquals(TestInterceptor.class, interceptions.get(0).getClass());
+ assertEquals(TestAspect.class, interceptions.get(1).getClass());
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ScopedAspectAopTestCase extends ScopedAspectTest
+{
+ public static Test suite()
+ {
+ return suite(ScopedAspectAopTestCase.class);
+ }
+
+ public ScopedAspectAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ScopedAspectBeansTestCase extends ScopedAspectTest
+{
+ public static Test suite()
+ {
+ return suite(ScopedAspectBeansTestCase.class);
+ }
+
+ public ScopedAspectBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/ScopedAspectTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,193 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.POJO2;
+import org.jboss.test.microcontainer.beans.PerClassAspect;
+import org.jboss.test.microcontainer.beans.PerInstanceAspect;
+import org.jboss.test.microcontainer.beans.PerJoinPointAspect;
+import org.jboss.test.microcontainer.beans.PerVmAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class ScopedAspectTest extends AOPMicrocontainerTest
+{
+
+ public ScopedAspectTest(String name)
+ {
+ super(name);
+ }
+
+ public void testPerVm() throws Exception
+ {
+ POJO pojo = (POJO)getBean("POJO1A");
+ POJO2 pojo2 = (POJO2)getBean("POJO2");
+
+ PerVmAspect.last = null;
+ pojo.method();
+ PerVmAspect a1 = PerVmAspect.last;
+ assertNotNull(a1);
+
+ PerVmAspect.last = null;
+ pojo2.method();
+ PerVmAspect a2 = PerVmAspect.last;
+ assertNotNull(a2);
+ assertSame(a1, a2);
+
+ PerVmAspect.last = null;
+ pojo.method(3);
+ PerVmAspect a3 = PerVmAspect.last;
+ assertNotNull(a3);
+ assertSame(a1, a3);
+ }
+
+ public void testPerClass() throws Exception
+ {
+ POJO pojo = (POJO)getBean("POJO1A");
+ POJO2 pojo2 = (POJO2)getBean("POJO2");
+
+ PerClassAspect.last = null;
+ pojo.method();
+ PerClassAspect a1 = PerClassAspect.last;
+ assertNotNull(a1);
+
+ PerClassAspect.last = null;
+ pojo2.method();
+ PerClassAspect a2 = PerClassAspect.last;
+ assertNotNull(a2);
+ assertNotSame(a1, a2);
+
+ PerClassAspect.last = null;
+ pojo.method(3);
+ PerClassAspect a3 = PerClassAspect.last;
+ assertNotNull(a3);
+ assertSame(a1, a3);
+ }
+
+ public void testPerInstance() throws Exception
+ {
+ POJO pojoA = (POJO)getBean("POJO1A");
+ POJO pojoB = (POJO)getBean("POJO1B");
+ POJO2 pojo2 = (POJO2)getBean("POJO2");
+
+ PerInstanceAspect.last = null;
+ pojoA.method();
+ PerInstanceAspect a1 = PerInstanceAspect.last;
+ assertNotNull(a1);
+
+ PerInstanceAspect.last = null;
+ pojoA.method(2);
+ PerInstanceAspect a2 = PerInstanceAspect.last;
+ assertNotNull(a2);
+ assertSame(a1, a2);
+
+ PerInstanceAspect.last = null;
+ pojoB.method();
+ PerInstanceAspect a3 = PerInstanceAspect.last;
+ assertNotNull(a3);
+ assertNotSame(a3, a2);
+
+ PerInstanceAspect.last = null;
+ pojoB.method(4);
+ PerInstanceAspect a4 = PerInstanceAspect.last;
+ assertNotNull(a4);
+ assertSame(a3, a4);
+
+ PerInstanceAspect.last = null;
+ pojo2.method();
+ PerInstanceAspect a5 = PerInstanceAspect.last;
+ assertNotNull(a5);
+ assertNotSame(a5, a4);
+ assertNotSame(a5, a2);
+
+ PerInstanceAspect.last = null;
+ pojo2.method(4);
+ PerInstanceAspect a6 = PerInstanceAspect.last;
+ assertNotNull(a6);
+ assertSame(a5, a6);
+ }
+
+ public void testPerJoinPoint() throws Exception
+ {
+ POJO pojoA = (POJO)getBean("POJO1A");
+ POJO pojoB = (POJO)getBean("POJO1B");
+ POJO2 pojo2 = (POJO2)getBean("POJO2");
+
+ PerJoinPointAspect.last = null;
+ pojoA.method();
+ PerJoinPointAspect a1 = PerJoinPointAspect.last;
+ assertNotNull(a1);
+
+ PerJoinPointAspect.last = null;
+ pojoA.method(1);
+ PerJoinPointAspect a2 = PerJoinPointAspect.last;
+ assertNotNull(a2);
+
+ PerJoinPointAspect.last = null;
+ pojoB.method();
+ PerJoinPointAspect a3 = PerJoinPointAspect.last;
+ assertNotNull(a3);
+
+ PerJoinPointAspect.last = null;
+ pojoB.method(1);
+ PerJoinPointAspect a4 = PerJoinPointAspect.last;
+ assertNotNull(a4);
+
+ PerJoinPointAspect.last = null;
+ pojo2.method();
+ PerJoinPointAspect a5 = PerJoinPointAspect.last;
+ assertNotNull(a5);
+
+ PerJoinPointAspect.last = null;
+ pojo2.method(1);
+ PerJoinPointAspect a6 = PerJoinPointAspect.last;
+ assertNotNull(a6);
+
+ assertNotSame(a1, a2);
+ assertNotSame(a1, a3);
+ assertNotSame(a1, a4);
+ assertNotSame(a1, a5);
+ assertNotSame(a1, a6);
+ assertNotSame(a2, a3);
+ assertNotSame(a2, a4);
+ assertNotSame(a2, a5);
+ assertNotSame(a2, a6);
+ assertNotSame(a3, a4);
+ assertNotSame(a3, a5);
+ assertNotSame(a3, a6);
+ assertNotSame(a4, a5);
+ assertNotSame(a4, a6);
+ assertNotSame(a5, a6);
+
+ PerJoinPointAspect.last = null;
+ pojoA.method();
+ PerJoinPointAspect a7 = PerJoinPointAspect.last;
+ assertNotNull(a7);
+ assertSame(a1, a7);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackAopTestCase extends StackTest
+{
+ public static Test suite()
+ {
+ return suite(StackAopTestCase.class);
+ }
+
+ public StackAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackBeansTestCase extends StackTest
+{
+ public static Test suite()
+ {
+ return suite(StackBeansTestCase.class);
+ }
+
+ public StackBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.SimpleFactoryAspect;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class StackTest extends AOPMicrocontainerTest
+{
+
+ public StackTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ TestAspect.invoked = false;
+ SimpleFactoryAspect.invoked = 0;
+ POJO pojo = (POJO)getBean("Bean");
+ int ret = pojo.method(2);
+ assertEquals(4, ret);
+ assertTrue(SimpleFactoryAspect.invoked == 100);
+ assertTrue(TestAspect.invoked);
+
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackWithMultipleDependencyAopDifferentOrderTestCase extends StackWithMultipleDependencyAopTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new StackWithMultipleDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new StackWithMultipleDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public StackWithMultipleDependencyAopDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackWithMultipleDependencyAopTestCase extends StackWithMultipleDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(StackWithMultipleDependencyAopTestCase.class);
+ }
+
+ public StackWithMultipleDependencyAopTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "StackWithMultipleDependencyAopTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "StackWithMultipleDependencyAopTestCaseNotAutomatic1.xml";
+ }
+
+ @Override
+ protected String getFile2()
+ {
+ return "StackWithMultipleDependencyAopTestCaseNotAutomatic2.xml";
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackWithMultipleDependencyBeansDifferentOrderTestCase extends StackWithMultipleDependencyBeansTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new StackWithMultipleDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new StackWithMultipleDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public StackWithMultipleDependencyBeansDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackWithMultipleDependencyBeansTestCase extends StackWithMultipleDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(StackWithMultipleDependencyBeansTestCase.class);
+ }
+
+ public StackWithMultipleDependencyBeansTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "StackWithMultipleDependencyBeansTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "StackWithMultipleDependencyBeansTestCaseNotAutomatic1.xml";
+ }
+
+ @Override
+ protected String getFile2()
+ {
+ return "StackWithMultipleDependencyBeansTestCaseNotAutomatic2.xml";
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithMultipleDependencyTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,337 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.test.microcontainer.beans.Dependency;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspectWithDependency;
+import org.jboss.test.microcontainer.beans.TestInterceptorWithDependency;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class StackWithMultipleDependencyTest extends AOPMicrocontainerTest
+{
+
+ public StackWithMultipleDependencyTest(String name)
+ {
+ super(name);
+ }
+
+ protected abstract String getFile0();
+ protected abstract String getFile1();
+ protected abstract String getFile2();
+
+ public void testInterceptorWithDependencyCorrectOrder() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+ deploy(getFile1());
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+ try
+ {
+ deploy(getFile2());
+ try
+ {
+ validate();
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+ public void testInterceptorWithDependencyWrongOrder() throws Exception
+ {
+ deploy(getFile2());
+ try
+ {
+ checkNoIntercepted1();
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+ checkIntercepted1(dependency1);
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+
+ deploy(getFile1());
+ try
+ {
+ validate();
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy() throws Exception
+ {
+ deploy(getFile2());
+ try
+ {
+ checkNoIntercepted1();
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+
+ checkIntercepted1(dependency1);
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+
+ deploy(getFile1());
+ try
+ {
+ validate();
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+
+ checkNoIntercepted1();
+ checkNoIntercepted2();
+ checkNoIntercepted3();
+
+ deploy(getFile1());
+ try
+ {
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+
+ checkNoIntercepted1();
+ checkIntercepted2(dependency2);
+ checkNoIntercepted3();
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy2() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency1 = (Dependency) getBean("Dependency1");
+ assertNotNull(dependency1);
+ deploy(getFile1());
+ try
+ {
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+ deploy(getFile2());
+ try
+ {
+ validate();
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+
+ assertNotNull(dependency1);
+ deploy(getFile1());
+ try
+ {
+ Dependency dependency2 = (Dependency) getBean("Dependency2");
+ assertNotNull(dependency2);
+ deploy(getFile2());
+ try
+ {
+ validate();
+ checkIntercepted1(dependency1);
+ checkIntercepted2(dependency2);
+ checkIntercepted3(dependency1, dependency2);
+ }
+ finally
+ {
+ undeploy(getFile2());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+ private void checkIntercepted1(Dependency dependency1)
+ {
+ POJO pojo1 = (POJO) getBean("Intercepted1");
+ assertNotNull(pojo1);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptorWithDependency.invoked = null;
+ pojo1.method(2);
+ assertNotNull(TestAspectWithDependency.invoked);
+ assertTrue(dependency1 == TestAspectWithDependency.invoked);
+ assertNull(TestInterceptorWithDependency.invoked);
+ }
+
+ private void checkIntercepted2(Dependency dependency2)
+ {
+ POJO pojo2 = (POJO) getBean("Intercepted2");
+ assertNotNull(pojo2);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptorWithDependency.invoked = null;
+ pojo2.method(2);
+ assertNull(TestAspectWithDependency.invoked);
+ assertNotNull(TestInterceptorWithDependency.invoked);
+ System.out.println(TestInterceptorWithDependency.invoked);
+ assertTrue(dependency2 == TestInterceptorWithDependency.invoked);
+ }
+
+ private void checkIntercepted3(Dependency dependency1, Dependency dependency2)
+ {
+ POJO pojo3 = (POJO) getBean("Intercepted3");
+ assertNotNull(pojo3);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptorWithDependency.invoked = null;
+ pojo3.method(2);
+ assertNotNull(TestAspectWithDependency.invoked);
+ assertTrue(dependency1 == TestAspectWithDependency.invoked);
+ assertNotNull(TestInterceptorWithDependency.invoked);
+ assertTrue(dependency2 == TestInterceptorWithDependency.invoked);
+ }
+
+ private void checkNoIntercepted1()
+ {
+ checkNoIntercepted("Intercepted1");
+ }
+
+ private void checkNoIntercepted2()
+ {
+ checkNoIntercepted("Intercepted2");
+ }
+
+ private void checkNoIntercepted3()
+ {
+ checkNoIntercepted("Intercepted3");
+ }
+
+ private void checkNoIntercepted(String name)
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean(name);
+ fail("'" + name + "' should not be installed yet");
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ pojo = (POJO) getBean(name, ControllerState.DESCRIBED);
+ assertNull(name + " should not be deployed until the interceptor is", pojo);
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackWithSingleDependencyAopDifferentOrderTestCase extends StackWithSingleDependencyAopTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new StackWithSingleDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new StackWithSingleDependencyAopDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public StackWithSingleDependencyAopDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackWithSingleDependencyAopTestCase extends StackWithSingleDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(StackWithSingleDependencyAopTestCase.class);
+ }
+
+ public StackWithSingleDependencyAopTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "StackWithSingleDependencyAopTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "StackWithSingleDependencyAopTestCaseNotAutomatic1.xml";
+ }
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansDifferentOrderTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansDifferentOrderTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansDifferentOrderTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackWithSingleDependencyBeansDifferentOrderTestCase extends StackWithSingleDependencyBeansTestCase
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new StackWithSingleDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyWrongOrder"));
+ suite.addTest(new StackWithSingleDependencyBeansDifferentOrderTestCase("testInterceptorWithDependencyCorrectOrder"));
+ return suite;
+ }
+
+ public StackWithSingleDependencyBeansDifferentOrderTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class StackWithSingleDependencyBeansTestCase extends StackWithSingleDependencyTest
+{
+ public static Test suite()
+ {
+ return suite(StackWithSingleDependencyBeansTestCase.class);
+ }
+
+ public StackWithSingleDependencyBeansTestCase(String test)
+ {
+ super(test);
+ }
+
+ @Override
+ protected String getFile0()
+ {
+ return "StackWithSingleDependencyBeansTestCaseNotAutomatic0.xml";
+ }
+
+ @Override
+ protected String getFile1()
+ {
+ return "StackWithSingleDependencyBeansTestCaseNotAutomatic1.xml";
+ }
+
+
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/StackWithSingleDependencyTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,244 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.test.microcontainer.beans.Dependency;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspectWithDependency;
+import org.jboss.test.microcontainer.beans.TestInterceptor;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class StackWithSingleDependencyTest extends AOPMicrocontainerTest
+{
+
+ public StackWithSingleDependencyTest(String name)
+ {
+ super(name);
+ }
+
+ protected abstract String getFile0();
+ protected abstract String getFile1();
+
+ public void testInterceptorWithDependencyCorrectOrder() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ validate();
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertNotNull(TestAspectWithDependency.invoked);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+ public void testInterceptorWithDependencyWrongOrder() throws Exception
+ {
+ deploy(getFile1());
+ try
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("'Interceped' should not be installed yet");
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ pojo = (POJO) getBean("Intercepted", ControllerState.DESCRIBED);
+ assertNull("This should not be deployed until the interceptor is", pojo);
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy() throws Exception
+ {
+ deploy(getFile1());
+ try
+ {
+ POJO pojo;
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("Bean should not be installed until the dependency is");
+ }
+ catch (IllegalStateException expected)
+ {
+ KernelControllerContext context = getControllerContext("Intercepted", ControllerState.DESCRIBED);
+ assertNotNull(context);
+ }
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+
+ try
+ {
+ pojo = (POJO) getBean("Intercepted");
+ fail("Bean should not be installed after the dependency is undeployed");
+ }
+ catch (IllegalStateException expected)
+ {
+ KernelControllerContext context = getControllerContext("Intercepted", ControllerState.DESCRIBED);
+ assertNotNull(context);
+ }
+
+
+ deploy(getFile0());
+ try
+ {
+ validate();
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ int called = TestAspectWithDependency.called;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue("Interceptor was not rebound", called + 1 == TestAspectWithDependency.called);
+ assertTrue("Should not be caching the interceptor/dependency across rebinding", dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+
+ public void testInterceptorWithDependencyRedeploy2() throws Exception
+ {
+ deploy(getFile0());
+ try
+ {
+ Dependency dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ validate();
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+
+ dependency = (Dependency) getBean("Dependency");
+ assertNotNull(dependency);
+ deploy(getFile1());
+ try
+ {
+ POJO pojo = (POJO) getBean("Intercepted");
+ assertNotNull(pojo);
+ TestAspectWithDependency.invoked = null;
+ TestInterceptor.invoked = false;
+ pojo.method(2);
+ assertTrue(dependency == TestAspectWithDependency.invoked);
+ assertTrue(TestInterceptor.invoked);
+ }
+ finally
+ {
+ undeploy(getFile1());
+ }
+ }
+ finally
+ {
+ undeploy(getFile0());
+ }
+ }
+
+}
\ No newline at end of file
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefAopTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefAopTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefAopTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TypeDefAopTestCase extends TypeDefTest
+{
+ public static Test suite()
+ {
+ return suite(TypeDefAopTestCase.class);
+ }
+
+ public TypeDefAopTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefBeansTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefBeansTestCase.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefBeansTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.microcontainer.beans.test;
+
+import junit.framework.Test;
+
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TypeDefBeansTestCase extends TypeDefTest
+{
+ public static Test suite()
+ {
+ return suite(TypeDefBeansTestCase.class);
+ }
+
+ public TypeDefBeansTestCase(String test)
+ {
+ super(test);
+ }
+}
Added: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefTest.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefTest.java (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/beans/test/TypeDefTest.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -0,0 +1,50 @@
+/*
+* 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.microcontainer.beans.test;
+
+import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
+import org.jboss.test.microcontainer.beans.POJO;
+import org.jboss.test.microcontainer.beans.TestAspect;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class TypeDefTest extends AOPMicrocontainerTest
+{
+
+ public TypeDefTest(String name)
+ {
+ super(name);
+ }
+
+ public void testIntercepted() throws Exception
+ {
+ TestAspect.invoked = false;
+ POJO pojo = (POJO)getBean("Bean");
+ int ret = pojo.method(2);
+ assertEquals(4, ret);
+ assertTrue(TestAspect.invoked);
+ }
+
+}
\ No newline at end of file
Modified: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/AspectMCAllTestSuite.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/AspectMCAllTestSuite.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/AspectMCAllTestSuite.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -46,7 +46,6 @@
suite.addTest(BeanNoDefaultCtorUsingParamTestCase.suite());
suite.addTest(ConstructorInterceptorWithDependencyTestCase.suite());
suite.addTest(InterceptedTestCase.suite());
- suite.addTest(InterceptedUseCaseXmlTestCase.suite());
suite.addTest(InterceptorWithAnnotationDependencyTestCase.suite());
suite.addTest(InterceptorWithDependencyTestCase.suite());
suite.addTest(InterceptorWithNestedAnnotationDependencyTestCase.suite());
Deleted: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/InterceptedUseCaseXmlTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/InterceptedUseCaseXmlTestCase.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/InterceptedUseCaseXmlTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.microcontainer.test;
-
-import junit.framework.Test;
-
-import org.jboss.aop.microcontainer.beans.Aspect;
-import org.jboss.aop.microcontainer.beans.AspectBinding;
-import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
-import org.jboss.beans.metadata.plugins.factory.GenericBeanFactory;
-import org.jboss.test.microcontainer.support.CalledInterceptor;
-import org.jboss.test.microcontainer.support.InterceptorWithDependency;
-import org.jboss.test.microcontainer.support.SimpleBean;
-
-public class InterceptedUseCaseXmlTestCase extends AOPMicrocontainerTest
-{
- public static Test suite()
- {
- return suite(InterceptedUseCaseXmlTestCase.class);
- }
-
- public InterceptedUseCaseXmlTestCase(String name)
- {
- super(name);
- }
-
- public void testIntercepted()
- {
- SimpleBean bean = (SimpleBean) getBean("Intercepted");
- SimpleBean dependency = (SimpleBean) getBean("Dependency");
- CalledInterceptor.intercepted = false;
- InterceptorWithDependency.intercepted = null;
- bean.someMethod();
- assertTrue("Should have invoked the CalledInterceptor", CalledInterceptor.intercepted);
- assertTrue("Should have invoked the DependentInterceptor", InterceptorWithDependency.intercepted == dependency);
- }
-
- public void testCheckNotDependentAdvice()
- {
- GenericBeanFactory factory = (GenericBeanFactory)getBean("InterceptedAdvice");
- assertNotNull(factory);
-
- AspectBinding binding = (AspectBinding)getBean("InterceptedAdvice$AspectBinding");
- assertNotNull(binding);
-
- Aspect aspect = (Aspect)getBean("InterceptedAdvice$Aspect");
- assertNotNull(aspect);
- assertNotNull(aspect.getAdvice());
- assertNull(aspect.getAdviceBean());
- }
-
- public void testCheckDependentAdvice()
- {
- GenericBeanFactory factory = (GenericBeanFactory)getBean("DependentAdvice");
- assertNotNull(factory);
-
- AspectBinding binding = (AspectBinding)getBean("DependentAdvice$AspectBinding");
- assertNotNull(binding);
-
- Aspect aspect = (Aspect)getBean("DependentAdvice$Aspect");
- assertNotNull(aspect);
- assertNotNull(aspect.getAdviceBean());
- assertNotNull(aspect.getAdvice()); //Gets set by the install
-
- }
-}
Modified: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/JMXDecoratedTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/JMXDecoratedTestCase.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/JMXDecoratedTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.microcontainer.test;
-import javax.management.InstanceNotFoundException;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanInfo;
import javax.management.MBeanOperationInfo;
Deleted: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/SimpleAspectUseCaseXmlTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/SimpleAspectUseCaseXmlTestCase.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/test/SimpleAspectUseCaseXmlTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.microcontainer.test;
-
-import junit.framework.Test;
-
-import org.jboss.aop.microcontainer.junit.AOPMicrocontainerTest;
-import org.jboss.test.microcontainer.support.SimpleBeanImpl;
-import org.jboss.test.microcontainer.support.TestAspect;
-
-/**
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 43840 $
- */
-public class SimpleAspectUseCaseXmlTestCase extends AOPMicrocontainerTest
-{
- public static Test suite()
- {
- return suite(SimpleAspectUseCaseXmlTestCase.class);
- }
-
- public SimpleAspectUseCaseXmlTestCase(String name)
- {
- super(name);
- }
-
- public void testIntercepted()
- {
- SimpleBeanImpl bean = (SimpleBeanImpl) getBean("Intercepted");
- assertFalse(TestAspect.fooCalled);
- assertFalse(TestAspect.barCalled);
-
- bean.someMethod();
- assertTrue("TestAspect.foo not called", TestAspect.fooCalled);
- assertFalse("TestAspect.bar was called", TestAspect.barCalled);
-
- TestAspect.fooCalled = false;
- assertFalse(TestAspect.fooCalled);
- assertFalse(TestAspect.barCalled);
-
- bean.someOtherMethod();
- assertFalse("TestAspect.foo was called", TestAspect.fooCalled);
- assertTrue("TestAspect.bar was not called", TestAspect.barCalled);
- }
-}
Modified: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/xml/test/AspectTestCase.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/xml/test/AspectTestCase.java 2007-11-22 23:37:25 UTC (rev 67389)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/microcontainer/xml/test/AspectTestCase.java 2007-11-23 00:19:15 UTC (rev 67390)
@@ -39,20 +39,17 @@
{
public void testDeployment() throws Exception
{
- List beans = unmarshalBeans("Aspect.xml", 3);
+ List beans = unmarshalBeans("Aspect.xml", 2);
GenericBeanFactoryMetaData adviceFactory = (GenericBeanFactoryMetaData) assertType(beans, 0, GenericBeanFactoryMetaData.class);
- assertEquals("TestAspect", adviceFactory.getName());
+ assertEquals("Factory$TestAspect", adviceFactory.getName());
assertEquals("TestClass", adviceFactory.getBeanClass());
ValueMetaData vmd = adviceFactory.getBeanProperty("testProperty");
assertNotNull(vmd);
assertEquals("Hello", vmd.getUnderlyingValue());
BeanMetaData aspect = (BeanMetaData) assertType(beans, 1, BeanMetaData.class);
- assertEquals("TestAspect$Aspect", aspect.getName());
-
- BeanMetaData aspectBinding = (BeanMetaData) assertType(beans, 2, BeanMetaData.class);
- assertEquals("TestAspect$AspectBinding", aspectBinding.getName());
+ assertEquals("TestAspect", aspect.getName());
}
public static Test suite()
More information about the jboss-cvs-commits
mailing list