Author: pete.muir(a)jboss.org
Date: 2010-01-22 11:37:17 -0500 (Fri, 22 Jan 2010)
New Revision: 5587
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ContainerEventTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessAnnotatedTypeObserver.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessBeanObserver.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessInjectionTargetObserver.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodEventTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodObserver.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/processBean/ProcessBeanObserver.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerProcessor.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java
Log:
port r5413 to trunk
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ContainerEventTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ContainerEventTest.java 2010-01-22
16:35:44 UTC (rev 5586)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ContainerEventTest.java 2010-01-22
16:37:17 UTC (rev 5587)
@@ -181,4 +181,5 @@
assert type.getMethods().size() == 1;
assert type.getMethods().iterator().next().isAnnotationPresent(Produces.class);
}
+
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessAnnotatedTypeObserver.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessAnnotatedTypeObserver.java 2010-01-22
16:35:44 UTC (rev 5586)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessAnnotatedTypeObserver.java 2010-01-22
16:37:17 UTC (rev 5587)
@@ -17,6 +17,7 @@
package org.jboss.jsr299.tck.tests.extensions.container.event;
import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.BeforeShutdown;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.ProcessAnnotatedType;
@@ -27,6 +28,14 @@
private static ProcessAnnotatedType<SheepInterceptor>
sessionBeanInterceptorEvent = null;
private static ProcessAnnotatedType<Farm> managedBeanEvent = null;
+ public void cleanup(@Observes BeforeShutdown shutdown)
+ {
+ statefulSessionBeanEvent = null;
+ statelessSessionBeanEvent = null;
+ sessionBeanInterceptorEvent = null;
+ managedBeanEvent = null;
+ }
+
public void observeStatelessSessionBean(@Observes ProcessAnnotatedType<Sheep>
event) {
statelessSessionBeanEvent = event;
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessBeanObserver.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessBeanObserver.java 2010-01-22
16:35:44 UTC (rev 5586)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessBeanObserver.java 2010-01-22
16:37:17 UTC (rev 5587)
@@ -17,6 +17,7 @@
package org.jboss.jsr299.tck.tests.extensions.container.event;
import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.BeforeShutdown;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.ProcessManagedBean;
import javax.enterprise.inject.spi.ProcessProducerField;
@@ -31,6 +32,15 @@
private static ProcessProducerField<Milk, Farm> processProducerFieldEvent =
null;
private static ProcessProducerMethod<Cheese, Farm> processProducerMethodEvent =
null;
+ public void cleanup(@Observes BeforeShutdown shutdown)
+ {
+ processManagedBeanEvent = null;
+ processStatefulSessionBeanEvent = null;
+ processStatelessSessionBeanEvent = null;
+ processProducerFieldEvent = null;
+ processProducerMethodEvent = null;
+ }
+
public void observeProcessManagedBean(@Observes ProcessManagedBean<Farm> event)
{
processManagedBeanEvent = event;
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessInjectionTargetObserver.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessInjectionTargetObserver.java 2010-01-22
16:35:44 UTC (rev 5586)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/container/event/ProcessInjectionTargetObserver.java 2010-01-22
16:37:17 UTC (rev 5587)
@@ -17,6 +17,7 @@
package org.jboss.jsr299.tck.tests.extensions.container.event;
import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.BeforeShutdown;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.ProcessInjectionTarget;
@@ -33,6 +34,15 @@
private static int event3Observed = 0;
private static int event4Observed = 0;
private static int event5Observed = 0;
+
+ public void cleanup(@Observes BeforeShutdown shutdown)
+ {
+ statefulSessionBeanEvent = null;
+ statelessSessionBeanEvent = null;
+ sessionBeanInterceptorEvent = null;
+ managedBeanEvent = null;
+ eventWithTypeVariable = null;
+ }
public void observeStatelessSessionBean(@Observes ProcessInjectionTarget<Sheep>
event) {
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodEventTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodEventTest.java 2010-01-22
16:35:44 UTC (rev 5586)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodEventTest.java 2010-01-22
16:37:17 UTC (rev 5587)
@@ -60,4 +60,5 @@
{
assert
ProcessObserverMethodObserver.getObserverMethod().getObservedType().equals(EventA.class);
}
+
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodObserver.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodObserver.java 2010-01-22
16:35:44 UTC (rev 5586)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodObserver.java 2010-01-22
16:37:17 UTC (rev 5587)
@@ -21,6 +21,7 @@
import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.BeforeShutdown;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.ObserverMethod;
import javax.enterprise.inject.spi.ProcessObserverMethod;
@@ -31,6 +32,12 @@
private static AnnotatedMethod<?> annotatedMethod;
private static ObserverMethod<?> observerMethod;
+ public void cleanup(@Observes BeforeShutdown shutdown)
+ {
+ annotatedMethod = null;
+ observerMethod = null;
+ }
+
public void observeObserverMethodForEventA(@Observes ProcessObserverMethod<EventA,
EventAObserver> event)
{
eventTypes.add(event.getObserverMethod().getObservedType());
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/processBean/ProcessBeanObserver.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/processBean/ProcessBeanObserver.java 2010-01-22
16:35:44 UTC (rev 5586)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/processBean/ProcessBeanObserver.java 2010-01-22
16:37:17 UTC (rev 5587)
@@ -17,6 +17,7 @@
package org.jboss.jsr299.tck.tests.extensions.processBean;
import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.BeforeShutdown;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.ProcessBean;
import javax.enterprise.inject.spi.ProcessManagedBean;
@@ -36,6 +37,14 @@
private static int elephantProcessBeanCount;
private static ProcessProducerField<ChickenHutch, Chicken>
chickenProcessProducerField;
private static int chickenHutchProcessBeanCount;
+
+ public void cleanup(@Observes BeforeShutdown shutdown)
+ {
+ catProcessManagedBean = null;
+ cowProcessProducerMethod = null;
+ elephantProcessSessionBean = null;
+ chickenProcessProducerField = null;
+ }
public void observeCatManagedBean(@Observes ProcessManagedBean<Cat> event)
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerProcessor.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerProcessor.java 2010-01-22
16:35:44 UTC (rev 5586)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerProcessor.java 2010-01-22
16:37:17 UTC (rev 5587)
@@ -23,6 +23,7 @@
import javax.enterprise.inject.spi.AnnotatedField;
import javax.enterprise.inject.spi.AnnotatedMethod;
import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.BeforeShutdown;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.InjectionTarget;
@@ -38,6 +39,15 @@
private static InjectionTarget<Dog> dogInjectionTarget;
private static AnnotatedType<Dog> dogAnnotatedType;
private static boolean overriddenCowProducerCalled;
+
+ public void cleanup(@Observes BeforeShutdown shutdown)
+ {
+ catInjectionTarget = null;
+ noisyDogProducer = null;
+ quietDogProducer = null;
+ dogInjectionTarget = null;
+ dogAnnotatedType = null;
+ }
public void processDogProducerProducer(@Observes ProcessProducer<DogProducer,
Dog> producerEvent)
{
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java 2010-01-22
16:35:44 UTC (rev 5586)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java 2010-01-22
16:37:17 UTC (rev 5587)
@@ -266,4 +266,5 @@
assert ProducerProcessor.getDogAnnotatedType() != null;
assert ProducerProcessor.getDogAnnotatedType().getBaseType().equals(Dog.class);
}
+
}
Show replies by date