Author: pete.muir(a)jboss.org
Date: 2009-07-22 12:51:41 -0400 (Wed, 22 Jul 2009)
New Revision: 3139
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Fix up passivation assertions
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-22
16:23:19 UTC (rev 3138)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-22
16:51:41 UTC (rev 3139)
@@ -23,7 +23,7 @@
* @author Nicklas Karlsson
* @author David Allen
*
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
@BeansXml("beans.xml")
@@ -32,7 +32,7 @@
{
@Test(groups = { "contexts", "passivation", "review" })
- @SpecAssertion(section = "6.6.1", id = "b")
+ @SpecAssertion(section = "6.6.1", id = "ba")
public void testSimpleWebBeanWithSerializableImplementationClassOK()
{
Set<Bean<Jyvaskyla>> beans = getBeans(Jyvaskyla.class);
@@ -128,14 +128,6 @@
{
getInstanceByType(HelsinkiNonSerializable.class).ping();
}
-
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "6.6.1", id = "b")
- public void testPassivationCapableBean()
- {
- assert !isSerializable(getBeans(Sysma.class).iterator().next().getBeanClass());
- assert isSerializable(getBeans(Hyvinkaa.class).iterator().next().getBeanClass());
- }
public static boolean isSerializable(Class<?> clazz)
{
Modified:
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 2009-07-22
16:23:19 UTC (rev 3138)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken11/EnterpriseBeanWithIllegalDependencyTest.java 2009-07-22
16:51:41 UTC (rev 3139)
@@ -18,7 +18,7 @@
public class EnterpriseBeanWithIllegalDependencyTest extends AbstractJSR299Test
{
@Test(groups = { "contexts", "passivation",
"integration"})
- @SpecAssertion(section = "6.6.4", id = "f")
+ @SpecAssertion(section = "6.6.4", id = "fa")
public void
testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 16:23:19 UTC (rev 3138)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-22 16:51:41 UTC (rev 3139)
@@ -2552,21 +2552,38 @@
</section>
<section id="6.6.1" title="Passivation capable beans">
- <assertion id="a">
+ <assertion id="a" testable="false">
<text>As defined by the EJB specification, all stateful session beans are
passivation capable. Stateless and singleton session beans are not passivation
capable.</text>
+ <note>Defined by EJB spec</note>
</assertion>
- <assertion id="b">
- <text>A managed bean is passivation capable if and only if the bean class is
serializable and all interceptors and decorators of the bean are
serializable.</text>
+ <assertion id="ba">
+ <text>A managed bean is passivation capable if and only if the bean class is
_serializable_ and all interceptors and decorators of the bean are
serializable.</text>
</assertion>
+
+ <assertion id="bb">
+ <text>A managed bean is passivation capable if and only if the bean class is
serializable and all _interceptors_ and decorators of the bean are
serializable.</text>
+ </assertion>
+
+ <assertion id="bc">
+ <text>A managed bean is passivation capable if and only if the bean class is
serializable and all interceptors and _decorators_ of the bean are
serializable.</text>
+ </assertion>
- <assertion id="c">
- <text>A producer method is passivation capable if and only if it never
returns a value which is not passivation capable at runtime. A producer method with a
return type that implements or extends serializable is passivation capable. A producer
method with a return type that is declared final and does not implement |Serializable| is
not passivation capable.</text>
+ <assertion id="ca">
+ <text>A producer method is passivation capable if and only if it never
returns a value which is not passivation capable at runtime. _A producer method with a
return type that implements or extends serializable is passivation capable_. A producer
method with a return type that is declared final and does not implement |Serializable| is
not passivation capable.</text>
</assertion>
+
+ <assertion id="cb">
+ <text>A producer method is passivation capable if and only if it never
returns a value which is not passivation capable at runtime. A producer method with a
return type that implements or extends serializable is passivation capable. _A producer
method with a return type that is declared final and does not implement |Serializable| is
not passivation capable._</text>
+ </assertion>
- <assertion id="d">
- <text>A producer field is passivation capable if and only if it never refers
to a value which is not passivation capable at runtime. A producer field with a type that
implements or extends |Serializable| is passivation capable. A producer field with a type
that is declared |final| and does not implement |Serializable| is not passivation
capable.</text>
+ <assertion id="da">
+ <text>A producer field is passivation capable if and only if it never refers
to a value which is not passivation capable at runtime. _A producer field with a type that
implements or extends |Serializable| is passivation capable._ A producer field with a type
that is declared |final| and does not implement |Serializable| is not passivation
capable.</text>
</assertion>
+
+ <assertion id="db">
+ <text>A producer field is passivation capable if and only if it never refers
to a value which is not passivation capable at runtime. A producer field with a type that
implements or extends |Serializable| is passivation capable. _A producer field with a type
that is declared |final| and does not implement |Serializable| is not passivation
capable._</text>
+ </assertion>
<assertion id="ea">
<text>A custom implementation of Bean is passivation capable if it implements
the interface |PassivationCapable|.</text>
@@ -2577,8 +2594,13 @@
</assertion>
<assertion id="g">
- <text>The |getId()| method must return a value that uniquely identifies the
instance of |Bean| or |Contextual|. It is recommended that the string contain the package
name of the class that implements |Bean| or |Contextual|.</text>
+ <text>The |getId()| method must return a value that uniquely identifies the
instance of |Bean| or |Contextual|.</text>
</assertion>
+
+ <assertion id="h" testable="false">
+ <text>The |getId()| ~method must return a value that uniquely identifies the
instance of |Bean| or |Contextual|. It~ is recommended that the string contain the
package name of the class that implements |Bean| or |Contextual|.</text>
+ <note>Recommendation only</note>
+ </assertion>
</section>
<section id="6.6.2" title="Passivation capable
dependencies">
@@ -2663,9 +2685,29 @@
<text>If a stateful session bean has a non-transient~ injected field, bean
constructor parameter or~ initializer method parameter that does not resolve to a
passivation capable dependency, then the container automatically detects the problem and
treats it as a deployment problem, as defined in Section 12.4, "Problems detected
automatically by the container".</text>
</assertion>
- <assertion id="bd">
- <text>If a stateful session bean has an interceptor or decorator with a
non-transient injected field, bean constructor parameter or initializer method parameter
that does not resolve to a passivation capable dependency, then the container
automatically detects the problem and treats it as a deployment problem, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="bda">
+ <text>If a stateful session bean has an interceptor ~or decorator~ with a
non-transient injected field~, bean constructor parameter or initializer method parameter~
that does not resolve to a passivation capable dependency, then the container
automatically detects the problem and treats it as a deployment problem, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
</assertion>
+
+ <assertion id="bdb">
+ <text>If a stateful session bean has an interceptor ~or decorator~ with a
non-transient ~injected field,~ bean constructor parameter ~or initializer method
parameter~ that does not resolve to a passivation capable dependency, then the container
automatically detects the problem and treats it as a deployment problem, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="bdc">
+ <text>If a stateful session bean has an interceptor ~or decorator~ with a
non-transient ~injected field, bean constructor parameter or~ initializer method parameter
that does not resolve to a passivation capable dependency, then the container
automatically detects the problem and treats it as a deployment problem, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="bdd">
+ <text>If a stateful session bean has an ~interceptor or~ decorator with a
non-transient injected field~, bean constructor parameter or initializer method parameter~
that does not resolve to a passivation capable dependency, then the container
automatically detects the problem and treats it as a deployment problem, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="bde">
+ <text>If a stateful session bean has an ~interceptor or~ decorator with a
non-transient ~injected field,~ bean constructor parameter ~or initializer method
parameter~ that does not resolve to a passivation capable dependency, then the container
automatically detects the problem and treats it as a deployment problem, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="bdf">
+ <text>If a stateful session bean has an ~interceptor or~ decorator with a
non-transient ~injected field, bean constructor parameter or~ initializer method parameter
that does not resolve to a passivation capable dependency, then the container
automatically detects the problem and treats it as a deployment problem, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
<assertion id="ca">
<text>If a producer method declares a passivating scope and the container is
able to determine that it is not passivation capable by inspecting its return type~, or
has a parameter that does not resolve to a passivation capable dependency,~ then the
container automatically detects the problem and treats it as a deployment problem, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
@@ -2680,21 +2722,37 @@
"Problems detected automatically by the container".</text>
</assertion>
- <assertion id="e">
- <text>If a producer method or field which declares a passivating scope
returns an unserializable object at runtime, the container must throw an
|IllegalProductException|.</text>
+ <assertion id="ea">
+ <text>If a producer method ~or field~ which declares a passivating scope
returns an unserializable object at runtime, the container must throw an
|IllegalProductException|.</text>
</assertion>
+
+ <assertion id="eb">
+ <text>If a producer ~method or~ field which declares a passivating scope
returns an unserializable object at runtime, the container must throw an
|IllegalProductException|.</text>
+ </assertion>
- <assertion id="f">
- <text>If a producer method or field of scope |@Dependent| returns an
unserializable object for injection into an injection point that requires a passivation
capable dependency, the container must throw an |IllegalProductException|</text>
+ <assertion id="fa">
+ <text>If a producer method ~or field~ of scope |@Dependent| returns an
unserializable object for injection into an injection point that requires a passivation
capable dependency, the container must throw an |IllegalProductException|</text>
</assertion>
+
+ <assertion id="fb">
+ <text>If a producer ~method or~ field of scope |@Dependent| returns an
unserializable object for injection into an injection point that requires a passivation
capable dependency, the container must throw an |IllegalProductException|</text>
+ </assertion>
- <assertion id="g">
- <text>For a custom implementation of |Bean|, the container calls
|getInjectionPoints()| to determine the injection points, and
|InjectionPoint.isTransient()| to determine whether the injected point is a transient
field.</text>
+ <assertion id="ga">
+ <text>For a custom implementation of |Bean|, the container calls
|getInjectionPoints()| to determine the injection points~, and
|InjectionPoint.isTransient()| to determine whether the injected point is a transient
field~.</text>
</assertion>
+
+ <assertion id="gb">
+ <text>For a custom implementation of |Bean|, the container calls ~
|getInjectionPoints()| to determine the injection points, and~
|InjectionPoint.isTransient()| to determine whether the injected point is a transient
field.</text>
+ </assertion>
- <assertion id="h">
- <text>If a bean which declares a passivating scope type, or any stateful
session bean, has a decorator which is not a passivation capable dependency, the container
automatically detects the problem and treats it as a deployment problem, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="ha">
+ <text>If a bean which declares a passivating scope type~, or any stateful
session bean,~ has a decorator which is not a passivation capable dependency, the
container automatically detects the problem and treats it as a deployment problem, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
</assertion>
+
+ <assertion id="hb">
+ <text>If ~a bean which declares a passivating scope type, or~ any stateful
session bean, has a decorator which is not a passivation capable dependency, the container
automatically detects the problem and treats it as a deployment problem, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
</section>
<section id="6.7" title="Context management for built-in
scopes">