Author: shane.bryzak(a)jboss.com
Date: 2009-07-28 03:15:20 -0400 (Tue, 28 Jul 2009)
New Revision: 3300
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BrokenInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/InterceptorType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/Violation.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/ViolationProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BrokenInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/InterceptorType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/Violation.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/ViolationProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BrokenInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/InterceptorType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/Violation.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/ViolationProducer.java
Log:
added passivation tests
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBean.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBean.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBean.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import javax.enterprise.context.SessionScoped;
+
+@SessionScoped @BakedBinding
+class BakedBean
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBinding.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBinding.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBinding.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBindingType;
+
+@Inherited
+@InterceptorBindingType
+@InterceptorType
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface BakedBinding
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BrokenInterceptor.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BrokenInterceptor.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BrokenInterceptor.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import javax.enterprise.inject.Current;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor @InterceptorType
+class BrokenInterceptor
+{
+ @Current Violation violation;
+
+ @AroundInvoke
+ public Object invoke(InvocationContext ctx) throws Exception
+ {
+ return ctx.proceed();
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/InterceptorType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/InterceptorType.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/InterceptorType.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+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.interceptor.Interceptor;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@Interceptor @interface InterceptorType
+{
+
+}
\ No newline at end of file
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest
+{
+ @Test(groups = { "contexts", "passivation", "ri-broken"
})
+ @SpecAssertion(section = "6.6.4", id = "aac")
+ public void testPassivationCapableBeanWithNonPassivatingInterceptorFails()
+ {
+ assert false;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/Violation.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/Violation.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/Violation.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+class Violation
+{
+ public Violation(String foo) {}
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/ViolationProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/ViolationProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/ViolationProducer.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import javax.enterprise.inject.Produces;
+
+class ViolationProducer
+{
+ public final @Produces Violation getViolation() { return new Violation(null); }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBean.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBean.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBean.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import javax.enterprise.context.SessionScoped;
+
+@SessionScoped @BakedBinding
+class BakedBean
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBinding.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBinding.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBinding.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBindingType;
+
+@Inherited
+@InterceptorBindingType
+@InterceptorType
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface BakedBinding
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BrokenInterceptor.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BrokenInterceptor.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BrokenInterceptor.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import javax.enterprise.inject.Current;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor @InterceptorType
+class BrokenInterceptor
+{
+ public BrokenInterceptor(@Current Violation violation) {}
+
+ @AroundInvoke
+ public Object invoke(InvocationContext ctx) throws Exception
+ {
+ return ctx.proceed();
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/InterceptorType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/InterceptorType.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/InterceptorType.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+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.interceptor.Interceptor;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@Interceptor @interface InterceptorType
+{
+
+}
\ No newline at end of file
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest
+{
+ @Test(groups = { "contexts", "passivation", "ri-broken"
})
+ @SpecAssertion(section = "6.6.4", id = "aad")
+ public void testPassivationCapableBeanWithNonPassivatingInterceptorFails()
+ {
+ assert false;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/Violation.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/Violation.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/Violation.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+class Violation
+{
+ public Violation(String foo) {}
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/ViolationProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/ViolationProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/ViolationProducer.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import javax.enterprise.inject.Produces;
+
+class ViolationProducer
+{
+ public final @Produces Violation getViolation() { return new Violation(null); }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBean.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBean.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBean.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import javax.enterprise.context.SessionScoped;
+
+@SessionScoped @BakedBinding
+class BakedBean
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBinding.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBinding.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBinding.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBindingType;
+
+@Inherited
+@InterceptorBindingType
+@InterceptorType
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface BakedBinding
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BrokenInterceptor.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BrokenInterceptor.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BrokenInterceptor.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.Initializer;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor @InterceptorType
+class BrokenInterceptor
+{
+ @Initializer
+ public void init(@Current Violation violation) {}
+
+ @AroundInvoke
+ public Object invoke(InvocationContext ctx) throws Exception
+ {
+ return ctx.proceed();
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/InterceptorType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/InterceptorType.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/InterceptorType.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+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.interceptor.Interceptor;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@Interceptor @interface InterceptorType
+{
+
+}
\ No newline at end of file
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest
+{
+ @Test(groups = { "contexts", "passivation", "ri-broken"
})
+ @SpecAssertion(section = "6.6.4", id = "aae")
+ public void testPassivationCapableBeanWithNonPassivatingInterceptorFails()
+ {
+ assert false;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/Violation.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/Violation.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/Violation.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+class Violation
+{
+ public Violation(String foo) {}
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/ViolationProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/ViolationProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/ViolationProducer.java 2009-07-28
07:15:20 UTC (rev 3300)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import javax.enterprise.inject.Produces;
+
+class ViolationProducer
+{
+ public final @Produces Violation getViolation() { return new Violation(null); }
+}