[webbeans-commits] Webbeans SVN: r2896 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck: tests/context/application/standalone and 88 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-06-25 19:12:36 -0400 (Thu, 25 Jun 2009)
New Revision: 2896
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/ForwardingBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/standalone/TcasDisplay.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/standalone/TcasToFmsLink.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/ApplicationHorseStable.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/HorseStable.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/standalone/TcasDisplay.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/FishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/FishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/HornedMammalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/MammalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/HornedMammalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/FishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/RiverFishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/AnotherScopeType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/FishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/RiverFishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnotherStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/ApplicationScopedHornedMammalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/HornedMammalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/nonEmptyNamed/StereotypeWithNonEmptyNamed_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/FishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeploymentTypes/StereotypeWithTooManyDeploymentTypes_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyScopes/StereotypeWithTooManyScopeTypes_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithBindingTypes_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/StereotypeWithEmptyNamed.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesMultipleDeploymentTypes/AnotherStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesMultipleDeploymentTypes/HornedMammalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/resolvedScopeConflict/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/resolvedScopeConflict/FishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/InitializedBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ManagerObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken1/BeanDiscoveryObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken1/InitializerBean_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken2/BeanDiscoveryObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken3/BeanDiscoveryObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken4/BeanDiscoveryObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken5/BeanDiscoveryObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken6/BeanDiscoveryObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AsynchronousObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BananaSpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BullTerrier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/DisabledStringObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/DogWhisperer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/FarmShop.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OrangeCheekedWaxbill.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OwlFinch_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Pomeranian.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/PomeranianInterface.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/RecluseSpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Shop.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Spitz.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StaticObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StringObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/SweeWaxbill.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/TeaCupPomeranian.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable/JavaSparrow_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withWildcardType/GoldbreastWaxbill_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withoutType/BlackRumpedWaxbill_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/MappedEventObserversAsynchronousTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isDisposer/FoxTerrier_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isInitializer/AustralianTerrier_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isProducer/BorderTerrier_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer10/TeaCupPomeranian.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer11/CheckedExceptionWrappedTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer11/TeaCupPomeranian.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer12/NonSimpleBean_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer7/TooManyPhases_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer8/Terrier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/tooManyObserverParameters/YorkshireTerrier_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/EnterpriseEventInheritenceTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/Farmer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/FarmerLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/StockWatcher.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/StockWatcherLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/GenericBostonTerrier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/WildBostonTerrier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ConsumerNotifiedForEventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/DuplicateBindingsToAddObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/DuplicateBindingsToRemoveObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ManagerAddObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/NonBindingTypesToAddObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ObserverExceptionAbortsTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/DuplicateBindingsToRemoveObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/ManagerRemoveObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/AuroraFinch.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/BlueFacedParrotFinch.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/FinchKeeper.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/OrangeCheekedWaxbill.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/RegisterObserversUsingImplicitEventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/StarFinch.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/DuplicateBindingTypesWhenResolvingTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeMembersTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeFamily/AllEventTypesObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/AnotherFooObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/CheckTypeParametersWhenResolvingObserversTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/ChecksEventTypeWhenResolvingTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/FooObserver.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/DogTrainer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/SpiderProducer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/Polar.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/GoldenRetriever.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/parameterAnnotatedObserves/Grouse_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/SpiderStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/SpecializedTarantulaProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/SpiderStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/AndalusianChicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/AndalusianChicken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducerNotUsed.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/parameterAnnotatedObserves/SpiderProducer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/stereotypeEnforcesRequiredTypes/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/constructorHasObservesParameter/ObservingConstructor_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/MountainLion.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/RequestScopedAnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Fox.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/LazyFarmer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/Office.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/directlyExtendsNothing/Cow_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/directlyExtendsSimpleBean/Tractor_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/implementInterfaceAndExtendsNothing/Donkey_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/sameName/FarmYard_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/samePrecedence/OrganicFarmer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/twoBeansSpecializeTheSameBean/FishFarmer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/twoBeansSpecializeTheSameBean/SheepFarmer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/JewelryShop.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/indirectOverride/ShoeShop_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/lowerprecedence/ClothesShop_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/specializesStaticMethod/FurnitureShop_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/specializingAndSpecializedBeanHaveName/HighSchool_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/Bookshop_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/PictureShop_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/LazyFarmer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/Office.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/names/FarmYard_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/Donkey_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/Cow_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/Cow_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/precedence/OrganicFarmer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/FishFarmer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/SheepFarmer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/byname/duplicateNameResolution/DuplicateNameResolutionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Other.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotype.java
Log:
Update API to 20090625, mark all old methods still required by TCK as @Deprecated, new methods in RI are throw new UnsupportedOperationException()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/ForwardingBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/ForwardingBean.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/ForwardingBean.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,7 +6,6 @@
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.InjectionPoint;
public abstract class ForwardingBean<T> implements Bean<T>
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/standalone/TcasDisplay.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/standalone/TcasDisplay.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/standalone/TcasDisplay.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,10 +1,10 @@
package org.jboss.jsr299.tck.tests.context.application.standalone;
import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Notify;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.spi.BeanManager;
-import javax.event.Notify;
-import javax.event.Observes;
class TcasDisplay
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/standalone/TcasToFmsLink.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/standalone/TcasToFmsLink.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/standalone/TcasToFmsLink.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,9 +1,9 @@
package org.jboss.jsr299.tck.tests.context.application.standalone;
+import javax.enterprise.event.Notify;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.spi.BeanManager;
-import javax.event.Notify;
-import javax.event.Observes;
class TcasToFmsLink
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/ApplicationHorseStable.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/ApplicationHorseStable.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/ApplicationHorseStable.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,9 +2,9 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.Dependent;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.spi.BeanManager;
-import javax.event.Observes;
@ApplicationScoped
class ApplicationHorseStable
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/HorseStable.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/HorseStable.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/HorseStable.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,10 +2,10 @@
import javax.annotation.PreDestroy;
import javax.enterprise.context.Dependent;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.Initializer;
import javax.enterprise.inject.spi.BeanManager;
-import javax.event.Observes;
@Dependent
class HorseStable
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/standalone/TcasDisplay.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/standalone/TcasDisplay.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/standalone/TcasDisplay.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,10 +1,10 @@
package org.jboss.jsr299.tck.tests.context.request.standalone;
import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Notify;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.spi.BeanManager;
-import javax.event.Notify;
-import javax.event.Observes;
import org.jboss.jsr299.tck.impl.OldSPIBridge;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/FishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/FishStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/FishStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -8,7 +8,7 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/FishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/FishStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/FishStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -8,7 +8,7 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/HornedMammalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/HornedMammalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/HornedMammalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,7 +6,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/MammalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/MammalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/MammalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,7 +6,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/HornedMammalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/HornedMammalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/deployment/enterprise/HornedMammalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,7 +6,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/FishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/FishStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/FishStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -8,7 +8,7 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/RiverFishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/RiverFishStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/name/RiverFishStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,7 +6,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/AnotherScopeType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/AnotherScopeType.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/AnotherScopeType.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.definition.scope;
+import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/FishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/FishStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/FishStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -8,7 +8,7 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/RiverFishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/RiverFishStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/RiverFishStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -7,7 +7,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -10,7 +10,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnotherStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnotherStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/AnotherStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -8,7 +8,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/ApplicationScopedHornedMammalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/ApplicationScopedHornedMammalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/ApplicationScopedHornedMammalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -7,7 +7,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@ApplicationScoped
@Stereotype(supportedScopes=ApplicationScoped.class)
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/HornedMammalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/HornedMammalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/HornedMammalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,7 +6,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/nonEmptyNamed/StereotypeWithNonEmptyNamed_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/nonEmptyNamed/StereotypeWithNonEmptyNamed_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/nonEmptyNamed/StereotypeWithNonEmptyNamed_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -7,7 +7,7 @@
import java.lang.annotation.Target;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/FishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/FishStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/FishStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -7,7 +7,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeploymentTypes/StereotypeWithTooManyDeploymentTypes_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeploymentTypes/StereotypeWithTooManyDeploymentTypes_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyDeploymentTypes/StereotypeWithTooManyDeploymentTypes_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,8 +6,8 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
import javax.enterprise.inject.deployment.Production;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyScopes/StereotypeWithTooManyScopeTypes_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyScopes/StereotypeWithTooManyScopeTypes_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyScopes/StereotypeWithTooManyScopeTypes_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -8,7 +8,7 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithBindingTypes_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithBindingTypes_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithBindingTypes_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,7 +6,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/StereotypeWithEmptyNamed.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/StereotypeWithEmptyNamed.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/defaultNamed/StereotypeWithEmptyNamed.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -7,7 +7,7 @@
import java.lang.annotation.Target;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/enterprise/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -10,7 +10,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesMultipleDeploymentTypes/AnotherStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesMultipleDeploymentTypes/AnotherStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesMultipleDeploymentTypes/AnotherStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -8,7 +8,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesMultipleDeploymentTypes/HornedMammalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesMultipleDeploymentTypes/HornedMammalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/multipleStereotypesMultipleDeploymentTypes/HornedMammalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,7 +6,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/resolvedScopeConflict/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/resolvedScopeConflict/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/resolvedScopeConflict/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/resolvedScopeConflict/FishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/resolvedScopeConflict/FishStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/resolvedScopeConflict/FishStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -7,7 +7,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/InitializedBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/InitializedBinding.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/InitializedBinding.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,9 @@
package org.jboss.jsr299.tck.tests.deployment.lifecycle;
+import javax.enterprise.context.spi.Context;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.ObserverMethod;
class InitializedBinding implements AfterBeanDiscovery
{
@@ -8,4 +11,19 @@
{
throw new RuntimeException(t);
}
+
+ public void addBean(Bean<?> bean)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addContext(Context context)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addObserverMethod(ObserverMethod<?, ?> observerMethod)
+ {
+ throw new UnsupportedOperationException();
+ }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ManagerObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ManagerObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/ManagerObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,11 +2,11 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
import javax.enterprise.inject.spi.AfterDeploymentValidation;
import javax.enterprise.inject.spi.BeanManager;
-import javax.event.Observes;
class ManagerObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken1/BeanDiscoveryObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken1/BeanDiscoveryObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken1/BeanDiscoveryObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.deployment.lifecycle.broken1;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.event.Observes;
class BeanDiscoveryObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken1/InitializerBean_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken1/InitializerBean_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken1/InitializerBean_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.deployment.lifecycle.broken1;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Initializer;
-import javax.event.Observes;
class InitializerBean_Broken
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken2/BeanDiscoveryObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken2/BeanDiscoveryObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken2/BeanDiscoveryObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.deployment.lifecycle.broken2;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
import javax.enterprise.inject.spi.AfterDeploymentValidation;
-import javax.event.Observes;
class BeanDiscoveryObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken3/BeanDiscoveryObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken3/BeanDiscoveryObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken3/BeanDiscoveryObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.deployment.lifecycle.broken3;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.event.Observes;
class BeanDiscoveryObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken4/BeanDiscoveryObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken4/BeanDiscoveryObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken4/BeanDiscoveryObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.deployment.lifecycle.broken4;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterDeploymentValidation;
-import javax.event.Observes;
class BeanDiscoveryObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken5/BeanDiscoveryObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken5/BeanDiscoveryObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken5/BeanDiscoveryObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.deployment.lifecycle.broken5;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.event.Observes;
class BeanDiscoveryObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken6/BeanDiscoveryObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken6/BeanDiscoveryObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken6/BeanDiscoveryObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.deployment.lifecycle.broken6;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterDeploymentValidation;
-import javax.event.Observes;
class BeanDiscoveryObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype()
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AsynchronousObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AsynchronousObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AsynchronousObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.event.Notify;
-import javax.event.Observes;
+import javax.enterprise.event.Notify;
+import javax.enterprise.event.Observes;
public class AsynchronousObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BananaSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BananaSpider.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BananaSpider.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,9 +2,9 @@
import java.util.Set;
+import javax.enterprise.event.Observer;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.BeanManager;
-import javax.event.Observer;
-import javax.event.Observes;
/**
* Simple bean with observer method and another injectable parameter.
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BullTerrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BullTerrier.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BullTerrier.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
class BullTerrier
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/DisabledStringObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/DisabledStringObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/DisabledStringObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
@DisabledDeploymentType
class DisabledStringObserver
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/DogWhisperer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/DogWhisperer.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/DogWhisperer.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.event.Event;
class DogWhisperer
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -5,13 +5,13 @@
import java.util.Set;
import javax.enterprise.context.Dependent;
+import javax.enterprise.event.Event;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.TypeLiteral;
import javax.enterprise.inject.deployment.Standard;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
-import javax.event.Event;
-import javax.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/FarmShop.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/FarmShop.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/FarmShop.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes @AnotherDeploymentType
class FarmShop extends Shop
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
class Farmer
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OrangeCheekedWaxbill.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OrangeCheekedWaxbill.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OrangeCheekedWaxbill.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.event.Event;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OwlFinch_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OwlFinch_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OwlFinch_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.event.Event;
+import javax.enterprise.event.Event;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.Any;
-import javax.event.Observer;
class OwlFinch_Broken
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Pomeranian.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Pomeranian.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Pomeranian.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Named;
-import javax.event.Observes;
@Named("Teddy")
class Pomeranian
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/PomeranianInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/PomeranianInterface.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/PomeranianInterface.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event;
import javax.ejb.Local;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
@Local
public interface PomeranianInterface
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/RecluseSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/RecluseSpider.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/RecluseSpider.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event;
import javax.enterprise.context.RequestScoped;
-import javax.event.Notify;
-import javax.event.Observes;
+import javax.enterprise.event.Notify;
+import javax.enterprise.event.Observes;
/**
* Simple web bean that conditionally listens to events.
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Shop.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Shop.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Shop.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
class Shop
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Spitz.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Spitz.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Spitz.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event;
import javax.ejb.Stateful;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Named;
-import javax.event.Observes;
@Stateful
@Tame
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StaticObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StaticObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StaticObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event;
import javax.enterprise.context.RequestScoped;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
@RequestScoped class StaticObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
class StockWatcher
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StringObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StringObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StringObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
class StringObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/SweeWaxbill.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/SweeWaxbill.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/SweeWaxbill.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event;
+import javax.enterprise.event.Event;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.Any;
-import javax.event.Event;
-import javax.event.Observer;
class SweeWaxbill
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/TeaCupPomeranian.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/TeaCupPomeranian.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/TeaCupPomeranian.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Named;
-import javax.event.Observes;
@Tame
@Named("Teddy")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable/JavaSparrow_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable/JavaSparrow_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable/JavaSparrow_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.broken.inject.withTypeVariable;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.event.Event;
class JavaSparrow_Broken
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withWildcardType/GoldbreastWaxbill_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withWildcardType/GoldbreastWaxbill_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withWildcardType/GoldbreastWaxbill_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.broken.inject.withWildcardType;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.event.Event;
class GoldbreastWaxbill_Broken
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withoutType/BlackRumpedWaxbill_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withoutType/BlackRumpedWaxbill_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withoutType/BlackRumpedWaxbill_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.broken.inject.withoutType;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.event.Event;
class BlackRumpedWaxbill_Broken
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/MappedEventObserversAsynchronousTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/MappedEventObserversAsynchronousTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/jms1/MappedEventObserversAsynchronousTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -19,9 +19,9 @@
import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.DefinitionError;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
-import org.jboss.jsr299.tck.DefinitionError;
import org.testng.annotations.Test;
/**
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isDisposer/FoxTerrier_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isDisposer/FoxTerrier_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isDisposer/FoxTerrier_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event.broken.observer.isDisposer;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.spi.BeforeBeanDiscovery;
-import javax.event.Observes;
class FoxTerrier_Broken
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isInitializer/AustralianTerrier_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isInitializer/AustralianTerrier_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isInitializer/AustralianTerrier_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event.broken.observer.isInitializer;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Initializer;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.event.Observes;
class AustralianTerrier_Broken
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isProducer/BorderTerrier_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isProducer/BorderTerrier_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/isProducer/BorderTerrier_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event.broken.observer.isProducer;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.event.Observes;
class BorderTerrier_Broken
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.broken.observer.notBusinessMethod;
import javax.ejb.Stateless;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
@Stateless
class TibetanTerrier_Broken implements Terrier
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer10/TeaCupPomeranian.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer10/TeaCupPomeranian.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer10/TeaCupPomeranian.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.broken.observer10;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Named;
-import javax.event.Observes;
@Tame
@Named("Teddy")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer11/CheckedExceptionWrappedTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer11/CheckedExceptionWrappedTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer11/CheckedExceptionWrappedTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -17,7 +17,7 @@
package org.jboss.jsr299.tck.tests.event.broken.observer11;
-import javax.event.ObserverException;
+import javax.enterprise.event.ObserverException;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer11/TeaCupPomeranian.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer11/TeaCupPomeranian.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer11/TeaCupPomeranian.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.broken.observer11;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Named;
-import javax.event.Observes;
@Tame
@Named("Teddy")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer12/NonSimpleBean_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer12/NonSimpleBean_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer12/NonSimpleBean_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -17,7 +17,7 @@
package org.jboss.jsr299.tck.tests.event.broken.observer12;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
/**
* This bean is neither simple nor session. As such, an observer method is not
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer7/TooManyPhases_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer7/TooManyPhases_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer7/TooManyPhases_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -16,9 +16,9 @@
*/
package org.jboss.jsr299.tck.tests.event.broken.observer7;
-import javax.event.AfterTransactionFailure;
-import javax.event.AfterTransactionSuccess;
-import javax.event.Observes;
+import javax.enterprise.event.AfterTransactionFailure;
+import javax.enterprise.event.AfterTransactionSuccess;
+import javax.enterprise.event.Observes;
/**
* The observer method defined here has too many transactional phases
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer8/Terrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer8/Terrier.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer8/Terrier.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event.broken.observer8;
-import javax.event.BeforeTransactionCompletion;
-import javax.event.Notify;
-import javax.event.Observes;
+import javax.enterprise.event.BeforeTransactionCompletion;
+import javax.enterprise.event.Notify;
+import javax.enterprise.event.Observes;
class Terrier
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/tooManyObserverParameters/YorkshireTerrier_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/tooManyObserverParameters/YorkshireTerrier_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/tooManyObserverParameters/YorkshireTerrier_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.broken.tooManyObserverParameters;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.event.Observes;
class YorkshireTerrier_Broken
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/EnterpriseEventInheritenceTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/EnterpriseEventInheritenceTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/EnterpriseEventInheritenceTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/Farmer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/Farmer.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/Farmer.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.enterprise;
import javax.ejb.Stateful;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
@Stateful
public class Farmer implements FarmerLocal
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/FarmerLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/FarmerLocal.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/FarmerLocal.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.enterprise;
import javax.ejb.Local;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
@Local
public interface FarmerLocal
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/StockWatcher.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/StockWatcher.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/StockWatcher.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.enterprise;
import javax.ejb.Stateful;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
@Stateful
public class StockWatcher implements StockWatcherLocal
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/StockWatcherLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/StockWatcherLocal.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/enterprise/StockWatcherLocal.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.enterprise;
import javax.ejb.Local;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
@Local
public interface StockWatcherLocal
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/GenericBostonTerrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/GenericBostonTerrier.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/GenericBostonTerrier.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import java.util.List;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
class GenericBostonTerrier
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/WildBostonTerrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/WildBostonTerrier.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/wildcardAndGenericType/WildBostonTerrier.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import java.util.List;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
class WildBostonTerrier
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype()
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ConsumerNotifiedForEventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ConsumerNotifiedForEventTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ConsumerNotifiedForEventTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import java.lang.annotation.Annotation;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/DuplicateBindingsToAddObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/DuplicateBindingsToAddObserverTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/DuplicateBindingsToAddObserverTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event.register.observer1;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/DuplicateBindingsToRemoveObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/DuplicateBindingsToRemoveObserverTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/DuplicateBindingsToRemoveObserverTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event.register.observer1;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ManagerAddObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ManagerAddObserverTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ManagerAddObserverTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -20,7 +20,7 @@
import java.lang.annotation.Annotation;
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/NonBindingTypesToAddObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/NonBindingTypesToAddObserverTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/NonBindingTypesToAddObserverTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event.register.observer1;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ObserverExceptionAbortsTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ObserverExceptionAbortsTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer1/ObserverExceptionAbortsTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event.register.observer1;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype()
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/DuplicateBindingsToRemoveObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/DuplicateBindingsToRemoveObserverTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/DuplicateBindingsToRemoveObserverTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event.register.observer2;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/ManagerRemoveObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/ManagerRemoveObserverTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/observer2/ManagerRemoveObserverTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -20,7 +20,7 @@
import java.lang.annotation.Annotation;
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/AuroraFinch.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/AuroraFinch.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/AuroraFinch.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event.registerUsingEvent;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
import javax.enterprise.inject.Initializer;
-import javax.event.Event;
import org.jboss.jsr299.tck.tests.event.registerUsingEvent.StarFinch.Mess;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/BlueFacedParrotFinch.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/BlueFacedParrotFinch.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/BlueFacedParrotFinch.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event.registerUsingEvent;
+import javax.enterprise.event.Event;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.Any;
-import javax.event.Event;
-import javax.event.Observer;
class BlueFacedParrotFinch
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/FinchKeeper.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/FinchKeeper.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/FinchKeeper.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.event.registerUsingEvent;
import javax.enterprise.context.RequestScoped;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
import org.jboss.jsr299.tck.tests.event.registerUsingEvent.StarFinch.Mess;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/OrangeCheekedWaxbill.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/OrangeCheekedWaxbill.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/OrangeCheekedWaxbill.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event.registerUsingEvent;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
import javax.enterprise.inject.Initializer;
-import javax.event.Event;
import org.jboss.jsr299.tck.tests.event.registerUsingEvent.StarFinch.Mess;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/RegisterObserversUsingImplicitEventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/RegisterObserversUsingImplicitEventTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/RegisterObserversUsingImplicitEventTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -18,7 +18,7 @@
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/StarFinch.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/StarFinch.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/registerUsingEvent/StarFinch.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.event.registerUsingEvent;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
import javax.enterprise.inject.Produces;
-import javax.event.Event;
public class StarFinch
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/DuplicateBindingTypesWhenResolvingTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/DuplicateBindingTypesWhenResolvingTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/DuplicateBindingTypesWhenResolvingTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event.resolve.binding;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeMembersTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeMembersTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeMembersTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/binding/ResolvingChecksBindingTypeTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype()
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeFamily/AllEventTypesObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeFamily/AllEventTypesObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeFamily/AllEventTypesObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -16,7 +16,7 @@
*/
package org.jboss.jsr299.tck.tests.event.resolve.typeFamily;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
/**
* This class declares observer methods for every superclass and interface
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/AnotherFooObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/AnotherFooObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/AnotherFooObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event.resolve.typeWithParameters;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
public class AnotherFooObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/CheckTypeParametersWhenResolvingObserversTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/CheckTypeParametersWhenResolvingObserversTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/CheckTypeParametersWhenResolvingObserversTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import java.util.ArrayList;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/ChecksEventTypeWhenResolvingTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/ChecksEventTypeWhenResolvingTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/ChecksEventTypeWhenResolvingTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/FooObserver.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/FooObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/typeWithParameters/FooObserver.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.event.resolve.typeWithParameters;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
public class FooObserver
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/DogTrainer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/DogTrainer.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/DogTrainer.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,8 +6,8 @@
import javax.ejb.EJBException;
import javax.ejb.Stateless;
import javax.ejb.TransactionManagement;
-import javax.event.BeforeTransactionCompletion;
-import javax.event.Observes;
+import javax.enterprise.event.BeforeTransactionCompletion;
+import javax.enterprise.event.Observes;
import javax.transaction.UserTransaction;
@Stateless
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/transactionalObservers/Pomeranian.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -13,12 +13,12 @@
import javax.ejb.Stateful;
import javax.ejb.TransactionManagement;
import javax.enterprise.context.SessionScoped;
+import javax.enterprise.event.AfterTransactionCompletion;
+import javax.enterprise.event.AfterTransactionFailure;
+import javax.enterprise.event.AfterTransactionSuccess;
+import javax.enterprise.event.BeforeTransactionCompletion;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Named;
-import javax.event.AfterTransactionCompletion;
-import javax.event.AfterTransactionFailure;
-import javax.event.AfterTransactionSuccess;
-import javax.event.BeforeTransactionCompletion;
-import javax.event.Observes;
import javax.transaction.SystemException;
import javax.transaction.UserTransaction;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/SpiderProducer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/SpiderProducer_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/SpiderProducer_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken4;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Produces;
-import javax.event.Observes;
@AnotherDeploymentType
class SpiderProducer_Broken
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/Polar.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/Polar.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/Polar.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -10,7 +10,7 @@
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -10,7 +10,7 @@
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/GoldenRetriever.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/GoldenRetriever.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/GoldenRetriever.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -3,7 +3,7 @@
import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.enterprise.context.RequestScoped;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
@Stateful
@RequestScoped
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -6,7 +6,6 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.AnnotationLiteral;
-import javax.enterprise.inject.Current;
import javax.enterprise.inject.New;
import javax.enterprise.inject.deployment.Standard;
import javax.enterprise.inject.spi.Bean;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/parameterAnnotatedObserves/Grouse_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/parameterAnnotatedObserves/Grouse_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/initializer/parameterAnnotatedObserves/Grouse_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.implementation.initializer.parameterAnnotatedObserves;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Initializer;
-import javax.event.Observes;
class Grouse_Broken
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -7,7 +7,6 @@
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.deployment.Production;
import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/SpiderStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/SpiderStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/SpiderStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -27,8 +27,8 @@
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
import javax.enterprise.inject.deployment.Production;
+import javax.enterprise.inject.stereotype.Stereotype;
/**
* Test stereotype used to change the scope type and deployment type
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/SpecializedTarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/SpecializedTarantulaProducer.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/SpecializedTarantulaProducer.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -18,7 +18,7 @@
package org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle;
import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
/**
* This bean contains a producer field and specializes another bean
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/SpiderStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/SpiderStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/SpiderStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -27,8 +27,8 @@
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
import javax.enterprise.inject.deployment.Production;
+import javax.enterprise.inject.stereotype.Stereotype;
/**
* Test stereotype used to change the scope type and deployment type
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/AndalusianChicken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/AndalusianChicken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/AndalusianChicken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.implementation.producer.method.definition;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChicken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChicken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChicken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise;
import javax.ejb.Stateful;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@AnotherDeploymentType
@Stateful
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/AndalusianChicken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/AndalusianChicken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/AndalusianChicken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducerNotUsed.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducerNotUsed.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducerNotUsed.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,5 @@
package org.jboss.jsr299.tck.tests.implementation.producer.method.lifecycle;
-import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Produces;
public class SpiderProducerNotUsed
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/parameterAnnotatedObserves/SpiderProducer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/parameterAnnotatedObserves/SpiderProducer_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/parameterAnnotatedObserves/SpiderProducer_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.implementation.producer.method.parameterAnnotatedObserves;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.deployment.Production;
-import javax.event.Observes;
@Production
class SpiderProducer_Broken
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/stereotypeEnforcesRequiredTypes/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/stereotypeEnforcesRequiredTypes/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/stereotypeEnforcesRequiredTypes/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/constructorHasObservesParameter/ObservingConstructor_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/constructorHasObservesParameter/ObservingConstructor_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/constructorHasObservesParameter/ObservingConstructor_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.implementation.simple.definition.constructorHasObservesParameter;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
class ObservingConstructor_Broken
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -8,7 +8,7 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/MountainLion.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/MountainLion.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/MountainLion.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.implementation.simple.lifecycle;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/RequestScopedAnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/RequestScopedAnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/RequestScopedAnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -7,7 +7,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class, supportedScopes=RequestScoped.class)
@Target( { TYPE })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -11,7 +11,7 @@
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
@Target( { TYPE, METHOD, FIELD })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Fox.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Fox.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Fox.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Produces;
-import javax.event.Observes;
@AnimalStereotype
class Fox
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/LazyFarmer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/LazyFarmer.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/LazyFarmer.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise;
import javax.ejb.Stateful;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes @Lazy
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/Office.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/Office.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/Office.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise;
import javax.ejb.Stateful;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/directlyExtendsNothing/Cow_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/directlyExtendsNothing/Cow_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/directlyExtendsNothing/Cow_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.directlyExtendsNothing;
import javax.ejb.Stateful;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@Stateful
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/directlyExtendsSimpleBean/Tractor_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/directlyExtendsSimpleBean/Tractor_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/directlyExtendsSimpleBean/Tractor_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.directlyExtendsSimpleBean;
import javax.ejb.Stateful;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/implementInterfaceAndExtendsNothing/Donkey_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/implementInterfaceAndExtendsNothing/Donkey_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/implementInterfaceAndExtendsNothing/Donkey_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.implementInterfaceAndExtendsNothing;
import javax.ejb.Stateful;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/sameName/FarmYard_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/sameName/FarmYard_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/sameName/FarmYard_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import javax.ejb.Stateful;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/samePrecedence/OrganicFarmer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/samePrecedence/OrganicFarmer_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/samePrecedence/OrganicFarmer_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.samePrecedence;
import javax.ejb.Stateful;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@Stateful
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/twoBeansSpecializeTheSameBean/FishFarmer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/twoBeansSpecializeTheSameBean/FishFarmer_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/twoBeansSpecializeTheSameBean/FishFarmer_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.twoBeansSpecializeTheSameBean;
import javax.ejb.Stateful;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/twoBeansSpecializeTheSameBean/SheepFarmer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/twoBeansSpecializeTheSameBean/SheepFarmer_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/twoBeansSpecializeTheSameBean/SheepFarmer_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.twoBeansSpecializeTheSameBean;
import javax.ejb.Stateful;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/JewelryShop.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/JewelryShop.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/JewelryShop.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method;
import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
class JewelryShop extends Shop
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/indirectOverride/ShoeShop_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/indirectOverride/ShoeShop_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/indirectOverride/ShoeShop_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.indirectOverride;
import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
class ShoeShop_Broken extends MallShop
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/lowerprecedence/ClothesShop_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/lowerprecedence/ClothesShop_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/lowerprecedence/ClothesShop_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.lowerprecedence;
import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
class ClothesShop_Broken extends Shop
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/specializesStaticMethod/FurnitureShop_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/specializesStaticMethod/FurnitureShop_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/specializesStaticMethod/FurnitureShop_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.specializesStaticMethod;
import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
class FurnitureShop_Broken extends Shop
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/specializingAndSpecializedBeanHaveName/HighSchool_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/specializingAndSpecializedBeanHaveName/HighSchool_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/specializingAndSpecializedBeanHaveName/HighSchool_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -2,7 +2,7 @@
import javax.enterprise.inject.Named;
import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
class HighSchool_Broken extends School
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/Bookshop_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/Bookshop_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/Bookshop_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.twoBeansSpecializeTheSameBean;
import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
class Bookshop_Broken extends Shop
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/PictureShop_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/PictureShop_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/PictureShop_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.producer.method.twoBeansSpecializeTheSameBean;
import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
class PictureShop_Broken extends Shop
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/LazyFarmer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/LazyFarmer.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/LazyFarmer.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes @Lazy
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/Office.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/Office.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/Office.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.extendejb;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/names/FarmYard_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/names/FarmYard_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/names/FarmYard_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.names;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/Donkey_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/Donkey_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend1/Donkey_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.noextend1;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/Cow_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/Cow_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend2/Cow_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.noextend2;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/Cow_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/Cow_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/noextend3/Cow_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.noextend3;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/precedence/OrganicFarmer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/precedence/OrganicFarmer_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/precedence/OrganicFarmer_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.precedence;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
class OrganicFarmer_Broken extends Farmer
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/FishFarmer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/FishFarmer_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/FishFarmer_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.two;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes
@AnotherDeploymentType
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/SheepFarmer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/SheepFarmer_Broken.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/SheepFarmer_Broken.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.inheritance.specialization.simple.broken.two;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
@Specializes @AnotherDeploymentType
class SheepFarmer_Broken extends Farmer
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/byname/duplicateNameResolution/DuplicateNameResolutionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/byname/duplicateNameResolution/DuplicateNameResolutionTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/byname/duplicateNameResolution/DuplicateNameResolutionTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -17,8 +17,6 @@
package org.jboss.jsr299.tck.tests.lookup.byname.duplicateNameResolution;
-import javax.enterprise.inject.AmbiguousResolutionException;
-
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Other.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Other.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Other.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -7,7 +7,6 @@
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -1,7 +1,5 @@
package org.jboss.jsr299.tck.tests.lookup.injection;
-import javax.enterprise.context.ContextNotActiveException;
-
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotype.java 2009-06-25 23:12:36 UTC (rev 2896)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE, METHOD, FIELD })
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2895 - in ri/trunk: api/src/main/java/javax and 30 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-06-25 19:09:58 -0400 (Thu, 25 Jun 2009)
New Revision: 2895
Added:
ri/trunk/api/src/main/java/javax/decorator/package-info.java
ri/trunk/api/src/main/java/javax/enterprise/context/BusyConversationException.java
ri/trunk/api/src/main/java/javax/enterprise/context/ContextException.java
ri/trunk/api/src/main/java/javax/enterprise/context/NonexistentConversationException.java
ri/trunk/api/src/main/java/javax/enterprise/event/
ri/trunk/api/src/main/java/javax/enterprise/event/TransactionPhase.java
ri/trunk/api/src/main/java/javax/enterprise/event/package-info.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Policy.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Specializes.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java
ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/
ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Model.java
ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Stereotype.java
ri/trunk/api/src/main/java/javax/interceptor/package-info.java
ri/trunk/core-api/src/main/java/org/jboss/webbeans/Realizes.java
Removed:
ri/trunk/api/src/main/java/javax/enterprise/inject/Model.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Stereotype.java
ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Specializes.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ManagedBean.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProducerBean.java
ri/trunk/api/src/main/java/javax/event/
ri/trunk/api/src/main/java/javax/inject/Realizes.java
Modified:
ri/trunk/api/pom.xml
ri/trunk/api/src/main/java/javax/decorator/Decorator.java
ri/trunk/api/src/main/java/javax/enterprise/context/ContextNotActiveException.java
ri/trunk/api/src/main/java/javax/enterprise/context/Conversation.java
ri/trunk/api/src/main/java/javax/enterprise/event/AfterTransactionCompletion.java
ri/trunk/api/src/main/java/javax/enterprise/event/AfterTransactionFailure.java
ri/trunk/api/src/main/java/javax/enterprise/event/AfterTransactionSuccess.java
ri/trunk/api/src/main/java/javax/enterprise/event/BeforeTransactionCompletion.java
ri/trunk/api/src/main/java/javax/enterprise/event/Event.java
ri/trunk/api/src/main/java/javax/enterprise/event/Notify.java
ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java
ri/trunk/api/src/main/java/javax/enterprise/event/ObserverException.java
ri/trunk/api/src/main/java/javax/enterprise/event/Observes.java
ri/trunk/api/src/main/java/javax/enterprise/inject/Instance.java
ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/DeploymentType.java
ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Production.java
ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Standard.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterDeploymentValidation.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Extension.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InjectionTarget.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java
ri/trunk/api/src/main/java/javax/inject/Obtains.java
ri/trunk/api/src/main/java/javax/interceptor/Interceptor.java
ri/trunk/api/src/main/java/javax/interceptor/InterceptorBindingType.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/InstanceImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AfterBeanDiscoveryImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolverImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventManager.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventObserver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/StereotypeModel.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/ActivitiesTest.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/Fox.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/Dusk.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/ELCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/EventCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InactiveScopeTest.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InjectedManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InstanceCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/JndiManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/NonNormalScopeTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserver.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesApplicationContext.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/NormalScopedBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/SimpleEventTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/xml/beans/annotationtype/TestStereotype.java
Log:
Update API to 20090625, mark all old methods still required by TCK as @Deprecated, new methods in RI are throw new UnsupportedOperationException()
Modified: ri/trunk/api/pom.xml
===================================================================
--- ri/trunk/api/pom.xml 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/pom.xml 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -9,15 +10,19 @@
<groupId>org.jboss.webbeans</groupId>
<artifactId>jsr299-api</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>JSR-299 API</name>
<url>http://www.seamframework.org/WebBeans</url>
<dependencies>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ </dependency>
+ </dependencies>
</project>
Modified: ri/trunk/api/src/main/java/javax/decorator/Decorator.java
===================================================================
--- ri/trunk/api/src/main/java/javax/decorator/Decorator.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/decorator/Decorator.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -24,7 +24,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
/**
* Specifies that a class is a decorator.
Added: ri/trunk/api/src/main/java/javax/decorator/package-info.java
===================================================================
--- ri/trunk/api/src/main/java/javax/decorator/package-info.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/decorator/package-info.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,5 @@
+package javax.decorator;
+
+/**
+ * The package javax.decorator contains annotations relating to decorators.
+ */
Property changes on: ri/trunk/api/src/main/java/javax/decorator/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/context/BusyConversationException.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/context/BusyConversationException.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/context/BusyConversationException.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.enterprise.context;
+
+/**
+ * The container ensures that a long-running conversation may be associated with
+ * at most one request at a time, by blocking or rejecting concurrent requests.
+ * If the container rejects a request, it must associate the request with a new
+ * transient conversation and throw an exception of type
+ * {@link BusyConversationException} from the restore view phase of the JSF
+ * lifecycle.
+ *
+ *
+ * @author Pete Muir
+ */
+
+public class BusyConversationException extends ContextException
+{
+
+ private static final long serialVersionUID = -3599813072560026919L;
+
+ public BusyConversationException()
+ {
+ super();
+ }
+
+ public BusyConversationException(String message)
+ {
+ super(message);
+ }
+
+ public BusyConversationException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public BusyConversationException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/BusyConversationException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/context/ContextException.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/context/ContextException.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/context/ContextException.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.enterprise.context;
+
+
+/**
+ * A ContextException is the base type for any context problem
+ *
+ * @author Pete Muir
+ * @author Shane Bryzak
+ */
+
+public class ContextException extends RuntimeException
+{
+
+ private static final long serialVersionUID = -3599813072560026919L;
+
+ public ContextException()
+ {
+ super();
+ }
+
+ public ContextException(String message)
+ {
+ super(message);
+ }
+
+ public ContextException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public ContextException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/ContextException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/api/src/main/java/javax/enterprise/context/ContextNotActiveException.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/context/ContextNotActiveException.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/context/ContextNotActiveException.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -19,17 +19,18 @@
/**
- * A ContextNotActiveException is thrown if at a particular point in the
- * execution of the program the scope is inactive with respect to the current
- * thread. When the scope is inactive, any invocation of the get() from the
+ * A {@link ContextNotActiveException} is thrown if at a particular point in the
+ * execution of the program the context is inactive with respect to the current
+ * thread. When the context is inactive, any invocation of the get() from the
* current thread upon the Context object for that scope results in a
* ContextNotActiveException.
*
+ *
* @author Pete Muir
* @author Shane Bryzak
*/
-public class ContextNotActiveException extends RuntimeException
+public class ContextNotActiveException extends ContextException
{
private static final long serialVersionUID = -3599813072560026919L;
Modified: ri/trunk/api/src/main/java/javax/enterprise/context/Conversation.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/context/Conversation.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/context/Conversation.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,62 +1,72 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package javax.enterprise.context;
/**
* Provides conversation management operations
*
* @author Pete Muir
- *
+ *
*/
-public interface Conversation
+public interface Conversation
{
-
+
/**
* Mark a transient conversation long running. The container will generate an
* id
+ *
+ * @throws IllegalStateException if the current conversation is marked long
+ * running
*/
public void begin();
-
+
/**
* Mark a transient conversation long running.
*
* @param id the id of the conversation
+ * @throws IllegalStateException if the current conversation is marked long
+ * running
+ * @throws IllegalArgumentException if a long running conversation with id
+ * already exists
*/
public void begin(String id);
-
+
/**
* Mark a long running conversation transient
+ *
+ * @throws IllegalStateException if the current conversation is marked
+ * transient
*/
public void end();
-
+
/**
* Determine if a conversation is long running or transient
*
* @return true if the conversation is long running
*/
public boolean isLongRunning();
-
+
/**
* Get the id associated with the current long running conversation
*
* @return the id of the current long running conversation
*/
public String getId();
-
+
/**
* Get the timeout for the current long running conversation.
*
@@ -66,11 +76,17 @@
* @return the current timeout in milliseconds
*/
public long getTimeout();
-
+
/**
* Set the timeout for the current long running conversation
*
* @param milliseconds the new timeout in milliseconds
*/
public void setTimeout(long milliseconds);
+
+ /**
+ * @return true if the conversation is marked transient, or false if it is
+ * marked long-running.
+ */
+ public boolean isTransient();
}
\ No newline at end of file
Added: ri/trunk/api/src/main/java/javax/enterprise/context/NonexistentConversationException.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/context/NonexistentConversationException.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/context/NonexistentConversationException.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.enterprise.context;
+
+/**
+ * If the propagated conversation cannot be restored, the container must
+ * associate the request with a new transient conversation and throw an
+ * exception of type {@link NonexistentConversationException} from the
+ * restore view phase of the JSF lifecycle. The application may handle this
+ * exception using the JSF ExceptionHandler.
+ *
+ *
+ *
+ * @author Pete Muir
+ */
+
+public class NonexistentConversationException extends ContextException
+{
+
+ private static final long serialVersionUID = -3599813072560026919L;
+
+ public NonexistentConversationException()
+ {
+ super();
+ }
+
+ public NonexistentConversationException(String message)
+ {
+ super(message);
+ }
+
+ public NonexistentConversationException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public NonexistentConversationException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/context/NonexistentConversationException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/api/src/main/java/javax/enterprise/event (from rev 2892, ri/trunk/api/src/main/java/javax/event)
Modified: ri/trunk/api/src/main/java/javax/enterprise/event/AfterTransactionCompletion.java
===================================================================
--- ri/trunk/api/src/main/java/javax/event/AfterTransactionCompletion.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/AfterTransactionCompletion.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package javax.event;
+package javax.enterprise.event;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@@ -31,6 +31,7 @@
*/
@Retention(RUNTIME)
@Target(PARAMETER)
+@Deprecated
public @interface AfterTransactionCompletion
{
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/event/AfterTransactionFailure.java
===================================================================
--- ri/trunk/api/src/main/java/javax/event/AfterTransactionFailure.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/AfterTransactionFailure.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package javax.event;
+package javax.enterprise.event;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@@ -31,6 +31,7 @@
*/
@Retention(RUNTIME)
@Target(PARAMETER)
+@Deprecated
public @interface AfterTransactionFailure
{
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/event/AfterTransactionSuccess.java
===================================================================
--- ri/trunk/api/src/main/java/javax/event/AfterTransactionSuccess.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/AfterTransactionSuccess.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package javax.event;
+package javax.enterprise.event;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@@ -31,6 +31,7 @@
*/
@Retention(RUNTIME)
@Target(PARAMETER)
+@Deprecated
public @interface AfterTransactionSuccess
{
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/event/BeforeTransactionCompletion.java
===================================================================
--- ri/trunk/api/src/main/java/javax/event/BeforeTransactionCompletion.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/BeforeTransactionCompletion.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package javax.event;
+package javax.enterprise.event;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@@ -32,6 +32,7 @@
*/
@Retention(RUNTIME)
@Target(PARAMETER)
+@Deprecated
public @interface BeforeTransactionCompletion
{
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/event/Event.java
===================================================================
--- ri/trunk/api/src/main/java/javax/event/Event.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/Event.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -15,10 +15,12 @@
* limitations under the License.
*/
-package javax.event;
+package javax.enterprise.event;
import java.lang.annotation.Annotation;
+import javax.enterprise.inject.TypeLiteral;
+
/**
* An interface for firing events of a particular type, and registering
* observers for events of that type.
@@ -39,14 +41,30 @@
* @param event the event type
* @param bindings the event bindings
*/
+ @Deprecated
public void fire(T event, Annotation... bindings);
/**
+ * Fire an event
+ *
+ * @param event the event type
+ */
+ public void fire(T event);
+
+ public <U extends T> Event<U> select(Annotation... bindings);
+ public <U extends T> Event<U> select(Class<U> subtype, Annotation... bindings);
+ public <U extends T> Event<U> select(TypeLiteral<U> subtype, Annotation... bindings);
+
+
+ /**
* Register an observer for a specific type
*
* @param observer the observer to register
* @param bindings the bindings to observe the event for
*/
+ @Deprecated
public void observe(Observer<T> observer, Annotation... bindings);
+
+
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/event/Notify.java
===================================================================
--- ri/trunk/api/src/main/java/javax/event/Notify.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/Notify.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,28 +1,45 @@
-package javax.event;
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.enterprise.event;
/**
- * An enumeration that is used to declare the condition under which an
- * observer method should be called. The default behavior is to
- * create the bean and invoke the observer method synchronously.
+ * An enumeration that is used to declare the condition under which an observer
+ * method should be called. The default behavior is to create the bean and
+ * invoke the observer method synchronously.
*
* @author Gavin King
* @author Dan Allen
*/
-public enum Notify {
- /**
- * Specifies that an observer method is only called if the current instance of
- * the bean declaring the observer method already exists.
- */
- IF_EXISTS,
-
- /**
- * Specifies that an observer method is called synchronously.
- */
- SYNCHRONOUSLY,
-
- /**
- * Specifies that an observer method receives the event notifications
- * asynchronously.
- */
- ASYNCHRONOUSLY
+public enum Notify
+{
+ /**
+ * Specifies that an observer method is only called if the current instance
+ * of the bean declaring the observer method already exists.
+ */
+ IF_EXISTS,
+
+ /**
+ * Specifies that an observer method is called synchronously.
+ */
+ SYNCHRONOUSLY,
+
+ /**
+ * Specifies that an observer method receives the event notifications
+ * asynchronously.
+ */
+ ASYNCHRONOUSLY
}
\ No newline at end of file
Modified: ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java
===================================================================
--- ri/trunk/api/src/main/java/javax/event/Observer.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,4 +1,20 @@
-package javax.event;
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.enterprise.event;
/**
* The contract between the manager and an observer object.
@@ -6,7 +22,11 @@
*
* @author Gavin King
*
+ * @deprecated Removed in latest rev of spec.
+ *
+ * TODO Move into RI and remove TCK assertions
*/
+@Deprecated
public interface Observer<T>
{
public boolean notify(T event);
Modified: ri/trunk/api/src/main/java/javax/enterprise/event/ObserverException.java
===================================================================
--- ri/trunk/api/src/main/java/javax/event/ObserverException.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/ObserverException.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,23 +1,22 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
-package javax.event;
+package javax.enterprise.event;
-
/**
* Wraps any checked exceptions which occur during the notification of an
* observer
@@ -32,7 +31,7 @@
public ObserverException()
{
-
+
}
public ObserverException(String message)
Modified: ri/trunk/api/src/main/java/javax/enterprise/event/Observes.java
===================================================================
--- ri/trunk/api/src/main/java/javax/event/Observes.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/Observes.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package javax.event;
+package javax.enterprise.event;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Added: ri/trunk/api/src/main/java/javax/enterprise/event/TransactionPhase.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/event/TransactionPhase.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/TransactionPhase.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.event;
+
+/**
+ * The enumeration {@link TransactionPhase} identifies the kind
+ * of transactional observer method
+ *
+ * Transactional observer methods are observer methods which receive event
+ * notifications during the before or after completion phase of the
+ * transaction in which the event was fired. If no transaction is in progress
+ * when the event is fired, they are notified at the same time as other
+ * observers.
+ *
+ *
+ * @author Pete Muir
+ *
+ */
+public enum TransactionPhase
+{
+
+ IN_PROGRESS,
+
+ /**
+ * A before completion observer method is called during the before completion
+ * phase of the transaction.
+ */
+ BEFORE_COMPLETION,
+
+ /**
+ * An after completion observer method is called during the after completion
+ * phase of the transaction.
+ */
+ AFTER_COMPLETION,
+
+ /**
+ * An after failure observer method is called during the after completion
+ * phase of the transaction, only when the transaction fails.
+ */
+ AFTER_FAILURE,
+
+ /**
+ * A before completion observer method is called during the before completion
+ * phase of the transaction.
+ */
+ AFTER_SUCCESS
+
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/event/TransactionPhase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/event/package-info.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/event/package-info.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/package-info.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,6 @@
+package javax.enterprise.event;
+
+/**
+ * The package javax.enterprise.event contains annotations and interfaces
+ * relating to events.
+ */
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/event/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/Instance.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/Instance.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/Instance.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -47,4 +47,15 @@
*
*/
public T get(Annotation... bindings);
+
+ public Instance<T> select(Annotation... bindings);
+
+ public <U extends T> Instance<U> select(Class<U> subtype, Annotation... bindings);
+
+ public <U extends T> Instance<U> select(TypeLiteral<U> subtype, Annotation... bindings);
+
+ public boolean isUnsatisfied();
+
+ public boolean isAmbiguous();
+
}
Deleted: ri/trunk/api/src/main/java/javax/enterprise/inject/Model.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/Model.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/Model.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,26 +0,0 @@
-package javax.enterprise.inject;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.enterprise.context.RequestScoped;
-
-/**
- * A stereotype for MVC model objects
- *
- * @author Gavin King
- */
-
-@Named
-@RequestScoped
-@Stereotype
-@Target( { TYPE, METHOD, FIELD })
-@Retention(RUNTIME)
-public @interface Model
-{
-}
\ No newline at end of file
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/Policy.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/Policy.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/Policy.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.enterprise.inject;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that an annotation type is a deployment type.
+ *
+ * @author Gavin King
+ * @author Pete Muir
+ */
+
+@Target(TYPE)
+@Retention(RUNTIME)
+@Documented
+public @interface Policy
+{
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Policy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/api/src/main/java/javax/enterprise/inject/Specializes.java (from rev 2892, ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Specializes.java)
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/Specializes.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/Specializes.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.enterprise.inject;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that an implementation class directly specializes its superclass,
+ * of that a producer method directly specializes the method it overrides.
+ *
+ * @author Gavin King
+ * @author Pete Muir
+ */
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@Documented
+public @interface Specializes
+{
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/Specializes.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/api/src/main/java/javax/enterprise/inject/Stereotype.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/Stereotype.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/Stereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,55 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.enterprise.inject;
-
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that an annotation type is a stereotype.
- *
- * @author Pete Muir
- * @author Gavin King
- */
-
-@Retention(RUNTIME)
-@Target(ANNOTATION_TYPE)
-@Documented
-public @interface Stereotype
-{
-
- /**
- * Restrict the scope of the stereotyped bean
- *
- * @return the allowed scopes
- */
- public Class<? extends Annotation>[] supportedScopes() default {};
-
- /**
- * Require that stereotype beans have certain API types
- *
- * @return the required types
- */
- public Class<?>[] requiredTypes() default {};
-
-}
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/DeploymentType.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/DeploymentType.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/DeploymentType.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -34,6 +34,7 @@
@Target(ANNOTATION_TYPE)
@Retention(RUNTIME)
@Documented
+@Deprecated
public @interface DeploymentType
{
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Production.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Production.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Production.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -37,6 +37,7 @@
@Retention(RUNTIME)
@Documented
@DeploymentType
+@Deprecated
public @interface Production
{
}
Deleted: ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Specializes.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Specializes.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Specializes.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.enterprise.inject.deployment;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that an implementation class directly specializes its superclass,
- * of that a producer method directly specializes the method it overrides.
- *
- * @author Gavin King
- * @author Pete Muir
- */
-
-@Target({TYPE, METHOD})
-@Retention(RUNTIME)
-@Documented
-public @interface Specializes
-{
-}
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Standard.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Standard.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/deployment/Standard.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -37,6 +37,7 @@
@Retention(RUNTIME)
@Documented
@DeploymentType
+@Deprecated
public @interface Standard
{
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,5 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package javax.enterprise.inject.spi;
-public interface AfterBeanDiscovery {
- public void addDefinitionError(Throwable t);
+import javax.enterprise.context.spi.Context;
+
+public interface AfterBeanDiscovery
+{
+ public void addDefinitionError(Throwable t);
+
+ public void addBean(Bean<?> bean);
+
+ public void addObserverMethod(ObserverMethod<?, ?> observerMethod);
+
+ public void addContext(Context context);
+
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterDeploymentValidation.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterDeploymentValidation.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AfterDeploymentValidation.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,3 +1,19 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package javax.enterprise.inject.spi;
public interface AfterDeploymentValidation
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,4 +1,3 @@
-
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -28,9 +28,9 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.AmbiguousResolutionException;
import javax.enterprise.inject.UnsatisfiedResolutionException;
-import javax.event.Observer;
/**
* The contract between the application and the manager. Also the contract
@@ -46,201 +46,166 @@
public interface BeanManager
{
- /**
+ /**
* Obtains a contextual reference for a given bean and a given bean type.
*
- * @param bean
- * the Bean object representing the bean
- * @param beanType
- * a bean type that must be implemented by any proxy that is returned
+ * @param bean the Bean object representing the bean
+ * @param beanType a bean type that must be implemented by any proxy that is
+ * returned
* @return a contextual reference representing the bean
- * @throws IllegalArgumentException
- * if the given type is not a bean type of the given bean
+ * @throws IllegalArgumentException if the given type is not a bean type of
+ * the given bean
*/
- public Object getReference(Bean<?> bean, Type beanType, CreationalContext<?> creationalContext);
+ public Object getReference(Bean<?> bean, Type beanType, CreationalContext<?> ctx);
/**
* Obtains an instance of bean for a given injection point.
*
* This method should not be called by an application.
*
- * @param injectionPoint
- * the injection point the instance is needed for
- * @param creationalContext
- * the context in which the injection is occurring
+ * @param ij the injection point the instance is needed for
+ * @param ctx the context in which the injection is occurring
* @return an instance of the bean
- * @throws UnsatisfiedResolutionException
- * if no bean can be resolved for the given type and bindings
- * @throws AmbiguousResolutionException
- * if more than one bean is resolved for the given type and
- * bindings
+ * @throws UnsatisfiedResolutionException if no bean can be resolved for the
+ * given type and bindings
+ * @throws AmbiguousResolutionException if more than one bean is resolved for
+ * the given type and bindings
*/
- public Object getInjectableReference(InjectionPoint injectionPoint, CreationalContext<?> creationalContext);
+ public Object getInjectableReference(InjectionPoint ij, CreationalContext<?> ctx);
/**
- * Returns the set of beans which match the given required type and bindings and are
- * accessible to the class into which the BeanManager was injected, according to the
- * rules of typesafe resolution.
+ * Obtain an instance of a {@link CreationalContext} for the given contextual
*
+ * @param contextual the contextual to create a creational context for
+ * @return the {@link CreationalContext} instance
+ */
+ public <T> CreationalContext<T> createCreationalContext(Contextual<T> contextual);
+
+ /**
+ * Returns the set of beans which match the given required type and bindings
+ * and are accessible to the class into which the BeanManager was injected,
+ * according to the rules of typesafe resolution.
+ *
* Typesafe resolution usually occurs at container deployment time.
*
- * @param beanType
- * the type of the beans to be resolved
- * @param bindings
- * the bindings used to restrict the matched beans. If no bindings are passed to
- * getBeans(), the default binding @Current is assumed.
+ * @param beanType the type of the beans to be resolved
+ * @param bindings the bindings used to restrict the matched beans. If no
+ * bindings are passed to getBeans(), the default binding @Current
+ * is assumed.
* @return the matched beans
- * @throws IllegalArgumentException
- * if the given type represents a type variable, or
- * if two instances of the same binding type are given, or
- * if an instance of an annotation that is not a binding type is given
+ * @throws IllegalArgumentException if the given type represents a type
+ * variable
+ * @throws IllegalArgumentException if two instances of the same binding type
+ * are
+ * @throws IllegalArgumentException if an instance of an annotation that is
+ * not a binding type is given
*/
- public Set<Bean<?>> getBeans(Type beanType, Annotation... bindings);
+ public Set<Bean<?>> getBeans(Type beanType, Annotation... bindings);
-
/**
- * Returns the set of beans which match the given EL name and are accessible to the
- * class into which the BeanManager was injected, according to the rules of EL name
- * resolution.
+ * Returns the set of beans which match the given EL name and are accessible
+ * to the class into which the BeanManager was injected, according to the
+ * rules of EL name resolution.
*
- * @param name
- * the name used to restrict the beans matched
+ * @param name the name used to restrict the beans matched
* @return the matched beans
*/
- public Set<Bean<?>> getBeans(String name);
+ public Set<Bean<?>> getBeans(String name);
/**
- * Returns the Bean object representing the most specialized enabled bean registered
- * with the container that specializes the given bean,
-
+ * Returns the Bean object representing the most specialized enabled bean
+ * registered with the container that specializes the given bean,
+ *
* @param <X> The type of the bean
- * @param bean
- * The Bean representation of the bean.
- * @return the mest specialized enabled bean
+ * @param bean The Bean representation of the bean.
+ * @return the most specialized enabled bean
*/
- public <X> Bean<? extends X> getMostSpecializedBean(Bean<X> bean);
+ public <X> Bean<? extends X> getMostSpecializedBean(Bean<X> bean);
/**
* Returns the PassivationCapableBean with the given identifier.
*/
- public Bean<?> getPassivationCapableBean(String id);
+ public Bean<?> getPassivationCapableBean(String id);
/**
- * Allows resolution of an ambiguous dependency programatically, by returning the Bean
- * with the highest precedence deployment type in a set of beans.
-
+ * Apply the ambiguous dependency resolution rules
+ *
* @param <X> The type of the bean
* @param beans A set of beans of the given type
+ * @throws AmbiguousResolutionException if the ambiguous dependency
+ * resolution rules fail
*/
- public <X> Bean<? extends X> getHighestPrecedenceBean(Set<Bean<? extends X>> beans);
+ public <X> Bean<? extends X> resolve(Set<Bean<? extends X>> beans);
/**
- * Allows a new bean to be registered. This fires a ProcessBean event and then
- * registers a new bean with the container, thereby making it available for injection
- * into other beans.
+ * Validates the dependency
*
- * This method may be called at any time in the applications lifecycle.
- *
- * @param bean
- * the bean to register
+ * @param injectionPoint the injection point to validate
+ * @throws an InjectionException if there is a deployment problem (for
+ * example, an unsatisfied or unresolvable ambiguous dependency)
+ * associated with the injection point.
*/
- public void addBean(Bean<?> bean);
+ public void validate(InjectionPoint injectionPoint);
-
-
/**
- * Register an observer with the container, allowing it to begin receiving
- * event notifications.
+ * Fire an event
*
- * The observed event type is the actual type parameter of Observer declared
- * by the class of the observer object. The observer is notified when an
- * event object that is assignable to the observed event type is raised
- * with the observed event bindings.
- *
- * @param observer
- * the observer to register
- * @param bindings
- * event bindings to further restrict the events observed
- * passed
- * @throws IllegalArgumentException
- * if an annotation which is not a binding type is passed, or
- * if two instances of the same binding type are passed, or
- * if the runtime type of the observer object contains a type variable
+ * @param event the event object
+ * @param bindings the event bindings used to restrict the observers matched
+ * @throws IllegalArgumentException if the runtime type of the event object
+ * contains a type variable
+ * @throws IllegalArgumentException if two instances of the same binding type
+ * are given
+ * @throws IllegalArgumentException if an instance of an annotation that is
+ * not a binding type is given,
*/
- public void addObserver(Observer<?> observer, Annotation... bindings);
+ public void fireEvent(Object event, Annotation... bindings);
-
/**
- * An alternative mechanism for registering an observer. The observed event
- * type and event bindings for registration will be obtained from the
- * ObserverMethod instance
- * @param observerMethod
- * a the method to register for receiving events
- */
- public void addObserver(ObserverMethod<?, ?> observerMethod);
-
-
- /**
- * Remove an observer registration
+ * Obtains observers for an event by considering event type and bindings.
*
- * @param observer
- * the observer to register
- * @throws IllegalArgumentException
- * if an annotation which is not a event binding type is passed or
- * if two instances of the same binding type are passed
+ * @param <T> the type of the event to obtain
+ * @param event the event object
+ * @param bindings the bindings used to restrict the matched observers
+ * @return the resolved observers
+ * @throws IllegalArgumentException if a parameterized type with a type
+ * parameter or a wildcard is passed
+ * @throws IllegalArgumentException if an annotation which is not a event
+ * binding type is passed
+ * @throws IllegalArgumentException if two instances of the same binding type
+ * are passed
*/
- public void removeObserver(Observer<?> observer);
+ @Deprecated
+ public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings);
-
/**
- * Fire an event
- *
- * @param event
- * the event object
- * @param bindings
- * the event bindings used to restrict the observers matched
- * @throws IllegalArgumentException
- * if the runtime type of the event object contains a type variable or
- * if two instances of the same binding type are given, or
- * if an instance of an annotation that is not a binding type is given,
- */
- public void fireEvent(Object event, Annotation... bindings);
-
- /**
* Obtains observers for an event by considering event type and bindings.
*
- * @param <T>
- * the type of the event to obtain
- * @param event
- * the event object
- * @param bindings
- * the bindings used to restrict the matched observers
+ * @param <T> the type of the event to obtain
+ * @param event the event object
+ * @param bindings the bindings used to restrict the matched observers
* @return the resolved observers
- * @throws IllegalArgumentException
- * if a parameterized type with a type parameter or a wildcard is
- * passed
- * @throws IllegalArgumentException
- * if an annotation which is not a event binding type is passed
- * @throws IllegalArgumentException
- * if two instances of the same binding type are passed
+ * @throws IllegalArgumentException if a parameterized type with a type
+ * parameter or a wildcard is passed
+ * @throws IllegalArgumentException if an annotation which is not a event
+ * binding type is passed
+ * @throws IllegalArgumentException if two instances of the same binding type
+ * are passed
*/
- public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings);
+ public <T> Set<ObserverMethod<T, ?>> resolveObserverMethods(T event, Annotation... bindings);
/**
* Obtains an ordered list of enabled decorators for a set of bean types and
* a set of bindings
*
- * @param types
- * the set of bean types of the decorated bean
- * @param bindings
- * the bindings declared by the decorated bean
+ * @param types the set of bean types of the decorated bean
+ * @param bindings the bindings declared by the decorated bean
* @return the resolved decorators
- * @throws IllegalArgumentException
- * if the set of bean types is empty
- * @throws IllegalArgumentException
- * if an annotation which is not a binding type is passed
- * @throws IllegalArgumentException
- * if two instances of the same binding type are passed
+ * @throws IllegalArgumentException if the set of bean types is empty
+ * @throws IllegalArgumentException if an annotation which is not a binding
+ * type is passed
+ * @throws IllegalArgumentException if two instances of the same binding type
+ * are passed
*/
public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... bindings);
@@ -248,32 +213,18 @@
* Obtains an ordered list of enabled interceptors for a set interceptor
* bindings
*
- * @param type
- * the type of the interception
- * @param bindings
- * the bindings used to restrict the matched interceptors
+ * @param type the type of the interception
+ * @param bindings the bindings used to restrict the matched interceptors
* @return the resolved interceptors
- * @throws IllegalArgumentException
- * if no interceptor binding type is passed
- * @throws IllegalArgumentException
- * if an annotation which is not a interceptor binding type is
- * passed
- * @throws IllegalArgumentException
- * if two instances of the same binding type are passed
+ * @throws IllegalArgumentException if no interceptor binding type is passed
+ * @throws IllegalArgumentException if an annotation which is not a
+ * interceptor binding type is passed
+ * @throws IllegalArgumentException if two instances of the same binding type
+ * are passed
*/
public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings);
/**
- * Validates the dependency
- * @throws
- * an InjectionException if there is a deployment problem
- * (for example, an unsatisfied or unresolvable ambiguous
- * dependency) associated with the injection point.
- * @param injectionPoint the injection point to validate
- */
- public void validate(InjectionPoint injectionPoint);
-
- /**
* Determine if the given annotationType is a scope type
*/
public boolean isScopeType(Class<? extends Annotation> annotationType);
@@ -283,7 +234,6 @@
*/
public boolean isBindingType(Class<? extends Annotation> annotationType);
-
/**
* Determine if the given annotationType is an interceptor binding type
*/
@@ -295,123 +245,126 @@
public boolean isStereotype(Class<? extends Annotation> annotationType);
/**
- * Return a ScopeType definition type for a given annotation representing a scope type
+ * Return a ScopeType definition type for a given annotation representing a
+ * scope type
*/
public ScopeType getScopeDefinition(Class<? extends Annotation> scopeType);
/**
- * Obtain the set of interceptor binding types meta-annotatinos for the given binding type
- * annotation
+ * Obtain the set of interceptor binding types meta-annotatinos for the given
+ * binding type annotation
*/
public Set<Annotation> getInterceptorBindingTypeDefinition(Class<? extends Annotation> bindingType);
-
/**
- * Obtain the set of binding types meta-annotations for the given stereotype annotation
+ * Obtain the set of binding types meta-annotations for the given stereotype
+ * annotation
*/
public Set<Annotation> getStereotypeDefinition(Class<? extends Annotation> stereotype);
-
-
+
/**
- * Exposes the list of enabled deployment types, in order of lower to higher precedence,
- * This method may be used by portable extensions to discover information about the
- * deployment.
- */
- public List<Class<? extends Annotation>> getEnabledDeploymentTypes();
-
- /**
- * Associate a custom Context with a scope.
- *
- * This method may be called at any time in the applications lifecycle.
- *
- * @param context
- * the context to register
- */
- public void addContext(Context context);
-
- /**
* Obtain an active context instance for the given scope type.
*
- * @param scopeType
- * the scope to get the context instance for
+ * @param scopeType the scope to get the context instance for
* @return the context instance
- * @throws ContextNotActiveException
- * if no active contexts exist for the given scope type
- * @throws IllegalArgumentException
- * if more than one active context exists for the given scope type
+ * @throws ContextNotActiveException if no active contexts exist for the
+ * given scope type
+ * @throws IllegalArgumentException if more than one active context exists
+ * for the given scope type
*/
public Context getContext(Class<? extends Annotation> scopeType);
-
+
/**
- * Returns the ELResolver for integration with the servlet engine and JSF implementation
- * This resolver will return a contextual instance of a bean if the name for resolution
- * resolves to exactly one bean
+ * Returns the ELResolver for integration with the servlet engine and JSF
+ * implementation This resolver will return a contextual instance of a bean
+ * if the name for resolution resolves to exactly one bean
*/
public ELResolver getELResolver();
-
+
/**
- * Parse and validate the standard metadata defined by JSR-299 for the specified class,
- * returning an InjectionTarget to allow injection into custom beans or
- * non-contextual instances by portable extensions
- *
- * @param <T>
- * The type of the class to inspect
- * @param type
- * The class to inspect
- * @returns
- * a container provided instance of InjectionTarget for the given type
- * @throws IllegalArgumentException
- * if there is a definition error associated with any injection point of the type.
+ * Get an {@link AnnotatedType} for the given class
+ * @param <T> the type
+ * @param type the type
+ * @return the {@link AnnotatedType}
*/
- public <T> InjectionTarget<T> createInjectionTarget(Class<T> type);
-
+ public <T> AnnotatedType<T> createAnnotatedType(Class<T> type);
+
/**
- * Returns an InjectionTarget to allow injection into custom beans
- * or non-contextual instances by portable extensions.
+ * Returns an InjectionTarget to allow injection into custom beans or
+ * non-contextual instances by portable extensions.
*
- * The container ignores the annotations and types declared by the elements of the
- * actual Java class and uses the metadata provided via the Annotated interface instead.
-
- * @param <T>
- * The type of the AnnotatedType to inspect
- * @param type
- * The AnnotatedType to inspect
- * @returns
- * a container provided instance of InjectionTarget for the given type
- * @throws IllegalArgumentException
- * if there is a definition error associated with any injection point of the type.
+ * The container ignores the annotations and types declared by the elements
+ * of the actual Java class and uses the metadata provided via the Annotated
+ * interface instead.
+ *
+ * @param <T> The type of the AnnotatedType to inspect
+ * @param type The AnnotatedType to inspect
+ * @returns a container provided instance of InjectionTarget for the given
+ * type
+ * @throws IllegalArgumentException if there is a definition error associated
+ * with any injection point of the type.
*/
public <T> InjectionTarget<T> createInjectionTarget(AnnotatedType<T> type);
+
+ /**
+ * Allows a new bean to be registered. This fires a ProcessBean event and
+ * then registers a new bean with the container, thereby making it available
+ * for injection into other beans.
+ *
+ * This method may be called at any time in the applications lifecycle.
+ *
+ * @param bean the bean to register
+ */
+ @Deprecated
+ public void addBean(Bean<?> bean);
/**
- * Parse and validate the standard metadata defined by JSR-299 for the specified class,
- * returning a ManagedBean instance representing that class.
- * @param <T>
- * The type of the class
- * @param type
- * The class for which a managed bean instance should be created
+ * Register an observer with the container, allowing it to begin receiving
+ * event notifications.
+ *
+ * The observed event type is the actual type parameter of Observer declared
+ * by the class of the observer object. The observer is notified when an
+ * event object that is assignable to the observed event type is raised with
+ * the observed event bindings.
+ *
+ * @param observer the observer to register
+ * @param bindings event bindings to further restrict the events observed
+ * passed
+ * @throws IllegalArgumentException if an annotation which is not a binding
+ * type is passed, or if two instances of the same binding type
+ * are passed, or if the runtime type of the observer object
+ * contains a type variable
*/
- public <T> ManagedBean<T> createManagedBean(Class<T> type);
+ @Deprecated
+ public void addObserver(Observer<?> observer, Annotation... bindings);
/**
- * Returns a ManagedBean instance representing the metadata described by the specified
- * type.
+ * Remove an observer registration
*
- * The container ignores the annotations and types declared by the elements of the
- * actual Java class and uses the metadata provided via the Annotated interface instead.
- * @param <T>
- * The type of the underlying bean
- * @param type
- * The metadata for construction of the ManagedBean
+ * @param observer the observer to register
+ * @throws IllegalArgumentException if an annotation which is not a event
+ * binding type is passed or if two instances of the same binding
+ * type are passed
*/
- public <T> ManagedBean<T> createManagedBean(AnnotatedType<T> type);
-
+ @Deprecated
+ public void removeObserver(Observer<?> observer);
+
/**
- * Obtain an instance of a {@link CreationalContext} for the given contextual
+ * Exposes the list of enabled deployment types, in order of lower to higher
+ * precedence, This method may be used by portable extensions to discover
+ * information about the deployment.
+ */
+ @Deprecated
+ public List<Class<? extends Annotation>> getEnabledDeploymentTypes();
+
+ /**
+ * Associate a custom Context with a scope.
*
- * @param contextual the contextual to create a creational context for
- * @return the {@link CreationalContext} instance
+ * This method may be called at any time in the applications lifecycle.
+ *
+ * @param context the context to register
*/
- public <T> CreationalContext<T> createCreationalContext(Contextual<T> contextual);
+ @Deprecated
+ public void addContext(Context context);
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,3 +1,19 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package javax.enterprise.inject.spi;
import java.lang.annotation.Annotation;
@@ -2,7 +18,16 @@
-public interface BeforeBeanDiscovery {
- public void addBindingType(Class<? extends Annotation> bindingType);
- public void addScopeType(Class<? extends Annotation> scopeType, boolean normal, boolean passivating);
- public void addStereotype(Class<? extends Annotation> stereotype, Annotation... stereotypeDef);
- public void addInterceptorBindingType(Class<? extends Annotation> bindingType);
+/**
+ *
+ * @author Pete Muir
+ *
+ */
+public interface BeforeBeanDiscovery
+{
+ public void addBindingType(Class<? extends Annotation> bindingType);
+
+ public void addScopeType(Class<? extends Annotation> scopeType, boolean normal, boolean passivating);
+
+ public void addStereotype(Class<? extends Annotation> stereotype, Annotation... stereotypeDef);
+
+ public void addInterceptorBindingType(Class<? extends Annotation> bindingType);
}
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,21 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface BeforeShutdown
+{
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeforeShutdown.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Extension.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Extension.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Extension.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package javax.enterprise.inject.spi;
+/**
+ *
+ * @author Pete Muir
+ *
+ */
public interface Extension {}
\ No newline at end of file
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InjectionTarget.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InjectionTarget.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/InjectionTarget.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,19 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package javax.enterprise.inject.spi;
-import java.util.Set;
-
import javax.enterprise.context.spi.CreationalContext;
-public interface InjectionTarget<X>
+/**
+ *
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public interface InjectionTarget<T> extends Producer<T>
{
- public X produce(CreationalContext<X> ctx);
-
- public void inject(X instance, CreationalContext<X> ctx);
-
- public void dispose(X instance);
-
- public void destroy(X instance);
-
- public Set<InjectionPoint> getInjectionPoints();
-
+
+ public void inject(T instance, CreationalContext<T> ctx);
+
+ public void postConstruct(T instance);
+
+ public void preDestroy(T instance);
+
}
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -18,10 +18,11 @@
package javax.enterprise.inject.spi;
import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
import java.util.Set;
+import javax.interceptor.InvocationContext;
+
public interface Interceptor<T> extends Bean<T>
{
@@ -31,16 +32,9 @@
* @return the interceptor bindings
*/
public Set<Annotation> getInterceptorBindingTypes();
+
+ public boolean intercepts(InterceptionType type);
+ public Object intercept(InterceptionType type, T instance, InvocationContext ctx);
- /**
- * The interceptor method for the specified lifecycle callback or business
- * method
- *
- * @param type
- * the interception type
- * @return the method, or null if the interceptor does not intercept
- * lifecycle callbacks or business methods
- */
- public Method getMethod(InterceptionType type);
}
\ No newline at end of file
Deleted: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ManagedBean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ManagedBean.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ManagedBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,11 +0,0 @@
-package javax.enterprise.inject.spi;
-
-import java.util.Set;
-
-public interface ManagedBean<X> extends Bean<X> {
- public AnnotatedType<X> getAnnotatedType();
- public InjectionTarget<X> getInjectionTarget();
- public Set<ProducerBean<X, ?>> getProducerBeans();
- public Set<ObserverMethod<X,?>> getObserverMethods();
- public Bean<X> getBeanClass();
-}
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -4,13 +4,14 @@
import java.lang.reflect.Type;
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Notify;
+import javax.enterprise.event.TransactionPhase;
-public interface ObserverMethod<X, T> extends Observer<T> {
- public AnnotatedMethod<? super X> getAnnotatedMethod();
+public interface ObserverMethod<X, T> {
public Bean<X> getBean();
- public Type getObservedEventType();
- public Set<Annotation> getObservedEventBindings();
- public void notify(X instance, T event);
- public Set<InjectionPoint> getInjectionPoints();
+ public Type getObservedType();
+ public Set<Annotation> getObservedBindings();
+ public Notify getNotify();
+ public TransactionPhase getTransactionPhase();
+ public void notify(T event);
}
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessAnnotatedType<X>
+{
+ public AnnotatedType<X> getAnnotatedType();
+
+ public void setAnnotatedType(AnnotatedType<X> t!
ype);
+
+ public void veto();
+}
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessAnnotatedType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessBean<X>
+{
+ public Annotated getAnnotated();
+
+ public Bean<X> getBean();
+
+ public void addDefinitionError(Thro!
wable t);
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessInjectionTarget<X>
+{
+ public AnnotatedType<X> getAnnotatedType();
+
+ public InjectionTarget<X> getInjectionTarget(!
);
+
+ public void setInjectionTarget(InjectionTarget<X> injectionTarget);
+
+ public void addDefinitionError(Throwable t);
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessInjectionTarget.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessManagedBean<X> extends ProcessBean<X>
+{
+ public AnnotatedType<X> getAnnotatedBeanClass();
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessManagedBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessProcessObserverMethod<X, T>
+{
+ public AnnotatedMethod<X> getAnnotatedMethod();
+
+ public ObserverMethod<X, T> getO!
bserverMethod();
+
+ public void addDefinitionError(Throwable t);
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProcessObserverMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.enterprise.inject.spi;
+
+public interface ProcessProducer<X, T>
+{
+ public AnnotatedMember<X> getAnnotatedMember();
+
+ public Producer<T> getProducer();
+
+ pub!
lic void setProducer(Producer<T> producer);
+
+ public void addDefinitionError(Throwable t);
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessProducerField<X, T> extends ProcessBean<T>
+{
+ public AnnotatedField<X> getAnnotatedProducerField();
+}
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerField.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public interface ProcessProducerMethod<X, T> extends ProcessBean<T>
+{
+ public AnnotatedMethod<X> getAnnotatedProducerMethod();
+
+ public A!
nnotatedParameter<X> getAnnotatedDisposedParameter();
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessProducerMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.enterprise.inject.spi;
+
+public interface ProcessSessionBean<X> extends ProcessBean<Object>
+{
+ public AnnotatedType<X> getAnnotatedBeanClass();
+
+ public String !
getEjbName();
+
+ public SessionBeanType getSessionBeanType();
+}
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProcessSessionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+import java.util.Set;
+
+import javax.enterprise.context.spi.CreationalContext;
+/**
+ * The interface javax.enterprise.inject.spi.Producer provi!
des a generic operation for producing an instance of a type.
+
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public interface Producer<T>
+{
+ public T produce(CreationalContext<T> ctx);
+
+ public void dispose(T instance);
+
+ public Set<InjectionPoint> getInjectionPoints();
+}
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Producer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProducerBean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProducerBean.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/ProducerBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,9 +0,0 @@
-package javax.enterprise.inject.spi;
-
-public interface ProducerBean<X, T> extends Bean<T> {
- public AnnotatedMember<? super X> getAnnotatedProducer();
- public AnnotatedMethod<? super X> getAnnotatedDisposer();
- public Bean<X> getBean();
- public InjectionTarget<T> getInjectionTarget();
- public Bean<X> getBeanClass();
-}
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.enterprise.inject.spi;
+
+public enum SessionBeanType
+{
+ STATELESS, STATEFUL, SINGLETON
+}
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/SessionBeanType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Model.java (from rev 2892, ri/trunk/api/src/main/java/javax/enterprise/inject/Model.java)
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Model.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Model.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,27 @@
+package javax.enterprise.inject.stereotype;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Named;
+
+/**
+ * A stereotype for MVC model objects
+ *
+ * @author Gavin King
+ */
+
+@Named
+@RequestScoped
+@Stereotype
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface Model
+{
+}
\ No newline at end of file
Copied: ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Stereotype.java (from rev 2892, ri/trunk/api/src/main/java/javax/enterprise/inject/Stereotype.java)
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Stereotype.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Stereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.enterprise.inject.stereotype;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that an annotation type is a stereotype.
+ *
+ * @author Pete Muir
+ * @author Gavin King
+ */
+
+@Retention(RUNTIME)
+@Target(ANNOTATION_TYPE)
+@Documented
+public @interface Stereotype
+{
+
+ /**
+ * Restrict the scope of the stereotyped bean
+ *
+ * @return the allowed scopes
+ */
+ public Class<? extends Annotation>[] supportedScopes() default {};
+
+ /**
+ * Require that stereotype beans have certain API types
+ *
+ * @return the required types
+ */
+ public Class<?>[] requiredTypes() default {};
+
+}
Property changes on: ri/trunk/api/src/main/java/javax/enterprise/inject/stereotype/Stereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/api/src/main/java/javax/inject/Obtains.java
===================================================================
--- ri/trunk/api/src/main/java/javax/inject/Obtains.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/inject/Obtains.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -38,6 +38,7 @@
@Retention(RUNTIME)
@Target( { TYPE, METHOD, FIELD, PARAMETER })
@Documented
+@Deprecated
public @interface Obtains
{
}
Deleted: ri/trunk/api/src/main/java/javax/inject/Realizes.java
===================================================================
--- ri/trunk/api/src/main/java/javax/inject/Realizes.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/inject/Realizes.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.inject;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that an implementation class directly specializes its superclass,
- * of that a producer method directly specializes the method it overrides.
- *
- * @author Gavin King
- * @author Pete Muir
- */
-
-@Target(TYPE)
-@Retention(RUNTIME)
-@Documented
-public @interface Realizes
-{
-}
Modified: ri/trunk/api/src/main/java/javax/interceptor/Interceptor.java
===================================================================
--- ri/trunk/api/src/main/java/javax/interceptor/Interceptor.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/interceptor/Interceptor.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -20,10 +20,11 @@
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
/**
* Specifies that a class is an interceptor.
@@ -34,6 +35,5 @@
@Retention(RUNTIME)
@Target(TYPE)
@Stereotype
-public @interface Interceptor
-{
-}
+@Documented
+public @interface Interceptor {}
Modified: ri/trunk/api/src/main/java/javax/interceptor/InterceptorBindingType.java
===================================================================
--- ri/trunk/api/src/main/java/javax/interceptor/InterceptorBindingType.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/api/src/main/java/javax/interceptor/InterceptorBindingType.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -34,6 +34,4 @@
@Target(ANNOTATION_TYPE)
@Retention(RUNTIME)
@Documented
-public @interface InterceptorBindingType
-{
-}
+public @interface InterceptorBindingType {}
Added: ri/trunk/api/src/main/java/javax/interceptor/package-info.java
===================================================================
--- ri/trunk/api/src/main/java/javax/interceptor/package-info.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/interceptor/package-info.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,5 @@
+package javax.interceptor;
+
+/**
+ *
+ */
\ No newline at end of file
Property changes on: ri/trunk/api/src/main/java/javax/interceptor/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/core-api/src/main/java/org/jboss/webbeans/Realizes.java (from rev 2892, ri/trunk/api/src/main/java/javax/inject/Realizes.java)
===================================================================
--- ri/trunk/core-api/src/main/java/org/jboss/webbeans/Realizes.java (rev 0)
+++ ri/trunk/core-api/src/main/java/org/jboss/webbeans/Realizes.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.jboss.webbeans;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that an implementation class directly specializes its superclass,
+ * of that a producer method directly specializes the method it overrides.
+ *
+ * @author Gavin King
+ * @author Pete Muir
+ */
+
+@Target(TYPE)
+@Retention(RUNTIME)
+@Documented
+public @interface Realizes
+{
+}
Property changes on: ri/trunk/core-api/src/main/java/org/jboss/webbeans/Realizes.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -48,6 +48,7 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.AmbiguousResolutionException;
import javax.enterprise.inject.BindingType;
import javax.enterprise.inject.InjectionException;
@@ -62,9 +63,7 @@
import javax.enterprise.inject.spi.InjectionTarget;
import javax.enterprise.inject.spi.InterceptionType;
import javax.enterprise.inject.spi.Interceptor;
-import javax.enterprise.inject.spi.ManagedBean;
import javax.enterprise.inject.spi.ObserverMethod;
-import javax.event.Observer;
import org.jboss.webbeans.bean.DecoratorBean;
import org.jboss.webbeans.bean.EnterpriseBean;
@@ -595,11 +594,6 @@
addObserver(observer, observer.getEventType(), observer.getBindingsAsArray());
}
- public void addObserver(ObserverMethod<?, ?> observerMethod)
- {
- addObserver(observerMethod, observerMethod.getObservedEventType(), new ArrayList<Annotation>(observerMethod.getObservedEventBindings()).toArray(new Annotation[0]));
- }
-
/**
* Does the actual observer registration
*
@@ -1048,16 +1042,6 @@
throw new UnsupportedOperationException("Not yet implemented");
}
- public <T> ManagedBean<T> createManagedBean(Class<T> type)
- {
- throw new UnsupportedOperationException("Not yet implemented");
- }
-
- public <T> ManagedBean<T> createManagedBean(AnnotatedType<T> type)
- {
- throw new UnsupportedOperationException("Not yet implemented");
- }
-
public <X> Bean<? extends X> getMostSpecializedBean(Bean<X> bean)
{
Contextual<?> key = bean;
@@ -1117,6 +1101,7 @@
throw new UnsupportedOperationException("Not yet implemented");
}
+ @Deprecated
public <X> Bean<? extends X> getHighestPrecedenceBean(Set<Bean<? extends X>> beans)
{
if (beans.size() == 1)
@@ -1158,5 +1143,29 @@
{
return new CreationalContextImpl<T>(contextual);
}
+
+ /* (non-Javadoc)
+ * @see javax.enterprise.inject.spi.BeanManager#createAnnotatedType(java.lang.Class)
+ */
+ public <T> AnnotatedType<T> createAnnotatedType(Class<T> type)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.enterprise.inject.spi.BeanManager#resolve(java.util.Set)
+ */
+ public <X> Bean<? extends X> resolve(Set<Bean<? extends X>> beans)
+ {
+ return getHighestPrecedenceBean(beans);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.enterprise.inject.spi.BeanManager#resolveObserverMethods(java.lang.Object, java.lang.annotation.Annotation[])
+ */
+ public <T> Set<ObserverMethod<T, ?>> resolveObserverMethods(T event, Annotation... bindings)
+ {
+ throw new UnsupportedOperationException();
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -28,6 +28,7 @@
import java.util.Set;
import javax.enterprise.context.Dependent;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.AmbiguousResolutionException;
import javax.enterprise.inject.Any;
import javax.enterprise.inject.Instance;
@@ -37,7 +38,6 @@
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.Decorator;
import javax.enterprise.inject.spi.InjectionPoint;
-import javax.event.Event;
import javax.inject.Obtains;
import org.jboss.webbeans.bean.AbstractClassBean;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/InstanceImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/InstanceImpl.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/InstanceImpl.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -22,6 +22,7 @@
import java.util.Set;
import javax.enterprise.inject.Instance;
+import javax.enterprise.inject.TypeLiteral;
import javax.enterprise.inject.spi.Bean;
import org.jboss.webbeans.injection.resolution.ResolvableWBClass;
@@ -74,4 +75,44 @@
throw new UnsupportedOperationException("Not yet implemented");
}
+ /* (non-Javadoc)
+ * @see javax.enterprise.inject.Instance#isAmbiguous()
+ */
+ public boolean isAmbiguous()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.enterprise.inject.Instance#isUnsatisfied()
+ */
+ public boolean isUnsatisfied()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.enterprise.inject.Instance#select(java.lang.annotation.Annotation[])
+ */
+ public Instance<T> select(Annotation... bindings)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.enterprise.inject.Instance#select(java.lang.Class, java.lang.annotation.Annotation[])
+ */
+ public <U extends T> Instance<U> select(Class<U> subtype, Annotation... bindings)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.enterprise.inject.Instance#select(javax.enterprise.inject.TypeLiteral, java.lang.annotation.Annotation[])
+ */
+ public <U extends T> Instance<U> select(TypeLiteral<U> subtype, Annotation... bindings)
+ {
+ throw new UnsupportedOperationException();
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -26,13 +26,13 @@
import javax.decorator.Decorates;
import javax.enterprise.context.Dependent;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.BindingType;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
-import javax.enterprise.inject.deployment.Specializes;
+import javax.enterprise.inject.Specializes;
import javax.enterprise.inject.deployment.Standard;
import javax.enterprise.inject.spi.Bean;
-import javax.event.Event;
+import javax.enterprise.inject.stereotype.Stereotype;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -31,6 +31,7 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.context.ScopeType;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.CreationException;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Initializer;
@@ -38,7 +39,6 @@
import javax.enterprise.inject.deployment.DeploymentType;
import javax.enterprise.inject.deployment.Production;
import javax.enterprise.inject.spi.Decorator;
-import javax.event.Observes;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -26,11 +26,11 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.context.ScopeType;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Initializer;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.deployment.DeploymentType;
-import javax.event.Observes;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -30,8 +30,8 @@
import javax.decorator.Decorator;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.CreationException;
-import javax.event.Observes;
import javax.interceptor.Interceptor;
import org.jboss.webbeans.BeanManagerImpl;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -21,9 +21,9 @@
import java.util.Set;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.CreationException;
import javax.enterprise.inject.Disposes;
-import javax.event.Observes;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -22,8 +22,8 @@
import java.util.HashSet;
import java.util.Set;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.TypeLiteral;
-import javax.event.Event;
import javax.inject.Obtains;
import org.jboss.webbeans.BeanManagerImpl;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AfterBeanDiscoveryImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AfterBeanDiscoveryImpl.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AfterBeanDiscoveryImpl.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -3,7 +3,10 @@
import java.util.ArrayList;
import java.util.List;
+import javax.enterprise.context.spi.Context;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.ObserverMethod;
public class AfterBeanDiscoveryImpl implements AfterBeanDiscovery
{
@@ -19,4 +22,19 @@
return definitionErrors;
}
+ public void addBean(Bean<?> bean)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addContext(Context context)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addObserverMethod(ObserverMethod<?, ?> observerMethod)
+ {
+ throw new UnsupportedOperationException();
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -22,16 +22,16 @@
import java.util.Set;
import javax.decorator.Decorator;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.BindingType;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Initializer;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.UnsatisfiedResolutionException;
import javax.enterprise.inject.deployment.DeploymentType;
-import javax.event.Observes;
-import javax.inject.Realizes;
import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.Realizes;
import org.jboss.webbeans.bean.AbstractClassBean;
import org.jboss.webbeans.bean.DecoratorBean;
import org.jboss.webbeans.bean.DisposalMethodBean;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/conversation/ConversationImpl.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -178,4 +178,10 @@
{
return cid == null ? super.hashCode() : cid.hashCode();
}
+
+
+ public boolean isTransient()
+ {
+ return !isLongRunning();
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolverImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolverImpl.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolverImpl.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -133,7 +133,7 @@
try
{
- Bean<?> bean = manager.getHighestPrecedenceBean(manager.getBeans(name));
+ Bean<?> bean = manager.resolve(manager.getBeans(name));
CreationalContext<?> creationalContext = manager.createCreationalContext(bean);
if (bean != null)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -20,8 +20,9 @@
import java.lang.reflect.Type;
import java.util.Set;
-import javax.event.Event;
-import javax.event.Observer;
+import javax.enterprise.event.Event;
+import javax.enterprise.event.Observer;
+import javax.enterprise.inject.TypeLiteral;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.FacadeImpl;
@@ -34,7 +35,7 @@
* @author David Allen
*
* @param <T> The type of event being wrapped
- * @see javax.event.Event
+ * @see javax.enterprise.event.Event
*/
public class EventImpl<T> extends FacadeImpl<T> implements Event<T>
{
@@ -65,6 +66,7 @@
* @param event The event object
* @param bindings Additional binding types
*/
+ @Deprecated
public void fire(T event, Annotation... bindings)
{
getManager().fireEvent(event, mergeInBindings(bindings));
@@ -91,4 +93,24 @@
return buffer.toString();
}
+ public void fire(T event)
+ {
+ getManager().fireEvent(event, mergeInBindings());
+ }
+
+ public <U extends T> Event<U> select(Annotation... bindings)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public <U extends T> Event<U> select(Class<U> subtype, Annotation... bindings)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public <U extends T> Event<U> select(TypeLiteral<U> subtype, Annotation... bindings)
+ {
+ throw new UnsupportedOperationException();
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventManager.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventManager.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventManager.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -23,7 +23,7 @@
import java.util.HashSet;
import java.util.Set;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.context.DependentContext;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventObserver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventObserver.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -21,8 +21,8 @@
import java.util.ArrayList;
import java.util.List;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.Current;
-import javax.event.Observer;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.metadata.MetaDataCache;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -24,13 +24,13 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Notify;
+import javax.enterprise.event.Observer;
+import javax.enterprise.event.ObserverException;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Initializer;
import javax.enterprise.inject.Produces;
-import javax.event.Notify;
-import javax.event.Observer;
-import javax.event.ObserverException;
-import javax.event.Observes;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/TransactionalObserverImpl.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -19,12 +19,12 @@
import java.util.ArrayList;
import java.util.List;
-import javax.event.AfterTransactionCompletion;
-import javax.event.AfterTransactionFailure;
-import javax.event.AfterTransactionSuccess;
-import javax.event.BeforeTransactionCompletion;
-import javax.event.Notify;
-import javax.event.Observes;
+import javax.enterprise.event.AfterTransactionCompletion;
+import javax.enterprise.event.AfterTransactionFailure;
+import javax.enterprise.event.AfterTransactionSuccess;
+import javax.enterprise.event.BeforeTransactionCompletion;
+import javax.enterprise.event.Notify;
+import javax.enterprise.event.Observes;
import javax.transaction.Synchronization;
import org.jboss.webbeans.BeanManagerImpl;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -24,9 +24,9 @@
import javax.enterprise.context.ScopeType;
import javax.enterprise.inject.BindingType;
-import javax.enterprise.inject.Stereotype;
import javax.enterprise.inject.deployment.DeploymentType;
import javax.enterprise.inject.spi.Annotated;
+import javax.enterprise.inject.stereotype.Stereotype;
/**
* AnnotatedItem provides a uniform access to the annotations on an annotated
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -24,12 +24,12 @@
import java.util.List;
import java.util.Set;
+import javax.enterprise.event.AfterTransactionCompletion;
+import javax.enterprise.event.AfterTransactionFailure;
+import javax.enterprise.event.AfterTransactionSuccess;
+import javax.enterprise.event.BeforeTransactionCompletion;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
-import javax.event.AfterTransactionCompletion;
-import javax.event.AfterTransactionFailure;
-import javax.event.AfterTransactionSuccess;
-import javax.event.BeforeTransactionCompletion;
-import javax.event.Observes;
/**
* AnnotatedType provides a uniform access to the annotations on an annotated
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/StereotypeModel.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/StereotypeModel.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/metadata/StereotypeModel.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -24,8 +24,8 @@
import javax.enterprise.context.ScopeType;
import javax.enterprise.inject.BindingType;
import javax.enterprise.inject.Named;
-import javax.enterprise.inject.Stereotype;
import javax.enterprise.inject.deployment.DeploymentType;
+import javax.enterprise.inject.stereotype.Stereotype;
import javax.interceptor.InterceptorBindingType;
import org.jboss.webbeans.DefinitionException;
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/ActivitiesTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/ActivitiesTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/ActivitiesTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -10,6 +10,7 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.UnsatisfiedResolutionException;
import javax.enterprise.inject.deployment.Production;
@@ -17,7 +18,6 @@
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.InjectionPoint;
-import javax.event.Observer;
import org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle.MockCreationalContext;
import org.jboss.testharness.impl.packaging.Artifact;
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/Fox.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/Fox.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/Fox.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,6 +1,6 @@
package org.jboss.jsr299.tck.tests.activities;
-import javax.event.Observes;
+import javax.enterprise.event.Observes;
class Fox
{
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/Dusk.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/Dusk.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/Dusk.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,8 +1,8 @@
package org.jboss.jsr299.tck.tests.activities.current;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
import javax.enterprise.inject.Initializer;
-import javax.event.Event;
class Dusk
{
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/ELCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/ELCurrentActivityTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/ELCurrentActivityTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -10,12 +10,12 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.deployment.Production;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.InjectionPoint;
-import javax.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/EventCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/EventCurrentActivityTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/EventCurrentActivityTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -5,7 +5,7 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InactiveScopeTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InactiveScopeTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InactiveScopeTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -6,7 +6,7 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InjectedManagerCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InjectedManagerCurrentActivityTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InjectedManagerCurrentActivityTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -5,7 +5,7 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InstanceCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InstanceCurrentActivityTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/InstanceCurrentActivityTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -10,12 +10,12 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.deployment.Production;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.InjectionPoint;
-import javax.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/JndiManagerCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/JndiManagerCurrentActivityTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/JndiManagerCurrentActivityTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -5,7 +5,7 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/NonNormalScopeTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/NonNormalScopeTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/current/NonNormalScopeTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -5,7 +5,7 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.event.Observer;
+import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserver.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserver.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserver.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.test.unit.bootstrap;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.event.Observes;
class InitializedObserver
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesApplicationContext.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesApplicationContext.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesApplicationContext.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,8 +1,8 @@
package org.jboss.webbeans.test.unit.bootstrap;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.event.Observes;
class InitializedObserverWhichUsesApplicationContext
{
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,8 +1,8 @@
package org.jboss.webbeans.test.unit.bootstrap;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
-import javax.event.Observes;
class InitializedObserverWhichUsesRequestContext
{
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -6,7 +6,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -9,7 +9,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class)
@Target( { TYPE, METHOD, FIELD })
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -7,7 +7,7 @@
import java.lang.annotation.Target;
import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype(requiredTypes=Animal.class, supportedScopes=RequestScoped.class)
@Target( { TYPE })
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -4,9 +4,9 @@
import java.util.Iterator;
import java.util.Set;
-import javax.enterprise.inject.Stereotype;
import javax.enterprise.inject.deployment.DeploymentType;
import javax.enterprise.inject.deployment.Production;
+import javax.enterprise.inject.stereotype.Stereotype;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.introspector.WBClass;
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/NormalScopedBean.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/NormalScopedBean.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/NormalScopedBean.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -4,8 +4,8 @@
import java.io.Serializable;
import javax.enterprise.context.SessionScoped;
+import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.event.Event;
@SessionScoped
public class NormalScopedBean implements Serializable
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/SimpleEventTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/SimpleEventTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/event/SimpleEventTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,9 +1,9 @@
package org.jboss.webbeans.test.unit.implementation.event;
+import javax.enterprise.event.Event;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.Any;
-import javax.event.Event;
-import javax.event.Observes;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.BeanManagerImpl;
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -15,7 +15,7 @@
@Test
public void testGetNamedBeanWithBinding()
{
- Bean<?> bean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("namedBeanWithBinding"));
+ Bean<?> bean = getCurrentManager().resolve(getCurrentManager().getBeans("namedBeanWithBinding"));
NamedBeanWithBinding instance = (NamedBeanWithBinding) getCurrentManager().getReference(bean, Object.class, getCurrentManager().createCreationalContext(bean));
assert instance != null;
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -12,10 +12,10 @@
@Test
public void testNamedProducer()
{
- Bean<?> iemonBean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("iemon"));
+ Bean<?> iemonBean = getCurrentManager().resolve(getCurrentManager().getBeans("iemon"));
String[] iemon = (String[]) getCurrentManager().getReference(iemonBean, Object.class, getCurrentManager().createCreationalContext(iemonBean));
assert iemon.length == 3;
- Bean<?> itoenBean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("itoen"));
+ Bean<?> itoenBean = getCurrentManager().resolve(getCurrentManager().getBeans("itoen"));
String[] itoen = (String[]) getCurrentManager().getReference(itoenBean, Object.class, getCurrentManager().createCreationalContext(itoenBean));
assert itoen.length == 2;
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -19,7 +19,7 @@
@Test
public void testGetNamedProducerWithBinding()
{
- Bean<?> bean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("date"));
+ Bean<?> bean = getCurrentManager().resolve(getCurrentManager().getBeans("date"));
Date date = (Date) getCurrentManager().getReference(bean, Object.class, getCurrentManager().createCreationalContext(bean));
assertNotNull(date);
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -13,7 +13,7 @@
@Test(description="WBRI-122")
public void testImplementationClassImplementsSerializable()
{
- Bean<?> bean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("foo"));
+ Bean<?> bean = getCurrentManager().resolve(getCurrentManager().getBeans("foo"));
getCurrentManager().getReference(bean, Object.class, getCurrentManager().createCreationalContext(bean));
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/xml/beans/annotationtype/TestStereotype.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/xml/beans/annotationtype/TestStereotype.java 2009-06-25 23:04:35 UTC (rev 2894)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/xml/beans/annotationtype/TestStereotype.java 2009-06-25 23:09:58 UTC (rev 2895)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.test.unit.xml.beans.annotationtype;
-import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.stereotype.Stereotype;
@Stereotype
public @interface TestStereotype
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2894 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean and 5 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-06-25 19:04:35 -0400 (Thu, 25 Jun 2009)
New Revision: 2894
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishPond.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/newAndOtherBindingType/NewAndOtherBindingTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Additional tests upgraded to 20090519 version of the spec assertions.
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishPond.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishPond.java 2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/FishPond.java 2009-06-25 23:04:35 UTC (rev 2894)
@@ -9,13 +9,16 @@
public Animal goldfish;
+ public Goose goose;
+
@Current
public Salmon salmon;
@Initializer
- public FishPond(Goldfish goldfish)
+ public FishPond(Goldfish goldfish, Goose goose)
{
this.goldfish = goldfish;
+ this.goose = goose;
}
@PreDestroy
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-06-25 23:04:35 UTC (rev 2894)
@@ -34,7 +34,8 @@
@Test(groups = "beanConstruction")
@SpecAssertions({
- @SpecAssertion(section = "3.2.6.3", id = "a"),
+ @SpecAssertion(section = "3.2.4.2", id = "b"),
+ @SpecAssertion(section = "3.2.4.2", id = "c"),
@SpecAssertion(section = "2.3.6", id = "d")
})
public void testInjectionOfParametersIntoBeanConstructor()
@@ -42,10 +43,11 @@
assert getBeans(FishPond.class).size() == 1;
FishPond fishPond = getInstanceByType(FishPond.class);
assert fishPond.goldfish != null;
+ assert fishPond.goose != null;
}
@Test
- @SpecAssertion(section = "3.2.6.3", id = "a")
+ @SpecAssertion(section = "3.2.4.2", id = "b")
public void testBindingTypeAnnotatedConstructor() throws Exception
{
new RunInDependentContext()
@@ -60,7 +62,7 @@
}
@Test(groups = { "specialization" })
- @SpecAssertion(section = "3.2.7", id = "c")
+ @SpecAssertion(section = "3.2.5", id = "aa")
public void testSpecializedBeanAlwaysUsed() throws Exception
{
new RunInDependentContext()
@@ -77,8 +79,8 @@
@Test(groups = "beanLifecycle")
@SpecAssertions({
- @SpecAssertion(section = "6.1", id = "b"),
- @SpecAssertion(section = "6.2", id = "d")
+ @SpecAssertion(section = "6.1", id = "d"),
+ @SpecAssertion(section = "6.1", id = "e")
})
public void testCreateReturnsSameBeanPushed() throws Exception
{
@@ -103,11 +105,11 @@
@Test(groups = "beanLifecycle")
@SpecAssertions({
- @SpecAssertion(section = "6.2", id = "a"),
+ @SpecAssertion(section = "6.1.1", id = "a"),
@SpecAssertion(section="2", id="g"),
@SpecAssertion(section="2.2", id="f"),
@SpecAssertion(section="3.2.6", id="a"),
- @SpecAssertion(section = "6", id = "d")
+ @SpecAssertion(section = "7", id = "d")
})
public void testCreateReturnsInstanceOfBean()
{
@@ -117,7 +119,7 @@
@Test(groups = "injection")
@SpecAssertions({
- @SpecAssertion(section = "6.4", id = "e"),
+ @SpecAssertion(section = "7.2", id = "c"),
@SpecAssertion(section = "3.8.1", id = "a")
})
public void testCreateInjectsFieldsDeclaredInJava()
@@ -129,7 +131,7 @@
@Test(groups = "beanLifecycle")
@SpecAssertions({
- @SpecAssertion(section = "6", id = "g")
+ @SpecAssertion(section = "6.2", id = "l")
})
public void testContextCreatesNewInstanceForInjection()
{
@@ -142,9 +144,8 @@
@Test(groups = { "beanLifecycle", "lifecycleCallbacks" })
@SpecAssertions({
- @SpecAssertion(section = "6.2", id = "f"),
- @SpecAssertion(section = "6.3", id = "b"),
- @SpecAssertion(section = "6.4", id = "k")
+ @SpecAssertion(section = "7.2", id = "d"),
+ @SpecAssertion(section = "7.2", id = "e")
})
public void testPostConstructPreDestroy() throws Exception
{
@@ -160,8 +161,7 @@
@Test(groups = { "beanLifecycle", "lifecycleCallbacks" })
@SpecAssertions({
- @SpecAssertion(section = "6.3", id = "a"),
- @SpecAssertion(section = "6.3", id = "c")
+ @SpecAssertion(section = "6.1.2", id = "a")
})
public void testContextualDestroyDisposesWhenNecessary() throws Exception
{
@@ -177,7 +177,7 @@
@Test(groups = "beanLifecycle")
@SpecAssertions({
- @SpecAssertion(section = "6.3", id = "d")
+ @SpecAssertion(section = "6.1.2", id = "a")
})
public void testContextualDestroyCatchesException()
{
@@ -189,7 +189,8 @@
@Test(groups = "beanLifecycle")
@SpecAssertions({
- @SpecAssertion(section = "6.4", id = "l")
+ @SpecAssertion(section = "6.1.2", id = "a"),
+ @SpecAssertion(section = "6.4.3", id = "a")
})
public void testDependentsDestroyedAfterPreDestroy()
{
@@ -200,6 +201,7 @@
assert Salmon.isBeanDestroyed();
}
+ //Diese ist noch ältere
@Test
@SpecAssertion(section = "4.2", id = "baa")
public void testSubClassInheritsPostConstructOnSuperclass() throws Exception
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2009-06-25 23:04:35 UTC (rev 2894)
@@ -13,6 +13,7 @@
import javax.enterprise.inject.spi.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.literals.AnyLiteral;
import org.jboss.jsr299.tck.literals.CurrentLiteral;
@@ -22,7 +23,7 @@
/**
*
- * Spec version: PRD2
+ * Spec version: 20090519
*
*/
@Artifact
@@ -34,7 +35,9 @@
};
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "d")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.11", id = "p")
+ })
public void testNewBeanIsDependentScoped()
{
Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, new NewLiteral());
@@ -44,7 +47,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "e")
+ @SpecAssertion(section = "3.11", id = "q")
public void testNewBeanIsOfStandardDeploymentType()
{
Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, new NewLiteral());
@@ -54,7 +57,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "f")
+ @SpecAssertion(section = "3.11", id = "r")
public void testNewBeanHasOnlyNewBinding()
{
Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, new NewLiteral());
@@ -65,7 +68,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "g")
+ @SpecAssertion(section = "3.11", id = "s")
public void testNewBeanHasNoWebBeanName()
{
Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, new NewLiteral());
@@ -75,7 +78,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "h")
+ @SpecAssertion(section = "3.11", id = "t")
public void testNewBeanHasNoStereotypes()
{
Bean<Fox> foxBean = getBeans(Fox.class).iterator().next();
@@ -87,7 +90,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "i")
+ @SpecAssertion(section = "3.11", id = "u")
public void testNewBeanHasNoObservers()
{
// As long as only one observer exists here, we know it is not from the @New bean
@@ -95,7 +98,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "k")
+ @SpecAssertion(section = "3.11", id = "w")
public void testNewBeanHasNoProducerFields() throws Exception
{
new RunInDependentContext()
@@ -116,7 +119,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "j")
+ @SpecAssertion(section = "3.11", id = "v")
public void testNewBeanHasNoProducerMethods() throws Exception
{
new RunInDependentContext()
@@ -137,7 +140,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "l")
+ @SpecAssertion(section = "3.11", id = "x")
public void testNewBeanHasNoDisposalMethods() throws Exception
{
new RunInDependentContext()
@@ -172,7 +175,7 @@
}
@Test
- @SpecAssertion(section = "3.2.5", id = "a")
+ @SpecAssertion(section = "3.11", id = "d")
public void testForEachSimpleBeanANewBeanExists()
{
assert getCurrentManager().getBeans(Order.class).size() == 1;
@@ -194,7 +197,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "ba")
+ @SpecAssertion(section = "3.11", id = "f")
public void testNewBeanHasSameConstructor()
{
ExplicitContructorSimpleBean.setConstructorCalls(0);
@@ -205,7 +208,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "bb")
+ @SpecAssertion(section = "3.11", id = "g")
public void testNewBeanHasSameInitializers()
{
InitializerSimpleBean.setInitializerCalls(0);
@@ -217,7 +220,7 @@
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "bc")
+ @SpecAssertion(section = "3.11", id = "h")
public void testNewBeanHasSameInjectedFields()
{
Bean<InitializerSimpleBean> simpleBean = getBeans(InitializerSimpleBean.class).iterator().next();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/newAndOtherBindingType/NewAndOtherBindingTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/newAndOtherBindingType/NewAndOtherBindingTypeTest.java 2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/newAndOtherBindingType/NewAndOtherBindingTypeTest.java 2009-06-25 23:04:35 UTC (rev 2894)
@@ -8,6 +8,11 @@
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: 20090519
+ *
+ */
@Artifact
@ExpectedDeploymentException(DefinitionError.class)
public class NewAndOtherBindingTypeTest extends AbstractJSR299Test
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-06-25 23:04:35 UTC (rev 2894)
@@ -33,6 +33,8 @@
/**
* EJB injection tests for simple beans.
*
+ * Spec version: 20090519
+ *
* @author David Allen
*
*/
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java 2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java 2009-06-25 23:04:35 UTC (rev 2894)
@@ -19,6 +19,8 @@
/**
* Injection of persistence related objects.
*
+ * Spec version: 20090519
+ *
* @author David Allen
*
*/
@@ -33,7 +35,7 @@
{
@Test(groups = { "beanLifecycle", "commonAnnotations", "integration" })
@SpecAssertions( {
- @SpecAssertion(section = "6.4", id = "c")
+ @SpecAssertion(section = "3.6.1", id = "cc")
})
public void testInjectionOfPersistenceContext()
{
@@ -46,9 +48,11 @@
}
@Test(groups = { "broken", "beanLifecycle", "commonAnnotations", "integration" })
+ @SpecAssertions( {
+ @SpecAssertion(section = "3.6.1", id = "dd")
+ })
public void testInjectionOfPersistenceUnit()
{
- //TODO There is no spec assertion for this test and it does not work, but there is bean support for persistence units
Bean<SimpleBean> simpleBeanBean = getBeans(SimpleBean.class).iterator().next();
SimpleBean simpleBean = createBeanInstance(simpleBeanBean);
EntityManagerFactory entityManagerFactory = simpleBean.getPersistenceUnit();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java 2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java 2009-06-25 23:04:35 UTC (rev 2894)
@@ -12,6 +12,11 @@
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: 20090519
+ *
+ */
@Artifact
@Packaging(PackagingType.WAR)
@IntegrationTest
@@ -19,7 +24,7 @@
public class InjectionOfResourceTest extends AbstractJSR299Test
{
@Test(groups = { "ri-broken", "beanLifecycle", "commonAnnotations", "integration" })
- @SpecAssertion(section = "6.4", id = "d")
+ @SpecAssertion(section = "3.6.1", id = "bb")
public void testInjectionOfResource()
{
Bean<SimpleBean> simpleBeanBean = getBeans(SimpleBean.class).iterator().next();
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-06-25 21:31:32 UTC (rev 2893)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-06-25 23:04:35 UTC (rev 2894)
@@ -1612,39 +1612,39 @@
<text>This second bean has scope |@Dependent|.</text>
</assertion>
- <assertion id="p">
+ <assertion id="q">
<text>This second bean has deployment type |@Standard|.</text>
</assertion>
- <assertion id="p">
+ <assertion id="r">
<text>This second bean has exactly one binding: |(a)javax.enterprise.inject.New(X.class)| where |x| is the bean class.</text>
</assertion>
- <assertion id="q">
+ <assertion id="s">
<text>This second bean has no bean EL name.</text>
</assertion>
- <assertion id="r">
+ <assertion id="t">
<text>This second bean has no stereotypes.</text>
</assertion>
- <assertion id="s">
+ <assertion id="u">
<text>This second bean has no observer methods.</text>
</assertion>
- <assertion id="t">
+ <assertion id="v">
<text>This second bean has no producer methods.</text>
</assertion>
- <assertion id="u">
+ <assertion id="w">
<text>This second bean has no producer fields.</text>
</assertion>
- <assertion id="v">
+ <assertion id="x">
<text>This second bean has no disposal methods.</text>
</assertion>
- <assertion id="w">
+ <assertion id="y">
<text>This bean is available even if the bean class declares a disabled deployment type.</text>
</assertion>
</section>
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2893 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck: tests/definition/binding and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-25 17:31:32 -0400 (Thu, 25 Jun 2009)
New Revision: 2893
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/literals/AnyLiteral.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/AnyInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/Customer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/Drink.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/literals/AnyBinding.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
Log:
add test for @Any injection
ensure @Any is mutually exclusive w/ @New
change AnyBinding to AnyLiteral to be consist w/ other tck literals
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/literals/AnyBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/literals/AnyBinding.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/literals/AnyBinding.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.literals;
-
-import javax.enterprise.inject.AnnotationLiteral;
-import javax.enterprise.inject.Any;
-
-public class AnyBinding extends AnnotationLiteral<Any> implements Any
-{
-
-}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/literals/AnyLiteral.java (from rev 2892, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/literals/AnyBinding.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/literals/AnyLiteral.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/literals/AnyLiteral.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.literals;
+
+import javax.enterprise.inject.AnnotationLiteral;
+import javax.enterprise.inject.Any;
+
+public class AnyLiteral extends AnnotationLiteral<Any> implements Any
+{
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -9,8 +9,9 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.literals.AnyBinding;
+import org.jboss.jsr299.tck.literals.AnyLiteral;
import org.jboss.jsr299.tck.literals.CurrentLiteral;
+import org.jboss.jsr299.tck.literals.NewLiteral;
import org.jboss.testharness.impl.packaging.Artifact;
import org.testng.annotations.Test;
@@ -20,25 +21,36 @@
@Artifact
public class BindingDefinitionTest extends AbstractJSR299Test
{
-
@Test
- @SpecAssertion(section = "2.3.1", id = "aaa")
+ @SpecAssertions({
+ @SpecAssertion(section = "2.3.1", id = "a0"),
+ @SpecAssertion(section = "2.3.1", id = "aa")
+ })
public void testDefaultBindingDeclaredInJava()
{
Bean<Order> order = getBeans(Order.class).iterator().next();
assert order.getBindings().size() == 2;
assert order.getBindings().contains(new CurrentLiteral());
- assert order.getBindings().contains(new AnyBinding());
+ assert order.getBindings().contains(new AnyLiteral());
}
@Test
@SpecAssertion(section = "2.3.1", id = "b")
public void testDefaultBindingForInjectionPoint()
{
- Bean<Order> order = getBeans(Order.class).iterator().next();
+ Bean<Order> order = getBeans(Order.class).iterator().next();
InjectionPoint injectionPoint = order.getInjectionPoints().iterator().next();
assert injectionPoint.getBean().getBindings().contains(new CurrentLiteral());
}
+
+ @Test
+ @SpecAssertion(section = "2.3.1", id = "a0")
+ public void testNewBindingAndAnyBindingMutualExclusive()
+ {
+ Bean<OrderProcessor> order = getBeans(OrderProcessor.class, new NewLiteral()).iterator().next();
+ assert order.getBindings().size() == 1;
+ assert order.getBindings().iterator().next().equals(new NewLiteral());
+ }
@Test(groups = { "annotationDefinition", "rewrite" })
@SpecAssertion(section = "2.3.2", id = "ba")
@@ -83,7 +95,7 @@
Set<? extends Annotation> bindings = getBeans(BorderCollie.class, new HairyBinding(false)).iterator().next().getBindings();
assert bindings.size() == 2;
assert bindings.contains(new HairyBinding(false));
- assert bindings.contains(new AnyBinding());
+ assert bindings.contains(new AnyLiteral());
}
@Test
@@ -93,7 +105,7 @@
Set<? extends Annotation> bindings = getBeans(ShetlandPony.class).iterator().next().getBindings();
assert bindings.size() == 2;
assert bindings.contains(new CurrentLiteral());
- assert bindings.contains(new AnyBinding());
+ assert bindings.contains(new AnyLiteral());
}
@Test
@@ -104,7 +116,7 @@
assert bindings.size() == 2;
Annotation hairyLiteral = new HairyBinding(true);
assert bindings.contains(hairyLiteral);
- assert bindings.contains(new AnyBinding());
+ assert bindings.contains(new AnyLiteral());
}
@Test
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -16,7 +16,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.literals.AnyBinding;
+import org.jboss.jsr299.tck.literals.AnyLiteral;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
@@ -528,23 +528,23 @@
{
// Retrieve the implicit event bean from the manager only by
// its API type
- Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
+ Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyLiteral());
assert !eventBeans.isEmpty();
}
@Test(groups = { "events" })
public void testImplicitEventHasAnyBinding()
{
- Set<Bean<Event<AnEventType>>> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
+ Set<Bean<Event<AnEventType>>> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyLiteral());
assert !eventBeans.isEmpty();
- assert eventBeans.iterator().next().getBindings().contains(new AnyBinding());
+ assert eventBeans.iterator().next().getBindings().contains(new AnyLiteral());
}
@Test(groups = { "events" })
@SpecAssertions( { @SpecAssertion(section = "7.6", id = "n") } )
public void testImplicitEventBeanMatchesBindingAnnotationsOfInjectionPoint() throws Exception
{
- Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>(){}, new AnyBinding(), new TameAnnotationLiteral(), new RoleBinding("Admin"));
+ Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>(){}, new AnyLiteral(), new TameAnnotationLiteral(), new RoleBinding("Admin"));
assert !eventBeans.isEmpty();
}
@@ -552,7 +552,7 @@
@SpecAssertion(section = "7.6", id = "o")
public void testImplicitEventBeanHasStandardDeploymentType() throws Exception
{
- Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
+ Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyLiteral());
assert eventBeans.size() == 1;
Bean<?> eventBean = (Bean<?>) eventBeans.iterator().next();
assert eventBean.getDeploymentType().equals(Standard.class);
@@ -562,7 +562,7 @@
@SpecAssertion(section = "7.6", id = "p")
public void testImplicitEventBeanHasDependentScope() throws Exception
{
- Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
+ Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyLiteral());
assert eventBeans.size() == 1;
Bean<?> eventBean = (Bean<?>) eventBeans.iterator().next();
assert eventBean.getScopeType().equals(Dependent.class);
@@ -572,7 +572,7 @@
@SpecAssertion(section = "7.6", id = "q")
public void testImplicitEventBeanHasNoName() throws Exception
{
- Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
+ Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyLiteral());
assert eventBeans.size() == 1;
Bean<?> eventBean = (Bean<?>) eventBeans.iterator().next();
assert eventBean.getName() == null;
@@ -582,7 +582,7 @@
@SpecAssertions( { @SpecAssertion(section = "7.6", id = "a"), @SpecAssertion(section = "7.6", id = "r") } )
public void testImplicitEventBeanProvidedByContainer() throws Exception
{
- Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
+ Set<?> eventBeans = getBeans(new TypeLiteral<Event<AnEventType>>() {}, new AnyLiteral());
assert eventBeans.size() == 1;
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanTest.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -14,7 +14,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.literals.AnyBinding;
+import org.jboss.jsr299.tck.literals.AnyLiteral;
import org.jboss.jsr299.tck.literals.CurrentLiteral;
import org.jboss.jsr299.tck.literals.NewLiteral;
import org.jboss.testharness.impl.packaging.Artifact;
@@ -107,7 +107,7 @@
Bean<OrderLocal> newOrderBean = getBeans(OrderLocal.class, new NewLiteral()).iterator().next();
assert orderBean.getBindings().size() == 2;
assert orderBean.getBindings().contains(new CurrentLiteral());
- assert orderBean.getBindings().contains(new AnyBinding());
+ assert orderBean.getBindings().contains(new AnyLiteral());
assert getBeans(OrderLocal.class, new NewLiteral()).size() == 1;
assert newOrderBean.getBindings().size() == 1;
@@ -120,7 +120,7 @@
assert getBeans(LionLocal.class, TAME_LITERAL).size() == 1;
assert lionBean.getBindings().size() == 2;
assert lionBean.getBindings().contains(TAME_LITERAL);
- assert lionBean.getBindings().contains(new AnyBinding());
+ assert lionBean.getBindings().contains(new AnyLiteral());
assert getBeans(LionLocal.class, new NewLiteral()).size() == 1;
assert newLionBean.getBindings().size() == 1;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -11,7 +11,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.literals.AnyBinding;
+import org.jboss.jsr299.tck.literals.AnyLiteral;
import org.jboss.jsr299.tck.literals.CurrentLiteral;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
@@ -93,7 +93,7 @@
assert getCurrentManager().getBeans(Tarantula.class).size() == 1;
assert getCurrentManager().getBeans(Tarantula.class).iterator().next().getBindings().size() == 2;
assert getCurrentManager().getBeans(Tarantula.class).iterator().next().getBindings().contains(new CurrentLiteral());
- assert getCurrentManager().getBeans(Tarantula.class).iterator().next().getBindings().contains(new AnyBinding());
+ assert getCurrentManager().getBeans(Tarantula.class).iterator().next().getBindings().contains(new AnyLiteral());
}
@Test(groups = "producerMethod")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2009-06-25 20:27:55 UTC (rev 2892)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -14,7 +14,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.literals.AnyBinding;
+import org.jboss.jsr299.tck.literals.AnyLiteral;
import org.jboss.jsr299.tck.literals.CurrentLiteral;
import org.jboss.jsr299.tck.literals.NewLiteral;
import org.jboss.testharness.impl.packaging.Artifact;
@@ -186,7 +186,7 @@
assert getCurrentManager().getBeans(Lion.class, TAME_LITERAL).size() == 1;
assert getCurrentManager().getBeans(Lion.class, TAME_LITERAL).iterator().next().getBindings().size() == 2;
assert getCurrentManager().getBeans(Lion.class, TAME_LITERAL).iterator().next().getBindings().contains(TAME_LITERAL);
- assert getCurrentManager().getBeans(Lion.class, TAME_LITERAL).iterator().next().getBindings().contains(new AnyBinding());
+ assert getCurrentManager().getBeans(Lion.class, TAME_LITERAL).iterator().next().getBindings().contains(new AnyLiteral());
assert getBeans(Lion.class, new NewLiteral()).size() == 1;
assert getBeans(Lion.class, new NewLiteral()).iterator().next().getBindings().size() == 1;
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/AnyInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/AnyInjectionTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/AnyInjectionTest.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.any;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.testng.annotations.Test;
+
+@Artifact
+public class AnyInjectionTest extends AbstractJSR299Test
+{
+ @Test(groups = "ri-broken")
+ public void testAnyInjectionIfExactlyOneBeanForType()
+ {
+ assert getInstanceByType(Customer.class).drink != null;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/Customer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/Customer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/Customer.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.any;
+
+import javax.enterprise.inject.Any;
+
+class Customer
+{
+ @Any Drink drink;
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/Drink.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/Drink.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/any/Drink.java 2009-06-25 21:31:32 UTC (rev 2893)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.any;
+
+class Drink
+{
+
+}
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2892 - ri/trunk/impl/src/main/java/org/jboss/webbeans and 21 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-06-25 16:27:55 -0400 (Thu, 25 Jun 2009)
New Revision: 2892
Added:
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java
Removed:
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/RunInDependentContext.java
Modified:
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/InstanceImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanInstance.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/BeanInstanceImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/SessionBeanInterceptor.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolverImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/ConversationAwareViewHandler.java
ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/BeansImpl.java
ri/trunk/tests/src/main/java/org/jboss/webbeans/test/AbstractWebBeansTest.java
ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/ActivitiesTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/OldSPIBridge.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
Log:
Switch to using release() for dependent object destruction
Deleted: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.enterprise.inject.spi;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Set;
-
-import javax.enterprise.context.spi.Contextual;
-
-public interface Bean<T> extends Contextual<T>
-{
-
- /**
- * The client-visible types of a bean
- *
- * @return the bean types
- */
- public Set<Type> getTypes();
-
- /**
- * The bindings of a bean
- *
- * @return the bindings
- */
- public Set<Annotation> getBindings();
-
- /**
- * The scope of a bean
- *
- * @return the scope
- */
- public Class<? extends Annotation> getScopeType();
-
- /**
- * The deployment type of a bean
- *
- * @return the deployment type
- */
- public Class<? extends Annotation> getDeploymentType();
-
- /**
- * The name of a bean
- *
- * @return the name
- */
- public String getName();
-
- /**
- * The serializability of a bean
- *
- * @return true if the bean is serializable
- */
- public boolean isSerializable();
-
- /**
- * The nullability of a bean
- *
- * @return true if the bean is nullable
- */
- public boolean isNullable();
-
- /**
- * The injection points of a bean
- *
- * @return the injection points of a bean
- */
- public Set<InjectionPoint> getInjectionPoints();
-
-}
\ No newline at end of file
Added: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java (rev 0)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.enterprise.inject.spi;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Set;
+
+import javax.enterprise.context.spi.Contextual;
+
+public interface Bean<T> extends Contextual<T>
+{
+
+ /**
+ * The client-visible types of a bean
+ *
+ * @return the bean types
+ */
+ public Set<Type> getTypes();
+
+ /**
+ * The bindings of a bean
+ *
+ * @return the bindings
+ */
+ public Set<Annotation> getBindings();
+
+ /**
+ * The scope of a bean
+ *
+ * @return the scope
+ */
+ public Class<? extends Annotation> getScopeType();
+
+ /**
+ * The deployment type of a bean
+ *
+ * @return the deployment type
+ */
+ public Class<? extends Annotation> getDeploymentType();
+
+ /**
+ * The name of a bean
+ *
+ * @return the name
+ */
+ public String getName();
+
+ /**
+ * The serializability of a bean
+ *
+ * @return true if the bean is serializable
+ */
+ public boolean isSerializable();
+
+ /**
+ * The nullability of a bean
+ *
+ * @return true if the bean is nullable
+ */
+ public boolean isNullable();
+
+ /**
+ * The injection points of a bean
+ *
+ * @return the injection points of a bean
+ */
+ public Set<InjectionPoint> getInjectionPoints();
+
+}
\ No newline at end of file
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -26,6 +26,7 @@
import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.context.ScopeType;
import javax.enterprise.context.spi.Context;
+import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.AmbiguousResolutionException;
import javax.enterprise.inject.UnsatisfiedResolutionException;
@@ -56,7 +57,7 @@
* @throws IllegalArgumentException
* if the given type is not a bean type of the given bean
*/
- public Object getReference(Bean<?> bean, Type beanType);
+ public Object getReference(Bean<?> bean, Type beanType, CreationalContext<?> creationalContext);
/**
* Obtains an instance of bean for a given injection point.
@@ -406,10 +407,11 @@
public <T> ManagedBean<T> createManagedBean(AnnotatedType<T> type);
/**
- * Obtain an instance of a {@link CreationalContext}
+ * Obtain an instance of a {@link CreationalContext} for the given contextual
*
+ * @param contextual the contextual to create a creational context for
* @return the {@link CreationalContext} instance
*/
- public CreationalContext<?> createCreationalContext();
+ public <T> CreationalContext<T> createCreationalContext(Contextual<T> contextual);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -46,6 +46,7 @@
import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.context.ScopeType;
import javax.enterprise.context.spi.Context;
+import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.AmbiguousResolutionException;
import javax.enterprise.inject.BindingType;
@@ -182,7 +183,7 @@
private transient final ClientProxyProvider clientProxyProvider;
private transient final Map<Class<?>, EnterpriseBean<?>> newEnterpriseBeans;
private transient final Map<String, RIBean<?>> riBeans;
- private final transient Map<Bean<?>, Bean<?>> specializedBeans;
+ private final transient Map<Contextual<?>, Contextual<?>> specializedBeans;
private final transient AtomicInteger ids;
/*
@@ -232,7 +233,7 @@
new ClientProxyProvider(),
new ConcurrentListHashMultiMap<Class<? extends Annotation>, Context>(),
new CopyOnWriteArraySet<CurrentActivity>(),
- new HashMap<Bean<?>, Bean<?>>(), defaultEnabledDeploymentTypes, defaultEnabledDecoratorClasses,
+ new HashMap<Contextual<?>, Contextual<?>>(), defaultEnabledDeploymentTypes, defaultEnabledDecoratorClasses,
new AtomicInteger());
}
@@ -272,7 +273,7 @@
*
* @param ejbServices the ejbResolver to use
*/
- private BeanManagerImpl(ServiceRegistry serviceRegistry, List<Bean<?>> beans, List<DecoratorBean<?>> decorators, ConcurrentSetMultiMap<Type, EventObserver<?>> registeredObservers, Namespace rootNamespace, Map<Class<?>, EnterpriseBean<?>> newEnterpriseBeans, Map<String, RIBean<?>> riBeans, ClientProxyProvider clientProxyProvider, ConcurrentListMultiMap<Class<? extends Annotation>, Context> contexts, Set<CurrentActivity> currentActivities, Map<Bean<?>, Bean<?>> specializedBeans, List<Class<? extends Annotation>> enabledDeploymentTypes, List<Class<?>> enabledDecoratorClasses, AtomicInteger ids)
+ private BeanManagerImpl(ServiceRegistry serviceRegistry, List<Bean<?>> beans, List<DecoratorBean<?>> decorators, ConcurrentSetMultiMap<Type, EventObserver<?>> registeredObservers, Namespace rootNamespace, Map<Class<?>, EnterpriseBean<?>> newEnterpriseBeans, Map<String, RIBean<?>> riBeans, ClientProxyProvider clientProxyProvider, ConcurrentListMultiMap<Class<? extends Annotation>, Context> contexts, Set<CurrentActivity> currentActivities, Map<Contextual<?>, Contextual<?>> specializedBeans, List<Class<? extends Annotation>> enabledDeploymentTypes, List<Class<?>> enabledDecoratorClasses, AtomicInteger ids)
{
this.services = serviceRegistry;
this.beans = beans;
@@ -689,6 +690,10 @@
public Object getInjectableReference(Bean<?> bean, CreationalContext<?> creationalContext)
{
bean = getMostSpecializedBean(bean);
+ if (creationalContext instanceof CreationalContextImpl)
+ {
+ creationalContext = ((CreationalContextImpl<?>) creationalContext).getCreationalContext(bean);
+ }
if (getServices().get(MetaDataCache.class).getScopeModel(bean.getScopeType()).isNormal())
{
if (creationalContext != null || (creationalContext == null && getContext(bean.getScopeType()).get(bean) != null))
@@ -702,7 +707,7 @@
}
else
{
- return getContext(bean.getScopeType()).get((Bean) bean, creationalContext);
+ return getContext(bean.getScopeType()).get((Contextual) bean, creationalContext);
}
}
@@ -711,9 +716,9 @@
* does not pay attention to what type the resulting instance needs to
* implement
*/
- public Object getReference(Bean<?> bean, Type beanType)
+ public Object getReference(Bean<?> bean, Type beanType, CreationalContext<?> creationalContext)
{
- return getInjectableReference(bean, createCreationalContext().getCreationalContext(bean));
+ return getInjectableReference(bean, creationalContext);
}
@SuppressWarnings("unchecked")
@@ -734,14 +739,14 @@
}
if (creationalContext instanceof CreationalContextImpl)
{
- CreationalContextImpl<?> ctx = (CreationalContextImpl<?>) creationalContext;
- if (ctx.containsIncompleteInstance(resolvedBean))
+ CreationalContextImpl<?> creationalContextImpl = (CreationalContextImpl<?>) creationalContext;
+ if (creationalContextImpl.containsIncompleteInstance(resolvedBean))
{
- return ctx.getIncompleteInstance(resolvedBean);
+ return creationalContextImpl.getIncompleteInstance(resolvedBean);
}
else
{
- return getInjectableReference(resolvedBean, ctx.getCreationalContext(resolvedBean));
+ return getInjectableReference(resolvedBean, creationalContextImpl);
}
}
else
@@ -772,7 +777,8 @@
public <T> T getInstanceByType(Class<T> type, Annotation... bindings)
{
WBAnnotated<T, ?> element = ResolvableWBClass.of(type, bindings, this);
- return (T) getReference(getBean(element, bindings), type);
+ Bean<T> bean = getBean(element, bindings);
+ return (T) getReference(bean, type, createCreationalContext(bean));
}
public <T> Bean<T> getBean(WBAnnotated<T, ?> element, Annotation... bindings)
@@ -822,7 +828,7 @@
return new ArrayList(decoratorResolver.get(ResolvableFactory.of(types, bindings)));
}
- public List<Decorator<?>> resolveDecorators(Bean<?> bean)
+ public List<Decorator<?>> resolveDecorators(Contextual<?> bean)
{
throw new UnsupportedOperationException();
}
@@ -936,7 +942,7 @@
*
* @return
*/
- public Map<Bean<?>, Bean<?>> getSpecializedBeans()
+ public Map<Contextual<?>, Contextual<?>> getSpecializedBeans()
{
// TODO make this unmodifiable after deploy!
return specializedBeans;
@@ -1054,7 +1060,7 @@
public <X> Bean<? extends X> getMostSpecializedBean(Bean<X> bean)
{
- Bean<?> key = bean;
+ Contextual<?> key = bean;
while (specializedBeans.containsKey(key))
{
if (key == null)
@@ -1148,9 +1154,9 @@
return webbeansELResolver;
}
- public CreationalContextImpl<?> createCreationalContext()
+ public <T> CreationalContextImpl<T> createCreationalContext(Contextual<T> contextual)
{
- return new CreationalContextImpl<Object>();
+ return new CreationalContextImpl<T>(contextual);
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/InstanceImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/InstanceImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/InstanceImpl.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -54,7 +54,7 @@
Bean<T> bean = getManager().getBean(ResolvableWBClass.<T>of(getType(), annotations, getManager()), annotations);
@SuppressWarnings("unchecked")
- T instance = (T) getManager().getReference(bean, getType());
+ T instance = (T) getManager().getReference(bean, getType(), getManager().createCreationalContext(bean));
return instance;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -37,7 +37,6 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
-import org.jboss.webbeans.context.DependentInstancesStore;
import org.jboss.webbeans.conversation.ConversationImpl;
import org.jboss.webbeans.injection.WBInjectionPoint;
import org.jboss.webbeans.introspector.WBAnnotated;
@@ -68,10 +67,8 @@
@SuppressWarnings("unchecked")
private static Set<Class<?>> STANDARD_WEB_BEAN_CLASSES = new HashSet<Class<?>>(Arrays.asList(Event.class, BeanManagerImpl.class, ConversationImpl.class));
- private boolean proxyable;
+ private boolean proxyable;
- protected final DependentInstancesStore dependentInstancesStore;
-
/**
* Helper class for getting deployment type
*
@@ -138,8 +135,7 @@
{
super(manager);
this.manager = manager;
- injectionPoints = new HashSet<WBInjectionPoint<?, ?>>();
- dependentInstancesStore = new DependentInstancesStore();
+ injectionPoints = new HashSet<WBInjectionPoint<?, ?>>();
}
/**
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -150,7 +150,7 @@
}
}
- protected T applyDecorators(T instance)
+ protected T applyDecorators(T instance, CreationalContext<T> creationalContext)
{
if (hasDecorators())
{
@@ -165,7 +165,7 @@
if (decorator instanceof DecoratorBean)
{
decoratorStackPosition.set(++i);
- decoratorInstances.add(new SerializableBeanInstance<DecoratorBean<Object>, Object>((DecoratorBean) decorator, getManager().getReference(decorator, Object.class)));
+ decoratorInstances.add(new SerializableBeanInstance<DecoratorBean<Object>, Object>((DecoratorBean) decorator, getManager().getReference(decorator, Object.class, creationalContext)));
}
else
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -42,7 +42,6 @@
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
import org.jboss.webbeans.context.CreationalContextImpl;
import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.context.DependentStorageRequest;
import org.jboss.webbeans.introspector.WBMember;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
@@ -325,7 +324,7 @@
return creationalContextImpl.getIncompleteInstance(getDeclaringBean());
}
}
- return manager.getReference(getDeclaringBean(), getDeclaringBean().getType());
+ return manager.getReference(getDeclaringBean(), getDeclaringBean().getType(), creationalContext);
}
}
@@ -336,13 +335,8 @@
*/
public T create(CreationalContext<T> creationalContext)
{
- DependentStorageRequest dependentStorageRequest = DependentStorageRequest.of(dependentInstancesStore, new Object());
try
{
- if (getDeclaringBean().isDependent())
- {
- DependentContext.instance().startCollectingDependents(dependentStorageRequest);
- }
DependentContext.instance().setActive(true);
T instance = produceInstance(creationalContext);
checkReturnValue(instance);
@@ -352,8 +346,7 @@
{
if (getDeclaringBean().isDependent())
{
- DependentContext.instance().stopCollectingDependents(dependentStorageRequest);
- dependentInstancesStore.destroyDependentInstances(dependentStorageRequest.getKey());
+ creationalContext.release();
}
DependentContext.instance().setActive(false);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -188,7 +188,7 @@
public void invokeDisposeMethod(Object instance, CreationalContext<?> creationalContext)
{
// TODO WTF - why isn't this using getReceiver!? Why is it assigning the beanInstance as the beanObject!?!
- Object beanInstance = disposalMethodInjectionPoint.isStatic() ? declaringBean : getManager().getReference(declaringBean, declaringBean.getType());
+ Object beanInstance = disposalMethodInjectionPoint.isStatic() ? declaringBean : getManager().getReference(declaringBean, declaringBean.getType(), creationalContext);
disposalMethodInjectionPoint.invokeWithSpecialValue(beanInstance, Disposes.class, instance, manager, creationalContext, IllegalArgumentException.class);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -40,7 +40,6 @@
import org.jboss.webbeans.bean.proxy.EnterpriseBeanProxyMethodHandler;
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.context.DependentStorageRequest;
import org.jboss.webbeans.ejb.InternalEjbDescriptor;
import org.jboss.webbeans.ejb.api.SessionObjectReference;
import org.jboss.webbeans.ejb.spi.BusinessInterfaceDescriptor;
@@ -230,9 +229,9 @@
DependentContext.instance().setActive(true);
T instance = proxyClass.newInstance();
creationalContext.push(instance);
- ((ProxyObject) instance).setHandler(new EnterpriseBeanProxyMethodHandler(this));
+ ((ProxyObject) instance).setHandler(new EnterpriseBeanProxyMethodHandler<T>(this, creationalContext));
log.trace("Enterprise bean instance created for bean {0}", this);
- return applyDecorators(instance);
+ return applyDecorators(instance, creationalContext);
}
catch (InstantiationException e)
{
@@ -269,7 +268,7 @@
}
else
{
- enterpiseBeanInstance.destroy();
+ enterpiseBeanInstance.destroy(this, creationalContext);
}
}
@@ -310,7 +309,6 @@
public void postConstruct(T instance)
{
- DependentStorageRequest dependentStorageRequest = DependentStorageRequest.of(dependentInstancesStore, instance);
try
{
CreationalContext<T> creationalContext = new CreationalContext<T>()
@@ -324,22 +322,20 @@
}
};
- DependentContext.instance().startCollectingDependents(dependentStorageRequest);
DependentContext.instance().setActive(true);
injectBoundFields(instance, creationalContext);
callInitializers(instance, creationalContext);
}
finally
{
- DependentContext.instance().stopCollectingDependents(dependentStorageRequest);
DependentContext.instance().setActive(false);
}
}
- public void preDestroy(T instance)
+ public void preDestroy(CreationalContext<T> creationalContext)
{
- dependentInstancesStore.destroyDependentInstances(instance);
+ creationalContext.release();
}
@Override
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -29,7 +29,6 @@
import org.jboss.webbeans.DefinitionException;
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.context.DependentStorageRequest;
import org.jboss.webbeans.injection.MethodInjectionPoint;
import org.jboss.webbeans.injection.ParameterInjectionPoint;
import org.jboss.webbeans.introspector.WBMethod;
@@ -176,13 +175,8 @@
public void destroy(T instance, CreationalContext<T> creationalContext)
{
- DependentStorageRequest dependentStorageRequest = DependentStorageRequest.of(dependentInstancesStore, new Object());
try
{
- if (getDeclaringBean().isDependent())
- {
- DependentContext.instance().startCollectingDependents(dependentStorageRequest);
- }
DependentContext.instance().setActive(true);
if (disposalMethodBean != null)
disposalMethodBean.invokeDisposeMethod(instance, creationalContext);
@@ -191,8 +185,7 @@
{
if (getDeclaringBean().isDependent())
{
- DependentContext.instance().stopCollectingDependents(dependentStorageRequest);
- dependentInstancesStore.destroyDependentInstances(dependentStorageRequest.getKey());
+ creationalContext.release();
}
DependentContext.instance().setActive(false);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -30,7 +30,6 @@
import org.jboss.webbeans.DefinitionException;
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.context.DependentStorageRequest;
import org.jboss.webbeans.ejb.EJBApiAbstraction;
import org.jboss.webbeans.ejb.spi.EjbServices;
import org.jboss.webbeans.injection.ConstructorInjectionPoint;
@@ -115,23 +114,13 @@
{
DependentContext.instance().setActive(true);
T instance = null;
- DependentStorageRequest dependentStorageRequest = null;
- try
- {
- instance = constructor.newInstance(manager, creationalContext);
- instance = applyDecorators(instance);
- creationalContext.push(instance);
- dependentStorageRequest = DependentStorageRequest.of(dependentInstancesStore, instance);
- DependentContext.instance().startCollectingDependents(dependentStorageRequest);
- injectEjbAndCommonFields(instance);
- injectBoundFields(instance, creationalContext);
- callInitializers(instance, creationalContext);
- callPostConstruct(instance);
- }
- finally
- {
- DependentContext.instance().stopCollectingDependents(dependentStorageRequest);
- }
+ instance = constructor.newInstance(manager, creationalContext);
+ instance = applyDecorators(instance, creationalContext);
+ creationalContext.push(instance);
+ injectEjbAndCommonFields(instance);
+ injectBoundFields(instance, creationalContext);
+ callInitializers(instance, creationalContext);
+ callPostConstruct(instance);
return instance;
}
finally
@@ -151,7 +140,7 @@
{
DependentContext.instance().setActive(true);
callPreDestroy(instance);
- dependentInstancesStore.destroyDependentInstances(instance);
+ creationalContext.release();
}
catch (Exception e)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -112,7 +112,7 @@
boolean outer;
if (currentCreationalContext.get() == null)
{
- creationalContext = manager.createCreationalContext().getCreationalContext(bean);
+ creationalContext = manager.createCreationalContext(bean);
currentCreationalContext.set(creationalContext);
outer = true;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanInstance.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanInstance.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanInstance.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -16,6 +16,10 @@
*/
package org.jboss.webbeans.bean.proxy;
+import javax.enterprise.context.spi.CreationalContext;
+
+import org.jboss.webbeans.bean.EnterpriseBean;
+
/**
* Interface implemented by all enterprise bean proxies to query/control the proxy
*
@@ -35,6 +39,6 @@
public void setDestroyed(boolean destroyed);
- public void destroy();
+ public void destroy(EnterpriseBean<?> enterpriseBean, CreationalContext<?> creationalContext);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -22,6 +22,8 @@
import javassist.util.proxy.MethodHandler;
+import javax.enterprise.context.spi.CreationalContext;
+
import org.jboss.webbeans.bean.EnterpriseBean;
import org.jboss.webbeans.ejb.api.SessionObjectReference;
import org.jboss.webbeans.introspector.MethodSignature;
@@ -37,7 +39,7 @@
* @author Pete Muir
*
*/
-public class EnterpriseBeanProxyMethodHandler implements MethodHandler, Serializable
+public class EnterpriseBeanProxyMethodHandler<T> implements MethodHandler, Serializable
{
private static final long serialVersionUID = 2107723373882153667L;
@@ -47,10 +49,12 @@
private static final ThreadLocal<EnterpriseBean<?>> enterpriseBean;
+ private static final ThreadLocal<CreationalContext<?>> enterpriseBeanCreationalContext;
+
static
{
enterpriseBean = new ThreadLocal<EnterpriseBean<?>>();
-
+ enterpriseBeanCreationalContext = new ThreadLocal<CreationalContext<?>>();
}
public static EnterpriseBean<?> getEnterpriseBean()
@@ -58,9 +62,18 @@
return enterpriseBean.get();
}
- private static void setEnterpriseBean(EnterpriseBean<?> bean)
+ /**
+ * @return the enterpriseBeanCreationalContext
+ */
+ public static CreationalContext<?> getEnterpriseBeanCreationalContext()
{
+ return enterpriseBeanCreationalContext.get();
+ }
+
+ private static <T> void setEnterpriseBean(EnterpriseBean<T> bean, CreationalContext<T> creationalContext)
+ {
enterpriseBean.set(bean);
+ enterpriseBeanCreationalContext.set(creationalContext);
}
private final SessionObjectReference reference;
@@ -77,7 +90,7 @@
*
* @param proxy The generic proxy
*/
- public EnterpriseBeanProxyMethodHandler(EnterpriseBean<?> bean)
+ public EnterpriseBeanProxyMethodHandler(EnterpriseBean<T> bean, CreationalContext<T> creationalContext)
{
this.destroyed = false;
this.objectInterface = bean.getEjbDescriptor().getObjectInterface();
@@ -85,12 +98,12 @@
this.clientCanCallRemoveMethods = bean.isClientCanCallRemoveMethods();
try
{
- setEnterpriseBean(bean);
+ setEnterpriseBean(bean, creationalContext);
this.reference = bean.createReference();
}
finally
{
- setEnterpriseBean(null);
+ setEnterpriseBean(null, null);
}
log.trace("Created enterprise bean proxy method handler for " + bean);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/BeanInstanceImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/BeanInstanceImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/BeanInstanceImpl.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -32,6 +32,12 @@
public CreationalContext<T> getCreationalContext()
{
return creationalContext;
- }
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Bean: " + contextual + "; Instance: " + instance + "; CreationalContext: " + creationalContext;
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -19,51 +19,60 @@
import java.util.HashMap;
import java.util.Map;
+import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.Bean;
public class CreationalContextImpl<T> implements CreationalContext<T>
{
- private final Map<Bean<?>, Object> incompleteInstances;
- private final Bean<T> bean;
+ private final Map<Contextual<?>, Object> incompleteInstances;
+ private final Contextual<T> contextual;
- public CreationalContextImpl()
+ private final DependentInstancesStore dependentInstancesStore;
+
+ private final DependentInstancesStore parentDependentInstancesStore;
+
+ public CreationalContextImpl(Contextual<T> contextual)
{
- this.incompleteInstances = new HashMap<Bean<?>, Object>();
- this.bean = null;
+ this(contextual, new HashMap<Contextual<?>, Object>(), new DependentInstancesStore());
}
- private CreationalContextImpl(Bean<T> bean, Map<Bean<?>, Object> incompleteInstances)
+ private CreationalContextImpl(Contextual<T> contextual, Map<Contextual<?>, Object> incompleteInstances, DependentInstancesStore parentDependentInstancesStore)
{
this.incompleteInstances = incompleteInstances;
- this.bean = bean;
+ this.contextual = contextual;
+ this.dependentInstancesStore = new DependentInstancesStore();
+ this.parentDependentInstancesStore = parentDependentInstancesStore;
}
public void push(T incompleteInstance)
{
- incompleteInstances.put(bean, incompleteInstance);
+ incompleteInstances.put(contextual, incompleteInstance);
}
- public <S> CreationalContextImpl<S> getCreationalContext(Bean<S> bean)
+ public <S> CreationalContextImpl<S> getCreationalContext(Contextual<S> Contextual)
{
- return new CreationalContextImpl<S>(bean, new HashMap<Bean<?>, Object>(incompleteInstances));
+ return new CreationalContextImpl<S>(Contextual, new HashMap<Contextual<?>, Object>(incompleteInstances), dependentInstancesStore);
}
- public <S> S getIncompleteInstance(Bean<S> bean)
+ public <S> S getIncompleteInstance(Contextual<S> bean)
{
return (S) incompleteInstances.get(bean);
}
- public boolean containsIncompleteInstance(Bean<?> bean)
+ public boolean containsIncompleteInstance(Contextual<?> bean)
{
return incompleteInstances.containsKey(bean);
}
+
+ public DependentInstancesStore getParentDependentInstancesStore()
+ {
+ return parentDependentInstancesStore;
+ }
public void release()
{
- // TODO Auto-generated method stub
-
+ dependentInstancesStore.destroyDependentInstances();
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -28,7 +28,6 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.Bean;
import org.jboss.webbeans.CurrentManager;
import org.jboss.webbeans.bootstrap.api.Service;
@@ -48,8 +47,6 @@
}
private final ThreadLocal<AtomicInteger> reentrantActiveCount;
- // A (possible null) request to store dependents created
- private final ThreadLocal<DependentStorageRequest> dependentStorageRequest;
/**
* Constructor
@@ -66,7 +63,6 @@
return new AtomicInteger(0);
}
};
- this.dependentStorageRequest = new ThreadLocal<DependentStorageRequest>();
}
/**
@@ -84,10 +80,11 @@
if (creationalContext != null)
{
T instance = contextual.create(creationalContext);
- if (dependentStorageRequest.get() != null)
+ if (creationalContext instanceof CreationalContextImpl)
{
+ CreationalContextImpl<T> creationalContextImpl = (CreationalContextImpl<T>) creationalContext;
BeanInstance<T> beanInstance = new BeanInstanceImpl<T>(contextual, instance, creationalContext);
- dependentStorageRequest.get().getDependentInstancesStore().addDependentInstance(dependentStorageRequest.get().getKey(), beanInstance);
+ creationalContextImpl.getParentDependentInstancesStore().addDependentInstance(beanInstance);
}
return instance;
}
@@ -127,45 +124,14 @@
}
}
}
-
- /**
- * Starts collecting dependent instances created by placing in the dependent
- * instances store specified in the request. The request is only honored if
- * there are no current request present.
- *
- * @param dependentStorageRequest The storage request
- */
- public void startCollectingDependents(DependentStorageRequest dependentStorageRequest)
- {
- if (this.dependentStorageRequest.get() == null)
- {
- this.dependentStorageRequest.set(dependentStorageRequest);
- }
- }
-
- /**
- * Stops collecting dependent instances created. The request is only honored
- * if the request passed is the same that was used for starting the
- * collection
- *
- * @param dependentStorageRequest The storage request
- */
- public void stopCollectingDependents(DependentStorageRequest dependentStorageRequest)
- {
- // Could also be null if we hit the finally block before the collection
- // has started
- if (this.dependentStorageRequest.get() != null && this.dependentStorageRequest.get().equals(dependentStorageRequest))
- {
- this.dependentStorageRequest.set(null);
- }
- }
+ @Deprecated
public <T> void destroyAndRemove(Contextual<T> contextual, T instance)
{
- if (contextual instanceof Bean)
+ if (contextual instanceof Contextual)
{
- CreationalContextImpl<T> creationalContext = new CreationalContextImpl<T>();
- contextual.destroy(instance, creationalContext.getCreationalContext((Bean<T>) contextual));
+ CreationalContextImpl<T> creationalContext = new CreationalContextImpl<T>(contextual);
+ contextual.destroy(instance, creationalContext.getCreationalContext(contextual));
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentInstancesStore.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -16,13 +16,12 @@
*/
package org.jboss.webbeans.context;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
import org.jboss.webbeans.context.api.BeanInstance;
-import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Log;
import org.jboss.webbeans.log.Logging;
/**
@@ -32,17 +31,17 @@
*/
public class DependentInstancesStore
{
- private static LogProvider log = Logging.getLogProvider(DependentInstancesStore.class);
+ private static Log log = Logging.getLog(DependentInstancesStore.class);
// A object -> List of contextual instances mapping
- private Map<Object, List<BeanInstance<?>>> dependentInstances;
+ private List<BeanInstance<?>> dependentInstances;
/**
* Creates a new DependentInstancesStore
*/
public DependentInstancesStore()
{
- dependentInstances = new ConcurrentHashMap<Object, List<BeanInstance<?>>>();
+ dependentInstances = Collections.synchronizedList(new ArrayList<BeanInstance<?>>());
}
/**
@@ -51,41 +50,35 @@
* @param key The key to store the instance under
* @param contextualInstance The instance to store
*/
- public <T> void addDependentInstance(Object key, BeanInstance<T> contextualInstance)
+ public <T> void addDependentInstance(BeanInstance<T> contextualInstance)
{
- List<BeanInstance<?>> instances = dependentInstances.get(key);
- if (instances == null)
- {
- instances = new CopyOnWriteArrayList<BeanInstance<?>>();
- dependentInstances.put(key, instances);
- }
- log.trace("Registered dependent instance " + contextualInstance + " under key " + key);
- instances.add(contextualInstance);
+ log.trace("Registered dependent instance #0", contextualInstance);
+ dependentInstances.add(contextualInstance);
}
/**
- * Destroys all dependent objects associated with a particular key and remove
- * that key from the store
+ * Destroys all dependent objects
*
* @param key The key to remove
*/
- public void destroyDependentInstances(Object key)
+ public void destroyDependentInstances()
{
- log.trace("Destroying dependent instances under key " + key);
- if (!dependentInstances.containsKey(key))
+ log.trace("Destroying dependent instances");
+ for (BeanInstance<?> injectedInstance : dependentInstances)
{
- return;
- }
- for (BeanInstance<?> injectedInstance : dependentInstances.get(key))
- {
destroy(injectedInstance);
}
- dependentInstances.remove(key);
}
private static <T> void destroy(BeanInstance<T> beanInstance)
{
beanInstance.getContextual().destroy(beanInstance.getInstance(), beanInstance.getCreationalContext());
}
+
+ @Override
+ public String toString()
+ {
+ return "Dependent Instances: " + dependentInstances;
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/SessionBeanInterceptor.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/SessionBeanInterceptor.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/ejb/SessionBeanInterceptor.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -22,6 +22,7 @@
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
+import javax.enterprise.context.spi.CreationalContext;
import javax.interceptor.InvocationContext;
import org.jboss.webbeans.CurrentManager;
@@ -43,6 +44,8 @@
private transient Log log = Logging.getLog(SessionBeanInterceptor.class);
private transient EnterpriseBean<Object> bean;
+ private transient CreationalContext<Object> creationalContext;
+
private String beanId;
private boolean contextual;
@@ -71,13 +74,10 @@
public void preDestroy(InvocationContext invocationContext) throws Exception
{
Object target = invocationContext.getTarget();
- if (bean == null)
- {
- log.warn("Support for destroying passivated EJBs not yet implemented");
- }
- bean.preDestroy(target);
+ initBean(target.getClass());
if (contextual)
{
+ bean.preDestroy(creationalContext);
EnterpriseBeanInstance instance = getEnterpriseBeanInstance(bean);
if (instance != null)
{
@@ -100,6 +100,7 @@
{
this.bean = bean;
this.contextual = true;
+ this.creationalContext = (CreationalContext<Object>) EnterpriseBeanProxyMethodHandler.getEnterpriseBeanCreationalContext();
}
else
{
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/RunInDependentContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/RunInDependentContext.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/RunInDependentContext.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.el;
-
-import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.context.DependentInstancesStore;
-import org.jboss.webbeans.context.DependentStorageRequest;
-
-abstract class RunInDependentContext
-{
-
- private final DependentStorageRequest dependentStorageRequest;
-
- public RunInDependentContext()
- {
- dependentStorageRequest = DependentStorageRequest.of(new DependentInstancesStore(), new Object());
- }
-
- private void setup()
- {
- DependentContext.instance().setActive(true);
- DependentContext.instance().startCollectingDependents(dependentStorageRequest);
- }
-
- private void cleanup()
- {
- DependentContext.instance().stopCollectingDependents(dependentStorageRequest);
- // TODO kinky
- dependentStorageRequest.getDependentInstancesStore().destroyDependentInstances(dependentStorageRequest.getKey());
- DependentContext.instance().setActive(false);
- }
-
- protected abstract void execute() throws Exception;
-
- public final void run() throws Exception
- {
- try
- {
- setup();
- execute();
- }
- finally
- {
- cleanup();
- }
- }
-
-}
\ No newline at end of file
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolverImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolverImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/el/WebBeansELResolverImpl.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -21,6 +21,7 @@
import javax.el.ELContext;
import javax.el.ELResolver;
+import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
import org.jboss.webbeans.BeanManagerImpl;
@@ -131,20 +132,14 @@
final ValueHolder<Object> holder = new ValueHolder<Object>();
try
{
- new RunInDependentContext()
+
+ Bean<?> bean = manager.getHighestPrecedenceBean(manager.getBeans(name));
+ CreationalContext<?> creationalContext = manager.createCreationalContext(bean);
+ if (bean != null)
{
-
- @Override
- protected void execute() throws Exception
- {
- Bean<?> bean = manager.getHighestPrecedenceBean(manager.getBeans(name));
- if (bean != null)
- {
- holder.setValue(manager.getReference(bean, Object.class));
- }
- }
-
- }.run();
+ holder.setValue(manager.getInjectableReference(bean, creationalContext));
+ }
+ creationalContext.release();
}
catch (Exception e)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -35,9 +35,6 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
import org.jboss.webbeans.bean.RIBean;
-import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.context.DependentInstancesStore;
-import org.jboss.webbeans.context.DependentStorageRequest;
import org.jboss.webbeans.injection.MethodInjectionPoint;
import org.jboss.webbeans.introspector.WBMethod;
import org.jboss.webbeans.introspector.WBParameter;
@@ -171,18 +168,13 @@
protected void sendEvent(final T event)
{
Object instance = null;
- DependentStorageRequest dependentStorageRequest = DependentStorageRequest.of(new DependentInstancesStore(), new Object());
+ CreationalContext<?> creationalContext = null;
try
{
- if (Dependent.class.equals(observerBean.getScopeType()) && observerBean instanceof RIBean)
- {
- DependentContext.instance().startCollectingDependents(dependentStorageRequest);
- }
// Get the most specialized instance of the component
- CreationalContext<?> creationalContext = null;
if (!conditional)
{
- creationalContext = manager.createCreationalContext().getCreationalContext(observerBean);
+ creationalContext = manager.createCreationalContext(observerBean);
}
instance = manager.getInjectableReference(observerBean, creationalContext);
if (instance == null)
@@ -194,10 +186,9 @@
}
finally
{
- if (Dependent.class.equals(observerBean.getScopeType()))
+ if (creationalContext != null && Dependent.class.equals(observerBean.getScopeType()))
{
- DependentContext.instance().stopCollectingDependents(dependentStorageRequest);
- dependentStorageRequest.getDependentInstancesStore().destroyDependentInstances(dependentStorageRequest.getKey());
+ creationalContext.release();
}
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/ConversationAwareViewHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/ConversationAwareViewHandler.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/ConversationAwareViewHandler.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -1,11 +1,11 @@
package org.jboss.webbeans.jsf;
import javax.enterprise.context.Conversation;
-import javax.enterprise.inject.spi.BeanManager;
import javax.faces.application.ViewHandler;
import javax.faces.application.ViewHandlerWrapper;
import javax.faces.context.FacesContext;
+import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.CurrentManager;
/**
@@ -51,9 +51,8 @@
public String getActionURL(FacesContext context, String viewId)
{
String actionUrl = super.getActionURL(context, viewId);
- BeanManager beanManager = CurrentManager.rootManager();
- Conversation conversation = (Conversation) beanManager.getReference(
- (beanManager.getBeans(Conversation.class).iterator().next()),Conversation.class);
+ BeanManagerImpl beanManager = CurrentManager.rootManager();
+ Conversation conversation = beanManager.getInstanceByType(Conversation.class);
if (conversation.isLongRunning())
{
return new FacesUrlTransformer(actionUrl).appendConversationIdIfNecessary(conversation.getId()).getUrl();
Modified: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/BeansImpl.java
===================================================================
--- ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/BeansImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/porting-package/src/main/java/org/jboss/webbeans/tck/BeansImpl.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -83,7 +83,7 @@
public <T> T createBeanInstance(Bean<T> bean)
{
- return (T) CurrentManager.rootManager().getCurrent().getReference(bean, Object.class);
+ return (T) CurrentManager.rootManager().getCurrent().getReference(bean, Object.class, CurrentManager.rootManager().getCurrent().createCreationalContext(bean));
}
public <T> void destroyAndRemoveBeanInstance(Bean<T> bean, T instance)
Modified: ri/trunk/tests/src/main/java/org/jboss/webbeans/test/AbstractWebBeansTest.java
===================================================================
--- ri/trunk/tests/src/main/java/org/jboss/webbeans/test/AbstractWebBeansTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/tests/src/main/java/org/jboss/webbeans/test/AbstractWebBeansTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -192,7 +192,8 @@
public Object createContextualInstance(Type beanType, Annotation... bindings)
{
- return getCurrentManager().getReference(getBean(beanType, bindings), beanType);
+ Bean<?> bean = getBean(beanType, bindings);
+ return getCurrentManager().getReference(bean, beanType, getCurrentManager().createCreationalContext(bean));
}
@SuppressWarnings("unchecked")
Modified: ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/ActivitiesTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/ActivitiesTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/tests/src/test/java/org/jboss/jsr299/tck/tests/activities/ActivitiesTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -176,7 +176,7 @@
public void testBeanBelongingToParentActivityBelongsToChildActivity()
{
assert getBeans(Cow.class).size() == 1;
- Bean<?> bean = getBeans(Cow.class).iterator().next();
+ Contextual<?> bean = getBeans(Cow.class).iterator().next();
BeanManager childActivity = getCurrentManager().createActivity();
assert childActivity.getBeans(Cow.class).size() == 1;
assert childActivity.getBeans(Cow.class).iterator().next().equals(bean);
@@ -186,7 +186,7 @@
public void testBeanBelongingToParentActivityCanBeInjectedIntoChildActivityBean()
{
assert getBeans(Cow.class).size() == 1;
- Bean<?> bean = getBeans(Cow.class).iterator().next();
+ Contextual<?> bean = getBeans(Cow.class).iterator().next();
BeanManager childActivity = getCurrentManager().createActivity();
Bean<?> dummyBean = createDummyBean(childActivity, Cow.class);
childActivity.addBean(dummyBean);
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/named/NamedBeanWithBindingTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -1,5 +1,7 @@
package org.jboss.webbeans.test.unit.implementation.named;
+import javax.enterprise.inject.spi.Bean;
+
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@@ -13,7 +15,8 @@
@Test
public void testGetNamedBeanWithBinding()
{
- NamedBeanWithBinding bean = (NamedBeanWithBinding) getCurrentManager().getReference(getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("namedBeanWithBinding")), Object.class);
- assert bean != null;
+ Bean<?> bean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("namedBeanWithBinding"));
+ NamedBeanWithBinding instance = (NamedBeanWithBinding) getCurrentManager().getReference(bean, Object.class, getCurrentManager().createCreationalContext(bean));
+ assert instance != null;
}
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -1,5 +1,7 @@
package org.jboss.webbeans.test.unit.implementation.producer.method;
+import javax.enterprise.inject.spi.Bean;
+
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@@ -10,9 +12,11 @@
@Test
public void testNamedProducer()
{
- String[] iemon = (String[]) getCurrentManager().getReference(getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("iemon")), Object.class);
+ Bean<?> iemonBean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("iemon"));
+ String[] iemon = (String[]) getCurrentManager().getReference(iemonBean, Object.class, getCurrentManager().createCreationalContext(iemonBean));
assert iemon.length == 3;
- String[] itoen = (String[]) getCurrentManager().getReference(getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("itoen")), Object.class);
+ Bean<?> itoenBean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("itoen"));
+ String[] itoen = (String[]) getCurrentManager().getReference(itoenBean, Object.class, getCurrentManager().createCreationalContext(itoenBean));
assert itoen.length == 2;
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -4,6 +4,8 @@
import java.util.Date;
+import javax.enterprise.inject.spi.Bean;
+
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@@ -17,7 +19,8 @@
@Test
public void testGetNamedProducerWithBinding()
{
- Date date = (Date) getCurrentManager().getReference(getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("date")), Object.class);
+ Bean<?> bean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("date"));
+ Date date = (Date) getCurrentManager().getReference(bean, Object.class, getCurrentManager().createCreationalContext(bean));
assertNotNull(date);
}
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -1,5 +1,7 @@
package org.jboss.webbeans.test.unit.implementation.proxy;
+import javax.enterprise.inject.spi.Bean;
+
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@@ -11,7 +13,8 @@
@Test(description="WBRI-122")
public void testImplementationClassImplementsSerializable()
{
- getCurrentManager().getReference(getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("foo")), Object.class);
+ Bean<?> bean = getCurrentManager().getHighestPrecedenceBean(getCurrentManager().getBeans("foo"));
+ getCurrentManager().getReference(bean, Object.class, getCurrentManager().createCreationalContext(bean));
}
}
Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -12,7 +12,6 @@
@Test
public void testCircularInjectionOnTwoNormalBeans() throws Exception
{
- //deployBeans(Pig.class, Food.class);
getCurrentManager().getInstanceByType(Pig.class).getName();
assert Pig.success;
assert Food.success;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/OldSPIBridge.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/OldSPIBridge.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/OldSPIBridge.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -22,14 +22,15 @@
@Deprecated
public static <T> T getInstanceByType(BeanManager manager, Class<T> beanType, Annotation... bindings)
{
- return (T)manager.getReference(ensureUniqueBean(beanType, manager.getBeans(beanType, bindings)),beanType);
+ Bean<T> bean = (Bean<T>) ensureUniqueBean(beanType, manager.getBeans(beanType, bindings));
+ return (T)manager.getReference(bean ,beanType, manager.createCreationalContext(bean));
}
@Deprecated
public static <T> T getInstanceByType(BeanManager manager, TypeLiteral<T> beanType, Annotation... bindings)
{
-
- return (T) manager.getReference(ensureUniqueBean(beanType.getType(), manager.getBeans(beanType.getType(), bindings)),beanType.getType());
+ Bean<T> bean = (Bean<T>) ensureUniqueBean(beanType.getType(), manager.getBeans(beanType.getType(), bindings));
+ return (T) manager.getReference(bean,beanType.getType(), manager.createCreationalContext(bean));
}
public static Bean<?> ensureUniqueBean(Type type, Set<Bean<?>> beans)
@@ -61,7 +62,7 @@
else
{
Bean<?> bean = beans.iterator().next();
- return manager.getReference(bean, bean.getTypes().iterator().next());
+ return manager.getReference(bean, bean.getTypes().iterator().next(), manager.createCreationalContext(bean));
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -6,6 +6,7 @@
import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.context.Dependent;
import javax.enterprise.context.spi.Context;
+import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.spi.Bean;
@@ -278,11 +279,12 @@
{
assert getBeans(Farm.class).size() == 1;
Bean<Farm> farmBean = getBeans(Farm.class).iterator().next();
- Farm farm = createBeanInstance(farmBean);
+ CreationalContext<Farm> creationalContext = getCurrentManager().createCreationalContext(farmBean);
+ Farm farm = farmBean.create(creationalContext);
farm.open();
Stable.destroyed = false;
Horse.destroyed = false;
- destroyAndRemoveBeanInstance(farmBean, farm);
+ farmBean.destroy(farm, creationalContext);
assert Stable.destroyed;
assert Horse.destroyed;
}
@@ -309,9 +311,10 @@
assert getCurrentManager().getBeans(FoxRun.class).size() == 1;
Bean<FoxRun> bean = getBeans(FoxRun.class).iterator().next();
- FoxRun instance = createBeanInstance(bean);
+ CreationalContext<FoxRun> creationalContext = getCurrentManager().createCreationalContext(bean);
+ FoxRun instance = bean.create(creationalContext);
assert instance.fox != instance.anotherFox;
- destroyAndRemoveBeanInstance(bean, instance);
+ bean.destroy(instance, creationalContext);
assert Fox.isDestroyed();
assert Fox.getDestroyCount() == 2;
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -2,6 +2,8 @@
import static org.jboss.testharness.impl.packaging.PackagingType.EAR;
+import javax.enterprise.inject.spi.Bean;
+
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
@@ -34,8 +36,9 @@
{
DependentSessionInterface sessionBean = getInstanceByType(DependentSessionInterface.class);
sessionBean.remove();
+ Bean<?> bean = getCurrentManager().getBeans(StateKeeper.class).iterator().next();
StateKeeper stateKeeper = (StateKeeper)
- getCurrentManager().getReference(getCurrentManager().getBeans(StateKeeper.class).iterator().next(),StateKeeper.class);
+ getCurrentManager().getReference(bean,StateKeeper.class, getCurrentManager().createCreationalContext(bean));
assert stateKeeper.isRemoveCalled();
}
}.run();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/SimpleBeanLifecycleTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -166,14 +166,13 @@
public void testContextualDestroyDisposesWhenNecessary() throws Exception
{
final Bean<Goose> gooseBean = getBeans(Goose.class).iterator().next();
- final Goose goose = getInstanceByType(Goose.class);
+ CreationalContext<Goose> creationalContext = getCurrentManager().createCreationalContext(gooseBean);
+ final Goose goose = gooseBean.create(creationalContext);
assert !EggProducer.isEggDisposed();
assert !Egg.isEggDestroyed();
- destroyAndRemoveBeanInstance(gooseBean, goose);
+ gooseBean.destroy(goose, creationalContext);
assert EggProducer.isEggDisposed();
- //TODO Apparently Dependent scoped injected objects do not have their PreDestroy method called
- //assert Egg.isEggDestroyed();
}
@Test(groups = "beanLifecycle")
@@ -195,8 +194,9 @@
public void testDependentsDestroyedAfterPreDestroy()
{
Bean<FishPond> pondBean = getBeans(FishPond.class).iterator().next();
- FishPond fishPond = getInstanceByType(FishPond.class);
- destroyAndRemoveBeanInstance(pondBean, fishPond);
+ CreationalContext<FishPond> creationalContext = getCurrentManager().createCreationalContext(pondBean);
+ FishPond fishPond = pondBean.create(creationalContext);
+ pondBean.destroy(fishPond, creationalContext);
assert Salmon.isBeanDestroyed();
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -37,7 +37,7 @@
protected void execute() throws Exception
{
Bean<Fox> foxBean = getBeans(Fox.class).iterator().next();
- Fox fox = (Fox) getCurrentManager().getReference(foxBean,Fox.class);
+ Fox fox = (Fox) getCurrentManager().getReference(foxBean,Fox.class, getCurrentManager().createCreationalContext(foxBean));
assert !getCurrentConfiguration().getBeans().isProxy(fox);
}
@@ -62,7 +62,7 @@
public void testClientProxyInvocation()
{
Bean<TunedTuna> tunaBean = getBeans(TunedTuna.class).iterator().next();
- TunedTuna tuna = (TunedTuna) getCurrentManager().getReference(tunaBean, TunedTuna.class);
+ TunedTuna tuna = (TunedTuna) getCurrentManager().getReference(tunaBean, TunedTuna.class, getCurrentManager().createCreationalContext(tunaBean));
assert getCurrentConfiguration().getBeans().isProxy(tuna);
assert tuna.getState().equals("tuned");
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -31,7 +31,7 @@
getBeans(ObtainsInjectionPointBean.class).iterator().next();
ObtainsInjectionPointBean injectionPoint = (ObtainsInjectionPointBean)
- getCurrentManager().getReference(injectionPointBean,ObtainsInjectionPointBean.class);
+ getCurrentManager().getReference(injectionPointBean,ObtainsInjectionPointBean.class, getCurrentManager().createCreationalContext(injectionPointBean));
assert injectionPoint.getPaymentProcessor() instanceof Instance;
}
@@ -47,7 +47,7 @@
getBeans(ObtainsInjectionPointBean.class).iterator().next();
ObtainsInjectionPointBean injectionPoint = (ObtainsInjectionPointBean)
- getCurrentManager().getReference( injectionPointBean, ObtainsInjectionPointBean.class);
+ getCurrentManager().getReference( injectionPointBean, ObtainsInjectionPointBean.class, getCurrentManager().createCreationalContext(injectionPointBean));
assert injectionPoint.getPaymentProcessor().get() instanceof ChequePaymentProcessor;
}
@@ -59,7 +59,7 @@
getBeans(ObtainsInjectionPointBean.class).iterator().next();
ObtainsInjectionPointBean injectionPoint = (ObtainsInjectionPointBean)
- getCurrentManager().getReference(injectionPointBean,ObtainsInjectionPointBean.class);
+ getCurrentManager().getReference(injectionPointBean,ObtainsInjectionPointBean.class, getCurrentManager().createCreationalContext(injectionPointBean));
injectionPoint.getPaymentProcessor().get(new PayByBinding() { public PaymentMethod value() { return CHEQUE; }});
}
@@ -71,7 +71,7 @@
getBeans(ObtainsInjectionPointBean.class).iterator().next();
ObtainsInjectionPointBean injectionPoint = (ObtainsInjectionPointBean)
- getCurrentManager().getReference(injectionPointBean,ObtainsInjectionPointBean.class);
+ getCurrentManager().getReference(injectionPointBean,ObtainsInjectionPointBean.class, getCurrentManager().createCreationalContext(injectionPointBean));
injectionPoint.getPaymentProcessor().get(new NonBinding() );
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-06-25 15:27:52 UTC (rev 2891)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-06-25 20:27:55 UTC (rev 2892)
@@ -77,6 +77,6 @@
public void testGetReferenceReturnsContextualInstance()
{
Bean<FishFarmOffice> bean = getBeans(FishFarmOffice.class).iterator().next();
- assert getCurrentManager().getReference(bean,FishFarmOffice.class) instanceof FishFarmOffice;
+ assert getCurrentManager().getReference(bean,FishFarmOffice.class, getCurrentManager().createCreationalContext(bean)) instanceof FishFarmOffice;
}
}
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2891 - in ri/trunk: impl/src/main/java/org/jboss/webbeans and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-06-25 11:27:52 -0400 (Thu, 25 Jun 2009)
New Revision: 2891
Modified:
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
Log:
Implement createCreationalContext and simplify detection of outer context
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java 2009-06-25 14:30:59 UTC (rev 2890)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java 2009-06-25 15:27:52 UTC (rev 2891)
@@ -404,5 +404,12 @@
* The metadata for construction of the ManagedBean
*/
public <T> ManagedBean<T> createManagedBean(AnnotatedType<T> type);
+
+ /**
+ * Obtain an instance of a {@link CreationalContext}
+ *
+ * @return the {@link CreationalContext} instance
+ */
+ public CreationalContext<?> createCreationalContext();
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-25 14:30:59 UTC (rev 2890)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
@@ -713,7 +713,7 @@
*/
public Object getReference(Bean<?> bean, Type beanType)
{
- return getInjectableReference(bean, CreationalContextImpl.of(bean));
+ return getInjectableReference(bean, createCreationalContext().getCreationalContext(bean));
}
@SuppressWarnings("unchecked")
@@ -1148,4 +1148,9 @@
return webbeansELResolver;
}
+ public CreationalContextImpl<?> createCreationalContext()
+ {
+ return new CreationalContextImpl<Object>();
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java 2009-06-25 14:30:59 UTC (rev 2890)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/ClientProxyMethodHandler.java 2009-06-25 15:27:52 UTC (rev 2891)
@@ -109,14 +109,17 @@
private <T> T getProxiedInstance(Bean<T> bean)
{
CreationalContextImpl<T> creationalContext;
+ boolean outer;
if (currentCreationalContext.get() == null)
{
- creationalContext = CreationalContextImpl.of(bean);
+ creationalContext = manager.createCreationalContext().getCreationalContext(bean);
currentCreationalContext.set(creationalContext);
+ outer = true;
}
else
{
creationalContext = currentCreationalContext.get().getCreationalContext(bean);
+ outer = false;
}
try
{
@@ -125,7 +128,7 @@
}
finally
{
- if (creationalContext.isOuter())
+ if (outer)
{
currentCreationalContext.remove();
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-06-25 14:30:59 UTC (rev 2890)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/CreationalContextImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
@@ -24,28 +24,20 @@
public class CreationalContextImpl<T> implements CreationalContext<T>
{
-
- public static <T> CreationalContextImpl<T> of(Bean<T> bean)
- {
- return new CreationalContextImpl<T>(bean);
- }
private final Map<Bean<?>, Object> incompleteInstances;
private final Bean<T> bean;
- private final boolean outer;
- private CreationalContextImpl(Bean<T> bean)
+ public CreationalContextImpl()
{
this.incompleteInstances = new HashMap<Bean<?>, Object>();
- this.bean = bean;
- this.outer = true;
+ this.bean = null;
}
private CreationalContextImpl(Bean<T> bean, Map<Bean<?>, Object> incompleteInstances)
{
this.incompleteInstances = incompleteInstances;
this.bean = bean;
- this.outer = false;
}
public void push(T incompleteInstance)
@@ -67,11 +59,6 @@
{
return incompleteInstances.containsKey(bean);
}
-
- public boolean isOuter()
- {
- return outer;
- }
public void release()
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java 2009-06-25 14:30:59 UTC (rev 2890)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java 2009-06-25 15:27:52 UTC (rev 2891)
@@ -164,8 +164,8 @@
{
if (contextual instanceof Bean)
{
- CreationalContext<T> creationalContext = CreationalContextImpl.of((Bean<T>) contextual);
- contextual.destroy(instance, creationalContext);
+ CreationalContextImpl<T> creationalContext = new CreationalContextImpl<T>();
+ contextual.destroy(instance, creationalContext.getCreationalContext((Bean<T>) contextual));
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-06-25 14:30:59 UTC (rev 2890)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-06-25 15:27:52 UTC (rev 2891)
@@ -35,7 +35,6 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
import org.jboss.webbeans.bean.RIBean;
-import org.jboss.webbeans.context.CreationalContextImpl;
import org.jboss.webbeans.context.DependentContext;
import org.jboss.webbeans.context.DependentInstancesStore;
import org.jboss.webbeans.context.DependentStorageRequest;
@@ -183,7 +182,7 @@
CreationalContext<?> creationalContext = null;
if (!conditional)
{
- creationalContext = CreationalContextImpl.of(observerBean);
+ creationalContext = manager.createCreationalContext().getCreationalContext(observerBean);
}
instance = manager.getInjectableReference(observerBean, creationalContext);
if (instance == null)
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2890 - ri/trunk/impl/src/main/java/org/jboss/webbeans/bean and 5 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-06-25 10:30:59 -0400 (Thu, 25 Jun 2009)
New Revision: 2890
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SerializableBeanInstance.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/CowShed.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/DecoratorInvocationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Foo.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator1.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator2.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooImpl.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Logger.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/MockLogger.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/TimestampLogger.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/invocation/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/invocation/beans.xml
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
Log:
Finish off decorators
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-06-25 08:13:14 UTC (rev 2889)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -35,10 +35,12 @@
import javax.enterprise.inject.UnproxyableResolutionException;
import javax.enterprise.inject.UnsatisfiedResolutionException;
import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.Decorator;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.event.Event;
import javax.inject.Obtains;
+import org.jboss.webbeans.bean.AbstractClassBean;
import org.jboss.webbeans.bean.DecoratorBean;
import org.jboss.webbeans.bean.NewEnterpriseBean;
import org.jboss.webbeans.bean.NewSimpleBean;
@@ -141,6 +143,21 @@
}
specializedBeans.add(abstractBean.getSpecializedBean());
}
+ if (Beans.isPassivatingBean(bean, manager) && bean instanceof AbstractClassBean)
+ {
+ AbstractClassBean<?> classBean = (AbstractClassBean<?>) bean;
+ if (classBean.hasDecorators())
+ {
+ for (Decorator<?> decorator : classBean.getDecorators())
+ {
+ if (!decorator.isSerializable())
+ {
+ throw new UnserializableDependencyException("The bean " + bean + " declares a passivating scope but has non-serializable decorator: " + decorator);
+ }
+ }
+ }
+
+ }
}
boolean normalScoped = manager.getServices().get(MetaDataCache.class).getScopeModel(bean.getScopeType()).isNormal();
if (normalScoped && !Beans.isBeanProxyable(bean))
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-06-25 08:13:14 UTC (rev 2889)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -534,6 +534,7 @@
public boolean isSerializable()
{
+ // TODO WTF - why are we not caching the serializability of injection points!
return _serializable && checkInjectionPointsAreSerializable();
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-06-25 08:13:14 UTC (rev 2889)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -17,11 +17,17 @@
package org.jboss.webbeans.bean;
import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
+import javassist.util.proxy.ProxyFactory;
+import javassist.util.proxy.ProxyObject;
+
import javax.enterprise.context.Dependent;
import javax.enterprise.context.ScopeType;
import javax.enterprise.context.spi.CreationalContext;
@@ -36,6 +42,7 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
+import org.jboss.webbeans.bean.proxy.DecoratorProxyMethodHandler;
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
import org.jboss.webbeans.injection.FieldInjectionPoint;
import org.jboss.webbeans.injection.MethodInjectionPoint;
@@ -46,6 +53,7 @@
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.util.Beans;
+import org.jboss.webbeans.util.Proxies;
import org.jboss.webbeans.util.Strings;
/**
@@ -68,9 +76,12 @@
private Set<MethodInjectionPoint<?>> initializerMethods;
private Set<String> dependencies;
- private List<Decorator<?>> decoratorStack;
+ private List<Decorator<?>> decorators;
private final String id;
+ private Class<T> proxyClassForDecorators;
+
+ private final ThreadLocal<Integer> decoratorStackPosition;
/**
* Constructor
@@ -83,6 +94,16 @@
super(manager);
this.annotatedItem = type;
this.id = createId(getClass().getSimpleName() + "-" + type.getName());
+ this.decoratorStackPosition = new ThreadLocal<Integer>()
+ {
+
+ @Override
+ protected Integer initialValue()
+ {
+ return 0;
+ }
+
+ };
}
/**
@@ -95,23 +116,95 @@
super.initialize(environment);
checkScopeAllowed();
checkBeanImplementation();
- initDecoratorStack();
+ initDecorators();
+ checkType();
+ initProxyClassForDecoratedBean();
}
- protected void initDecoratorStack()
+ protected void checkType()
{
- this.decoratorStack = getManager().resolveDecorators(getTypes(), getBindings());
+
}
+ protected void initDecorators()
+ {
+ this.decorators = getManager().resolveDecorators(getTypes(), getBindings());
+ }
+
public boolean hasDecorators()
{
- return this.decoratorStack != null && this.decoratorStack.size() > 0;
+ return this.decorators != null && this.decorators.size() > 0;
}
- protected List<Decorator<?>> getDecoratorStack()
+ protected void initProxyClassForDecoratedBean()
{
- return Collections.unmodifiableList(decoratorStack);
+ if (hasDecorators())
+ {
+ Set<Type> types = new LinkedHashSet<Type>(getTypes());
+ ProxyFactory proxyFactory = Proxies.getProxyFactory(types);
+
+ @SuppressWarnings("unchecked")
+ Class<T> proxyClass = proxyFactory.createClass();
+
+ this.proxyClassForDecorators = proxyClass;
+ }
}
+
+ protected T applyDecorators(T instance)
+ {
+ if (hasDecorators())
+ {
+ List<SerializableBeanInstance<DecoratorBean<Object>, Object>> decoratorInstances = new ArrayList<SerializableBeanInstance<DecoratorBean<Object>,Object>>();
+ boolean outside = decoratorStackPosition.get().intValue() == 0;
+ try
+ {
+ int i = decoratorStackPosition.get();
+ while (i < decorators.size())
+ {
+ Decorator<?> decorator = decorators.get(i);
+ if (decorator instanceof DecoratorBean)
+ {
+ decoratorStackPosition.set(++i);
+ decoratorInstances.add(new SerializableBeanInstance<DecoratorBean<Object>, Object>((DecoratorBean) decorator, getManager().getReference(decorator, Object.class)));
+ }
+ else
+ {
+ throw new IllegalStateException("Cannot operate on non container provided decorator " + decorator);
+ }
+ }
+ }
+ finally
+ {
+ if (outside)
+ {
+ decoratorStackPosition.remove();
+ }
+ }
+ try
+ {
+ T proxy = proxyClassForDecorators.newInstance();
+ ((ProxyObject) proxy).setHandler(new DecoratorProxyMethodHandler(decoratorInstances, instance));
+ return proxy;
+ }
+ catch (InstantiationException e)
+ {
+ throw new RuntimeException("Could not instantiate decorator proxy for " + toString(), e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new RuntimeException("Could not access bean correctly when creating decorator proxy for " + toString(), e);
+ }
+ }
+ else
+ {
+ return instance;
+ }
+ }
+
+ public List<Decorator<?>> getDecorators()
+ {
+ return Collections.unmodifiableList(decorators);
+ }
/**
* Injects bound fields
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-06-25 08:13:14 UTC (rev 2889)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -190,7 +190,7 @@
}
@Override
- protected void initDecoratorStack()
+ protected void initDecorators()
{
// No-op, decorators can't have decorators
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-06-25 08:13:14 UTC (rev 2889)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -232,7 +232,7 @@
creationalContext.push(instance);
((ProxyObject) instance).setHandler(new EnterpriseBeanProxyMethodHandler(this));
log.trace("Enterprise bean instance created for bean {0}", this);
- return instance;
+ return applyDecorators(instance);
}
catch (InstantiationException e)
{
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SerializableBeanInstance.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SerializableBeanInstance.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SerializableBeanInstance.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,34 @@
+package org.jboss.webbeans.bean;
+
+import java.io.Serializable;
+
+import org.jboss.webbeans.BeanManagerImpl;
+
+public class SerializableBeanInstance<T extends RIBean<I>, I> implements Serializable
+{
+
+ private static final long serialVersionUID = 7341389081613003687L;
+
+ private final BeanManagerImpl manager;
+ private final String beanId;
+ private final I instance;
+
+ public SerializableBeanInstance(T bean, I instance)
+ {
+ this.manager = bean.getManager();
+ this.beanId = bean.getId();
+ this.instance = instance;
+ }
+
+ @SuppressWarnings("unchecked")
+ public T getBean()
+ {
+ return (T) manager.getRiBeans().get(beanId);
+ }
+
+ public I getInstance()
+ {
+ return instance;
+ }
+
+}
\ No newline at end of file
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SerializableBeanInstance.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-06-25 08:13:14 UTC (rev 2889)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -119,6 +119,7 @@
try
{
instance = constructor.newInstance(manager, creationalContext);
+ instance = applyDecorators(instance);
creationalContext.push(instance);
dependentStorageRequest = DependentStorageRequest.of(dependentInstancesStore, instance);
DependentContext.instance().startCollectingDependents(dependentStorageRequest);
@@ -302,7 +303,6 @@
{
initConstructor();
super.initialize(environment);
- checkType();
initPostConstruct();
initPreDestroy();
if (getManager().getServices().contains(EjbServices.class))
@@ -357,7 +357,7 @@
{
throw new DefinitionException("Bean class which has decorators cannot be declared final " + this);
}
- for (Decorator<?> decorator : getDecoratorStack())
+ for (Decorator<?> decorator : getDecorators())
{
if (decorator instanceof DecoratorBean)
{
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.proxy;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.util.List;
+
+import javassist.util.proxy.MethodHandler;
+
+import org.jboss.webbeans.bean.DecoratorBean;
+import org.jboss.webbeans.bean.SerializableBeanInstance;
+import org.jboss.webbeans.introspector.MethodSignature;
+import org.jboss.webbeans.introspector.WBMethod;
+import org.jboss.webbeans.introspector.jlr.MethodSignatureImpl;
+
+/**
+ * Method handler for decorated beans
+ *
+ * @author Pete Muir
+ *
+ */
+public class DecoratorProxyMethodHandler implements MethodHandler, Serializable
+{
+ private static final long serialVersionUID = 4577632640130385060L;
+
+ private final List<SerializableBeanInstance<DecoratorBean<Object>, Object>> decoratorInstances;
+
+ private final Object instance;
+
+ /**
+ * Constructor
+ *
+ * @param removeMethods
+ *
+ * @param proxy The generic proxy
+ */
+ public DecoratorProxyMethodHandler(List<SerializableBeanInstance<DecoratorBean<Object>, Object>> decoratorInstances, Object instance)
+ {
+ this.decoratorInstances = decoratorInstances;
+ this.instance = instance;
+ }
+
+ /**
+ *
+ *
+ * @param self the proxy instance.
+ * @param method the overridden method declared in the super class or
+ * interface.
+ * @param proceed the forwarder method for invoking the overridden method. It
+ * is null if the overridden method is abstract or declared in the
+ * interface.
+ * @param args an array of objects containing the values of the arguments
+ * passed in the method invocation on the proxy instance. If a
+ * parameter type is a primitive type, the type of the array
+ * element is a wrapper class.
+ * @return the resulting value of the method invocation.
+ *
+ * @throws Throwable if the method invocation fails.
+ */
+ public Object invoke(Object self, Method method, Method proceed, Object[] args) throws Throwable
+ {
+ MethodSignature methodSignature = new MethodSignatureImpl(method);
+ for (SerializableBeanInstance<DecoratorBean<Object>, Object> beanInstance : decoratorInstances)
+ {
+ WBMethod<?> decoratorMethod = beanInstance.getBean().getAnnotatedItem().getMethod(methodSignature);
+ if (decoratorMethod != null)
+ {
+ return decoratorMethod.invokeOnInstance(beanInstance.getInstance(), args);
+ }
+ }
+ return method.invoke(instance, args);
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/DecoratorProxyMethodHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-06-25 08:13:14 UTC (rev 2889)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -16,6 +16,7 @@
*/
package org.jboss.webbeans.bean.proxy;
+import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Collection;
@@ -36,8 +37,11 @@
* @author Pete Muir
*
*/
-public class EnterpriseBeanProxyMethodHandler implements MethodHandler
+public class EnterpriseBeanProxyMethodHandler implements MethodHandler, Serializable
{
+
+ private static final long serialVersionUID = 2107723373882153667L;
+
// The log provider
static final transient Log log = Logging.getLog(EnterpriseBeanProxyMethodHandler.class);
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/CowShed.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/CowShed.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/CowShed.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.invocation;
+
+import javax.enterprise.inject.Current;
+
+/**
+ * @author pmuir
+ *
+ */
+public class CowShed
+{
+
+ public static final String MESSAGE = "cowShed";
+
+ @Current Logger logger;
+
+ @Current Foo foo;
+
+ public void milk()
+ {
+ logger.log(MESSAGE);
+ }
+
+ public void washDown()
+ {
+ foo.log(MESSAGE);
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/CowShed.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/DecoratorInvocationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/DecoratorInvocationTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/DecoratorInvocationTest.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.invocation;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+/**
+ * @author pmuir
+ *
+ */
+@Artifact
+@BeansXml("beans.xml")
+public class DecoratorInvocationTest extends AbstractJSR299Test
+{
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section="8.5", id="a"),
+ @SpecAssertion(section="8.5", id="c"),
+ @SpecAssertion(section="8.5", id="b"),
+ @SpecAssertion(section="8.1.3", id="d"),
+ @SpecAssertion(section="8.1.2", id="f"),
+ @SpecAssertion(section="8.1.2", id="b")
+ })
+ public void testDecoratorInvocation()
+ {
+ TimestampLogger.setMessage(null);
+ MockLogger.setMessage(null);
+ getInstanceByType(CowShed.class).milk();
+ assert TimestampLogger.getMessage().equals(CowShed.MESSAGE);
+ assert MockLogger.getMessage().equals(CowShed.MESSAGE);
+ }
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section="8.5", id="d"),
+ @SpecAssertion(section="8.5", id="e"),
+ @SpecAssertion(section="8.5", id="f"),
+ @SpecAssertion(section="8.4", id="a"),
+ @SpecAssertion(section="8.1.3", id="d"),
+ @SpecAssertion(section="8.1.2", id="f"),
+ @SpecAssertion(section="8.1.2", id="b")
+ })
+ public void testChainedDecoratorInvocation()
+ {
+ FooDecorator1.setMessage(null);
+ FooDecorator2.setMessage(null);
+ FooImpl.setMessage(null);
+ getInstanceByType(CowShed.class).washDown();
+ assert FooDecorator1.getMessage().equals(CowShed.MESSAGE);
+ assert FooDecorator2.getMessage().equals(CowShed.MESSAGE + FooDecorator1.SUFFIX);
+ assert FooImpl.getMessage().equals(CowShed.MESSAGE + FooDecorator1.SUFFIX + FooDecorator2.SUFFIX);
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/DecoratorInvocationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Foo.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Foo.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Foo.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.invocation;
+
+/**
+ * @author pmuir
+ *
+ */
+public interface Foo
+{
+
+ public void log(String message);
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Foo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator1.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator1.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator1.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.invocation;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+
+/**
+ * @author pmuir
+ *
+ */
+@Decorator
+public class FooDecorator1
+{
+
+ public static final String SUFFIX = "fooDecorator1";
+
+ private static String message;
+
+ /**
+ * @return the message
+ */
+ public static String getMessage()
+ {
+ return message;
+ }
+
+ /**
+ * @param message the message to set
+ */
+ public static void setMessage(String message)
+ {
+ FooDecorator1.message = message;
+ }
+
+ @Decorates Foo foo;
+
+ public void log(String message)
+ {
+ FooDecorator1.message = message;
+ foo.log(message + SUFFIX);
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator2.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator2.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator2.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.invocation;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+
+/**
+ * @author pmuir
+ *
+ */
+@Decorator
+public class FooDecorator2
+{
+
+ public static final String SUFFIX = "fooDecorator2";
+
+ private static String message;
+
+ /**
+ * @return the message
+ */
+ public static String getMessage()
+ {
+ return message;
+ }
+
+ /**
+ * @param message the message to set
+ */
+ public static void setMessage(String message)
+ {
+ FooDecorator2.message = message;
+ }
+
+ @Decorates Foo foo;
+
+ public void log(String message)
+ {
+ FooDecorator2.message = message;
+ foo.log(message + SUFFIX);
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooDecorator2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooImpl.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooImpl.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooImpl.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.invocation;
+
+/**
+ * @author pmuir
+ *
+ */
+public class FooImpl implements Foo
+{
+
+ private static String message;
+
+ /**
+ * @return the message
+ */
+ public static String getMessage()
+ {
+ return message;
+ }
+
+ /**
+ * @param message the message to set
+ */
+ public static void setMessage(String message)
+ {
+ FooImpl.message = message;
+ }
+
+ public void log(String message)
+ {
+ FooImpl.message = message;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/FooImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Logger.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Logger.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Logger.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.invocation;
+
+
+/**
+ * @author pmuir
+ *
+ */
+public interface Logger
+{
+
+ public void log(String string);
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/Logger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/MockLogger.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/MockLogger.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/MockLogger.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.invocation;
+
+/**
+ * @author pmuir
+ *
+ */
+public class MockLogger implements Logger
+{
+
+ private static String message = "";
+
+ public void log(String string)
+ {
+ message = string;
+ }
+
+ /**
+ * @return the log
+ */
+ public static String getMessage()
+ {
+ return message;
+ }
+
+ /**
+ * @param log the log to set
+ */
+ public static void setMessage(String log)
+ {
+ MockLogger.message = log;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/MockLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/TimestampLogger.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/TimestampLogger.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/TimestampLogger.java 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.invocation;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+
+
+/**
+ * @author pmuir
+ *
+ */
+@Decorator
+public class TimestampLogger
+{
+
+ private static String message;
+
+ @Decorates
+ private Logger logger;
+
+ public void log(String message)
+ {
+ TimestampLogger.message = message;
+ logger.log(message);
+ }
+
+ /**
+ * @return the message
+ */
+ public static String getMessage()
+ {
+ return message;
+ }
+
+ /**
+ * @param message the message to set
+ */
+ public static void setMessage(String message)
+ {
+ TimestampLogger.message = message;
+ }
+
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/invocation/TimestampLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/invocation/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/invocation/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/invocation/beans.xml 2009-06-25 14:30:59 UTC (rev 2890)
@@ -0,0 +1,7 @@
+<beans>
+ <decorators>
+ <class>org.jboss.jsr299.tck.tests.decorators.invocation.TimestampLogger</class>
+ <class>org.jboss.jsr299.tck.tests.decorators.invocation.FooDecorator1</class>
+ <class>org.jboss.jsr299.tck.tests.decorators.invocation.FooDecorator2</class>
+ </decorators>
+</beans>
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/invocation/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2889 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests: inheritance/specialization/enterprise/samePrecedence and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-06-25 04:13:14 -0400 (Thu, 25 Jun 2009)
New Revision: 2889
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/samePrecedence/SamePrecedenceTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/lowerprecedence/SpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/precedence/SpecializingBeanWithLowerPrecedenceTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java
Log:
Removed the ri-broken group from tests which are now working with deployment errors
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-06-24 23:28:49 UTC (rev 2888)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java 2009-06-25 08:13:14 UTC (rev 2889)
@@ -46,7 +46,7 @@
public class EjbInjectionTest extends AbstractJSR299Test
{
@Test(groups = { "ri-broken", "beanLifecycle", "commonAnnotations", "integration" })
- @SpecAssertion(section = "6.4", id = "b")
+ @SpecAssertion(section = "3.6.1", id = "ee")
public void testInjectionOfEjbs()
{
Bean<SimpleBean> simpleBeanBean = getBeans(SimpleBean.class).iterator().next();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/samePrecedence/SamePrecedenceTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/samePrecedence/SamePrecedenceTest.java 2009-06-24 23:28:49 UTC (rev 2888)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/samePrecedence/SamePrecedenceTest.java 2009-06-25 08:13:14 UTC (rev 2889)
@@ -18,7 +18,7 @@
public class SamePrecedenceTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section="4.3.3", id = "aa")
public void testSpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBean()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/lowerprecedence/SpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/lowerprecedence/SpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBeanTest.java 2009-06-24 23:28:49 UTC (rev 2888)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/lowerprecedence/SpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBeanTest.java 2009-06-25 08:13:14 UTC (rev 2889)
@@ -16,7 +16,7 @@
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section="4.3.3", id = "aa")
public void testSpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBean()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-06-24 23:28:49 UTC (rev 2888)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/producer/method/twoBeansSpecializeTheSameBean/TwoBeansSpecializeTheSameBeanTest.java 2009-06-25 08:13:14 UTC (rev 2889)
@@ -15,7 +15,7 @@
public class TwoBeansSpecializeTheSameBeanTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section="4.3.3", id = "ba")
public void testTwoBeansSpecializeTheSameBean()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/precedence/SpecializingBeanWithLowerPrecedenceTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/precedence/SpecializingBeanWithLowerPrecedenceTest.java 2009-06-24 23:28:49 UTC (rev 2888)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/precedence/SpecializingBeanWithLowerPrecedenceTest.java 2009-06-25 08:13:14 UTC (rev 2889)
@@ -14,7 +14,7 @@
@ExpectedDeploymentException(DeploymentError.class)
public class SpecializingBeanWithLowerPrecedenceTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section="4.3.3", id="aa")
public void testSpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBean()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java 2009-06-24 23:28:49 UTC (rev 2888)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/simple/broken/two/TwoSpecializingBeansForOneSpecializedTest.java 2009-06-25 08:13:14 UTC (rev 2889)
@@ -14,7 +14,7 @@
@ExpectedDeploymentException(DeploymentError.class)
public class TwoSpecializingBeansForOneSpecializedTest extends AbstractJSR299Test
{
- @Test(groups = "ri-broken")
+ @Test
@SpecAssertion(section="4.3.3", id="ba")
public void testTwoBeansSpecializeTheSameBean()
{
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2888 - ri/trunk/impl/src/main/java/org/jboss/webbeans/bean and 11 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-06-24 19:28:49 -0400 (Wed, 24 Jun 2009)
New Revision: 2888
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/FinalBeanMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/Logger.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/MockLogger.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/TimestampLogger.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/beans.xml
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/DecoratorResolver.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableFactory.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableWBClass.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBClass.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBMember.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBType.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/FinalBeanClassTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/tooManyDecoratorsElements/TooManyDecoratorElementsTest.java
Log:
Fixes to decorator resolution, tests and add more edge case detection
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -339,18 +339,21 @@
*/
public void addBean(Bean<?> bean)
{
- if (beans.contains(bean))
+ synchronized (bean)
{
+ if (beans.contains(bean))
+ {
+ return;
+ }
+ resolver.clear();
+ beans.add(bean);
+ registerBeanNamespace(bean);
+ for (BeanManagerImpl childActivity : childActivities)
+ {
+ childActivity.addBean(bean);
+ }
return;
}
- resolver.clear();
- beans.add(bean);
- registerBeanNamespace(bean);
- for (BeanManagerImpl childActivity : childActivities)
- {
- childActivity.addBean(bean);
- }
- return;
}
public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings)
@@ -501,37 +504,21 @@
}
}
}
-
- /**
- * Wraps a collection of beans into a thread safe list. Since this overwrites
- * any existing list of beans in the manager, this should only be done on
- * startup and other controlled situations. Also maps the beans by
- * implementation class. For internal use.
- *
- * @param beans The set of beans to add
- * @return A reference to the manager
- */
- // TODO Build maps in the deployer :-)
- public void setBeans(Set<RIBean<?>> beans)
+
+ public void addRIBean(RIBean<?> bean)
{
- synchronized (beans)
+ if (bean instanceof NewEnterpriseBean)
{
- for (RIBean<?> bean : beans)
- {
- if (bean instanceof NewEnterpriseBean)
- {
- newEnterpriseBeans.put(bean.getType(), (EnterpriseBean<?>) bean);
- }
- if (bean instanceof DecoratorBean)
- {
- decorators.add((DecoratorBean<?>) bean);
- }
- riBeans.put(bean.getId(), bean);
- registerBeanNamespace(bean);
- this.beans.add(bean);
- }
- resolver.clear();
+ newEnterpriseBeans.put(bean.getType(), (EnterpriseBean<?>) bean);
}
+ if (bean instanceof DecoratorBean)
+ {
+ decorators.add((DecoratorBean<?>) bean);
+ }
+ riBeans.put(bean.getId(), bean);
+ registerBeanNamespace(bean);
+ this.beans.add(bean);
+ resolver.clear();
}
protected void registerBeanNamespace(Bean<?> bean)
@@ -829,6 +816,12 @@
return new ArrayList(decoratorResolver.get(ResolvableFactory.of(types, bindings)));
}
+ public List<Decorator<?>> resolveDecorators(Set<Type> types, Set<Annotation> bindings)
+ {
+ // TODO Fix this cast and make the resolver return a list
+ return new ArrayList(decoratorResolver.get(ResolvableFactory.of(types, bindings)));
+ }
+
public List<Decorator<?>> resolveDecorators(Bean<?> bean)
{
throw new UnsupportedOperationException();
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanValidator.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -165,7 +165,7 @@
{
if (!decoratorBeanClasses.contains(clazz))
{
- throw new DeploymentException("Enabled decorator " + clazz + " is not the bean class of at least one decorator (detected decorators " + decoratorBeanClasses + ")");
+ throw new DeploymentException("Enabled decorator class " + clazz + " is not the bean class of at least one decorator bean (detected decorator beans " + decoratorBeanClasses + ")");
}
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -17,7 +17,9 @@
package org.jboss.webbeans.bean;
import java.lang.annotation.Annotation;
+import java.util.Collections;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
import javax.enterprise.context.Dependent;
@@ -29,6 +31,7 @@
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.deployment.DeploymentType;
import javax.enterprise.inject.deployment.Production;
+import javax.enterprise.inject.spi.Decorator;
import javax.event.Observes;
import org.jboss.webbeans.BeanManagerImpl;
@@ -65,6 +68,8 @@
private Set<MethodInjectionPoint<?>> initializerMethods;
private Set<String> dependencies;
+ private List<Decorator<?>> decoratorStack;
+
private final String id;
/**
@@ -90,7 +95,23 @@
super.initialize(environment);
checkScopeAllowed();
checkBeanImplementation();
+ initDecoratorStack();
}
+
+ protected void initDecoratorStack()
+ {
+ this.decoratorStack = getManager().resolveDecorators(getTypes(), getBindings());
+ }
+
+ public boolean hasDecorators()
+ {
+ return this.decoratorStack != null && this.decoratorStack.size() > 0;
+ }
+
+ protected List<Decorator<?>> getDecoratorStack()
+ {
+ return Collections.unmodifiableList(decoratorStack);
+ }
/**
* Injects bound fields
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -120,13 +120,15 @@
protected void initDelegateBindings()
{
- this.delegateBindings = this.decorates.getBindings();
+ this.delegateBindings = new HashSet<Annotation>();
+ this.delegateBindings.addAll(this.decorates.getBindings());
}
protected void initDelegateType()
{
this.delegateType = this.decorates.getBaseType();
- this.delegateTypes = this.decorates.getTypeClosure();
+ this.delegateTypes = new HashSet<Type>();
+ delegateTypes.add(delegateType);
}
protected void checkDelegateType()
@@ -186,5 +188,11 @@
{
return delegateTypes;
}
+
+ @Override
+ protected void initDecoratorStack()
+ {
+ // No-op, decorators can't have decorators
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -24,6 +24,7 @@
import javax.annotation.PreDestroy;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.Initializer;
+import javax.enterprise.inject.spi.Decorator;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
@@ -350,6 +351,32 @@
{
throw new DefinitionException("Simple bean declaring a passivating scope must have a serializable implementation class " + toString());
}
+ if (hasDecorators())
+ {
+ if (getAnnotatedItem().isFinal())
+ {
+ throw new DefinitionException("Bean class which has decorators cannot be declared final " + this);
+ }
+ for (Decorator<?> decorator : getDecoratorStack())
+ {
+ if (decorator instanceof DecoratorBean)
+ {
+ DecoratorBean<?> decoratorBean = (DecoratorBean<?>) decorator;
+ for (WBMethod<?> decoratorMethod : decoratorBean.getAnnotatedItem().getMethods())
+ {
+ WBMethod<?> method = getAnnotatedItem().getMethod(decoratorMethod.getSignature());
+ if (method != null && !method.isStatic() && !method.isPrivate() && method.isFinal())
+ {
+ throw new DefinitionException("Decorated bean method " + method + " (decorated by "+ decoratorMethod + ") cannot be declarted final");
+ }
+ }
+ }
+ else
+ {
+ throw new IllegalStateException("Can only operate on container provided decorators " + decorator);
+ }
+ }
+ }
}
@Override
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployer.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -143,12 +143,20 @@
public BeanDeployer deploy()
{
Set<RIBean<?>> beans = environment.getBeans();
+ // ensure that all disposal methods are initialized before initializing
+ // the rest of the beans
+ for (DecoratorBean<?> bean : environment.getDecorators())
+ {
+ bean.initialize(environment);
+ manager.addRIBean(bean);
+ log.debug("Bean: " + bean);
+ }
for (RIBean<?> bean : beans)
{
bean.initialize(environment);
+ manager.addRIBean(bean);
log.debug("Bean: " + bean);
}
- manager.setBeans(beans);
for (ObserverImpl<?> observer : environment.getObservers())
{
observer.initialize();
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/BeanDeployerEnvironment.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -28,6 +28,7 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.bean.AbstractClassBean;
+import org.jboss.webbeans.bean.DecoratorBean;
import org.jboss.webbeans.bean.DisposalMethodBean;
import org.jboss.webbeans.bean.NewBean;
import org.jboss.webbeans.bean.ProducerMethodBean;
@@ -50,6 +51,7 @@
private final Set<ObserverImpl<?>> observers;
private final List<DisposalMethodBean<?>> allDisposalBeans;
private final Set<DisposalMethodBean<?>> resolvedDisposalBeans;
+ private final Set<DecoratorBean<?>> decorators;
private final EjbDescriptorCache ejbDescriptors;
private final Resolver disposalMethodResolver;
private final BeanManagerImpl manager;
@@ -62,6 +64,7 @@
this.allDisposalBeans = new ArrayList<DisposalMethodBean<?>>();
this.resolvedDisposalBeans = new HashSet<DisposalMethodBean<?>>();
this.beans = new HashSet<RIBean<?>>();
+ this.decorators = new HashSet<DecoratorBean<?>>();
this.observers = new HashSet<ObserverImpl<?>>();
this.ejbDescriptors = ejbDescriptors;
this.disposalMethodResolver = new Resolver(manager, allDisposalBeans);
@@ -113,7 +116,6 @@
public void addBean(RIBean<?> value)
{
-
if (value instanceof AbstractClassBean && !(value instanceof NewBean))
{
AbstractClassBean<?> bean = (AbstractClassBean<?>) value;
@@ -130,12 +132,21 @@
disposalMethodBeanMap.put(bean.getAnnotatedItem(), bean);
}
beans.add(value);
+ if (value instanceof DecoratorBean)
+ {
+ decorators.add((DecoratorBean<?>) value);
+ }
}
public Set<RIBean<?>> getBeans()
{
return Collections.unmodifiableSet(beans);
}
+
+ public Set<DecoratorBean<?>> getDecorators()
+ {
+ return Collections.unmodifiableSet(decorators);
+ }
public Set<ObserverImpl<?>> getObservers()
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/DecoratorResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/DecoratorResolver.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/DecoratorResolver.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -16,8 +16,6 @@
*/
package org.jboss.webbeans.injection.resolution;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
@@ -27,6 +25,8 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.bean.DecoratorBean;
+import org.jboss.webbeans.util.Beans;
+import org.jboss.webbeans.util.Reflections;
/**
* @author pmuir
@@ -46,23 +46,13 @@
if (bean instanceof DecoratorBean)
{
DecoratorBean<?> decoratorBean = (DecoratorBean<?>) bean;
- return resolvable.matches(getBeanTypes(decoratorBean), getBeanBindings(decoratorBean)) && getManager().getEnabledDecoratorClasses().contains(decoratorBean.getType());
+ return Reflections.isAssignableFrom(decoratorBean.getDelegateTypes(), resolvable.getTypeClosure()) && Beans.containsAllBindings(decoratorBean.getDelegateBindings(), resolvable.getBindings(), getManager()) && getManager().getEnabledDecoratorClasses().contains(decoratorBean.getType());
}
else
{
throw new IllegalStateException("Unable to process non container generated decorator!");
}
}
-
- private Set<Annotation> getBeanBindings(DecoratorBean<?> bean)
- {
- return bean.getDelegateBindings();
- }
-
- private Set<Type> getBeanTypes(DecoratorBean<?> bean)
- {
- return bean.getDelegateTypes();
- }
@Override
protected Set<Bean<?>> sortBeans(Set<Bean<?>> matchedBeans)
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableFactory.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableFactory.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -7,6 +7,7 @@
import java.util.Set;
import org.jboss.webbeans.introspector.WBAnnotated;
+import org.jboss.webbeans.literal.CurrentLiteral;
import org.jboss.webbeans.util.Reflections;
public class ResolvableFactory
@@ -48,6 +49,10 @@
public ResolvableImpl(Set<Annotation> bindings, Set<Type> typeClosure)
{
this.bindings = bindings;
+ if (bindings.size() == 0)
+ {
+ this.bindings.add(new CurrentLiteral());
+ }
this.annotationTypes = new HashSet<Class<? extends Annotation>>();
this.typeClosure = typeClosure;
for (Annotation annotation : bindings)
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableWBClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableWBClass.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableWBClass.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -174,6 +174,11 @@
{
throw new UnsupportedOperationException();
}
+
+ public boolean isPrivate()
+ {
+ throw new UnsupportedOperationException();
+ }
public boolean isStatic()
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -102,6 +102,11 @@
{
return delegate().isPublic();
}
+
+ public boolean isPrivate()
+ {
+ return delegate().isPrivate();
+ }
protected abstract WBAnnotated<T, S> delegate();
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBClass.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBClass.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -49,6 +49,11 @@
{
return delegate().getConstructors();
}
+
+ public Set<WBMethod<?>> getMethods()
+ {
+ return delegate().getMethods();
+ }
public Set<WBField<?>> getDeclaredAnnotatedFields(Class<? extends Annotation> annotationType)
{
@@ -80,6 +85,11 @@
{
return delegate().getMethod(method);
}
+
+ public <M> WBMethod<M> getMethod(MethodSignature signature)
+ {
+ return delegate().getMethod(signature);
+ }
public Set<WBMethod<?>> getMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -172,6 +172,8 @@
* @return if public, returns true
*/
public boolean isPublic();
+
+ public boolean isPrivate();
/**
* Gets the name of this AnnotatedItem
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -35,6 +35,13 @@
* @return A set of abstracted fields
*/
public Set<WBField<?>> getFields();
+
+ /**
+ * Gets all fields on the type
+ *
+ * @return A set of abstracted fields
+ */
+ public Set<WBMethod<?>> getMethods();
/**
* Get a field by name
@@ -144,6 +151,15 @@
* @return the method, or null if it doesn't exist
*/
public <M> WBMethod<M> getDeclaredMethod(MethodSignature signature, WBClass<M> expectedReturnType);
+
+ /**
+ * Get a method by name
+ *
+ * @param <M> the expected return type
+ * @param signature the name of the method
+ * @return the method, or null if it doesn't exist
+ */
+ public <M> WBMethod<M> getMethod(MethodSignature signature);
// TODO Replace with AnnotatedMethod variant
@Deprecated
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBMember.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBMember.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBMember.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -50,6 +50,8 @@
private String toString;
private final boolean _public;
+
+ private final boolean _private;
/**
* Constructor
@@ -61,6 +63,7 @@
super(annotatedItemHelper, rawType, type);
name = member.getName();
_public = Modifier.isPublic(member.getModifiers());
+ _private = Modifier.isPrivate(member.getModifiers());
}
/**
@@ -96,6 +99,11 @@
{
return _public;
}
+
+ public boolean isPrivate()
+ {
+ return _private;
+ }
/**
* Gets the current value of the member
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBType.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBType.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBType.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -47,6 +47,7 @@
// Cached string representation
private String toString;
private final boolean _public;
+ private final boolean _private;
/**
* Constructor
@@ -67,6 +68,7 @@
this.superclass = null;
}
this._public = Modifier.isFinal(rawType.getModifiers());
+ _private = Modifier.isPrivate(rawType.getModifiers());
}
/**
@@ -124,6 +126,11 @@
{
return getDelegate().equals(clazz);
}
+
+ public boolean isPrivate()
+ {
+ return _private;
+ }
/**
* Gets a string representation of the type
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/MethodSignatureImpl.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -70,7 +70,7 @@
{
int hashCode = 17;
hashCode += getMethodName().hashCode() * 5;
- hashCode += getParameterTypes().hashCode() * 7;
+ hashCode += Arrays.hashCode(getParameterTypes()) * 7;
return hashCode;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -74,6 +74,7 @@
// The set of abstracted methods
private final Set<WBMethod<?>> methods;
private final Map<MethodSignature, WBMethod<?>> declaredMethodsBySignature;
+ private final Map<MethodSignature, WBMethod<?>> methodsBySignature;
// The map from annotation type to abstracted method with annotation
private final SetMultiMap<Class<? extends Annotation>, WBMethod<?>> annotatedMethods;
// The map from annotation type to method with a parameter with annotation
@@ -202,6 +203,7 @@
this.declaredAnnotatedMethods = new SetHashMultiMap<Class<? extends Annotation>, WBMethod<?>>();
this.declaredMethodsByAnnotatedParameters = new SetHashMultiMap<Class<? extends Annotation>, WBMethod<?>>();
this.declaredMethodsBySignature = new HashMap<MethodSignature, WBMethod<?>>();
+ this.methodsBySignature = new HashMap<MethodSignature, WBMethod<?>>();
for (Class<?> c = rawType; c != Object.class && c != null; c = c.getSuperclass())
{
for (Method method : c.getDeclaredMethods())
@@ -213,6 +215,7 @@
WBMethod<?> annotatedMethod = WBMethodImpl.of(method, this);
this.methods.add(annotatedMethod);
+ this.methodsBySignature.put(annotatedMethod.getSignature(), annotatedMethod);
if (c == rawType)
{
this.declaredMethods.add(annotatedMethod);
@@ -424,6 +427,11 @@
return null;
}
+ public Set<WBMethod<?>> getMethods()
+ {
+ return Collections.unmodifiableSet(methods);
+ }
+
public WBMethod<?> getDeclaredMethod(Method method)
{
// TODO Should be cached
@@ -443,6 +451,12 @@
return (WBMethod<M>) declaredMethodsBySignature.get(signature);
}
+ @SuppressWarnings("unchecked")
+ public <M> WBMethod<M> getMethod(MethodSignature signature)
+ {
+ return (WBMethod<M>) methodsBySignature.get(signature);
+ }
+
/**
* Gets a string representation of the class
*
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBParameterImpl.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -41,6 +41,7 @@
// The static state
private final boolean _static = false;
private final boolean _public = false;
+ private final boolean _private = false;
private final WBMember<?, ?> declaringMember;
// Cached string representation
@@ -103,6 +104,11 @@
{
return _public;
}
+
+ public boolean isPrivate()
+ {
+ return _private;
+ }
/**
* Gets the current value
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -53,7 +53,7 @@
public void testDecoratorIsManagedBean()
{
- List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(Logger.TYPES);
+ List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(MockLogger.TYPES);
assert decorators.size() == 1;
Set<Bean<?>> beans = getCurrentManager().getBeans(TimestampLogger.class);
assert beans.size() == 1;
@@ -68,7 +68,7 @@
})
public void testDecoratedTypes()
{
- List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(Foo.TYPES);
+ List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(FooBar.TYPES);
assert decorators.size() == 1;
assert decorators.get(0).getDecoratedTypes().size() == 3;
assert decorators.get(0).getDecoratedTypes().contains(Foo.class);
@@ -92,15 +92,15 @@
assert decorator.getInjectionPoints().iterator().next().getAnnotated().isAnnotationPresent(Decorates.class);
assert decorator.getDelegateType().equals(Logger.class);
assert decorator.getDelegateBindings().size() == 1;
- assert decorator.getDelegateBindings().iterator().next().annotationType().equals(Current.class);
+ assert annotationSetMatches(decorator.getDelegateBindings(), Current.class);
}
@Test
@SpecAssertion(section="8.1.3", id="b")
public void testDecoratorDoesNotImplementDelegateType()
{
- List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(Baz.TYPES);
- assert decorators.size() == 3;
+ List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(Bazt.TYPES);
+ assert decorators.size() == 2;
}
@Test
@@ -110,11 +110,11 @@
})
public void testDecoratorOrdering()
{
- List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(Baz.TYPES);
+ List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(Bazt.TYPES);
+ assert decorators.size() == 2;
assert decorators.get(0).getTypes().contains(BazDecorator.class);
assert decorators.get(1).getTypes().contains(BazDecorator1.class);
- assert decorators.get(2).getTypes().contains(FooDecorator.class);
- assert decorators.size() == 3;
+
}
@Test
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/FinalBeanClassTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/FinalBeanClassTest.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/FinalBeanClassTest.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -34,7 +34,7 @@
public class FinalBeanClassTest extends AbstractJSR299Test
{
- @Test(groups="broken")
+ @Test
@SpecAssertion(section="8.1.2", id="d")
public void testAppliesToFinalManagedBeanClass()
{
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/FinalBeanMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/FinalBeanMethodTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/FinalBeanMethodTest.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.definition.broken.finalBeanMethod;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DefinitionError;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+/**
+ * @author pmuir
+ *
+ */
+@Artifact
+(a)ExpectedDeploymentException(DefinitionError.class)
+@BeansXml("beans.xml")
+public class FinalBeanMethodTest extends AbstractJSR299Test
+{
+
+ @Test
+ @SpecAssertion(section="8.1.2", id="e")
+ public void testAppliesToFinalMethodOnManagedBeanClass()
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/FinalBeanMethodTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/Logger.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/Logger.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/Logger.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.definition.broken.finalBeanMethod;
+
+
+/**
+ * @author pmuir
+ *
+ */
+public interface Logger
+{
+
+ public void log(String string);
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/Logger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/MockLogger.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/MockLogger.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/MockLogger.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.definition.broken.finalBeanMethod;
+
+/**
+ * @author pmuir
+ *
+ */
+public class MockLogger implements Logger
+{
+
+ private static String log = "";
+
+ public final void log(String string)
+ {
+ log += string;
+ }
+
+ /**
+ * @return the log
+ */
+ public static String getLog()
+ {
+ return log;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/MockLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/TimestampLogger.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/TimestampLogger.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/TimestampLogger.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.decorators.definition.broken.finalBeanMethod;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+
+/**
+ * @author pmuir
+ *
+ */
+@Decorator
+public abstract class TimestampLogger implements Logger
+{
+
+ @Decorates private Logger logger;
+
+ public void log(String string)
+ {
+ logger.log(string);
+ }
+
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/TimestampLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/tooManyDecoratorsElements/TooManyDecoratorElementsTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/tooManyDecoratorsElements/TooManyDecoratorElementsTest.java 2009-06-24 23:08:02 UTC (rev 2887)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/broken/tooManyDecoratorsElements/TooManyDecoratorElementsTest.java 2009-06-24 23:28:49 UTC (rev 2888)
@@ -43,8 +43,8 @@
public class TooManyDecoratorElementsTest extends AbstractJSR299Test
{
- @Test(groups="broken")
- @SpecAssertion(section="8.2", id="d")
+ @Test
+ @SpecAssertion(section="8.2", id="e")
public void testTooManyDecoratorElements()
{
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/beans.xml 2009-06-24 23:28:49 UTC (rev 2888)
@@ -0,0 +1,5 @@
+<beans>
+ <decorators>
+ <class>org.jboss.jsr299.tck.tests.decorators.definition.broken.finalBeanMethod.TimestampLogger</class>
+ </decorators>
+</beans>
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months
[webbeans-commits] Webbeans SVN: r2887 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-06-24 19:08:02 -0400 (Wed, 24 Jun 2009)
New Revision: 2887
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable/Egg.java
Log:
Make TCK compile
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable/Egg.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable/Egg.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable/Egg.java 2009-06-24 23:08:02 UTC (rev 2887)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.event.broken.inject.withTypeVariable;
+
+class Egg
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/inject/withTypeVariable/Egg.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months