Author: dan.j.allen
Date: 2009-07-17 18:13:08 -0400 (Fri, 17 Jul 2009)
New Revision: 3085
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/British.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/Cow.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/CowProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/MaarianHaminaLocal_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/Maarianhamina_Broken.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/integration/PassivatingContextIntegrationTest.java
Log:
break out test for IllegalProductException when attempt to inject non-serializable result
of producer method into passivation capable bean
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/British.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/British.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/British.java 2009-07-17
22:13:08 UTC (rev 3085)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken11;
+
+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.inject.BindingType;
+
+
+@BindingType
+@Target({TYPE, METHOD, FIELD})
+@Retention(RUNTIME)
+@interface British
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/Cow.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/Cow.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/Cow.java 2009-07-17
22:13:08 UTC (rev 3085)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken11;
+
+class Cow
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/CowProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/CowProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/CowProducer.java 2009-07-17
22:13:08 UTC (rev 3085)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken11;
+
+import javax.enterprise.inject.Produces;
+
+public class CowProducer
+{
+
+ @Produces @British
+ public Cow produce()
+ {
+ return new Cow();
+ }
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java 2009-07-17
22:13:08 UTC (rev 3085)
@@ -0,0 +1,26 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken11;
+
+import javax.enterprise.inject.IllegalProductException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+@Artifact
+@IntegrationTest
+(a)Packaging(PackagingType.EAR)
+(a)ExpectedDeploymentException(IllegalProductException.class)
+public class EnterpriseBeanWithIllegalDependencyTest extends AbstractJSR299Test
+{
+ @Test(groups = { "contexts", "passivation",
"integration"})
+ @SpecAssertion(section = "6.6.4", id = "f")
+ public void
testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails()
+ {
+ assert false;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/MaarianHaminaLocal_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/MaarianHaminaLocal_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/MaarianHaminaLocal_Broken.java 2009-07-17
22:13:08 UTC (rev 3085)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken11;
+
+import javax.ejb.Local;
+
+@Local
+public interface MaarianHaminaLocal_Broken
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/Maarianhamina_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/Maarianhamina_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/Maarianhamina_Broken.java 2009-07-17
22:13:08 UTC (rev 3085)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken11;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+@Stateful
+public class Maarianhamina_Broken implements MaarianHaminaLocal_Broken
+{
+ @SuppressWarnings("unused")
+ @British Cow cow;
+
+ @Remove
+ public void bye() {
+ }
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/integration/PassivatingContextIntegrationTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/integration/PassivatingContextIntegrationTest.java 2009-07-17
22:12:13 UTC (rev 3084)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/integration/PassivatingContextIntegrationTest.java 2009-07-17
22:13:08 UTC (rev 3085)
@@ -25,28 +25,6 @@
assert false;
}
- @Test(groups = { "contexts", "passivation",
"integration"})
- @SpecAssertion(section = "8.4", id = "p")
- public void
testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails()
throws SecurityException, NoSuchMethodException
- {
- try
- {
- getInstanceByType(MaarianHaminaLocal_Broken.class);
- }
- catch (Throwable e)
- {
- while (!e.getClass().equals(Throwable.class))
- {
- if (e.getClass().equals(IllegalProductException.class))
- {
- return;
- }
- e = e.getCause();
- }
- assert false;
- }
- }
-
/**
* the Web Bean is an EJB stateful session bean, and it is passivated by the
* EJB container.
Show replies by date