Author: shane.bryzak(a)jboss.com
Date: 2009-11-09 02:52:52 -0500 (Mon, 09 Nov 2009)
New Revision: 4838
Modified:
cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
Log:
audit corrections
Modified: cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-11-09 07:50:48 UTC (rev
4837)
+++ cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-11-09 07:52:52 UTC (rev
4838)
@@ -31,6 +31,10 @@
<assertion id="g">
<text>A bean comprises of a bean implementation.</text>
</assertion>
+
+ <assertion id="h" testable="false">
+ <text>A bean may or may not be an alternative.</text>
+ </assertion>
</section>
<section id="2.1" title="Functionality provided by the container to
the bean">
@@ -100,7 +104,7 @@
<section id="2.2.2" title="Restricting the bean types of a
bean">
<group>
- <text>The bean types of a bean may be restricted by annotating the bean class
or producer method or field with the annotation @javax.enterprise.inject.BeanTypes. When a
@BeanTypes annotation is explicitly specified, only the types whose classes are explicitly
listed using the value member are bean types of the bean.</text>
+ <text>The bean types of a bean may be restricted by annotating the bean class
or producer method or field with the annotation |(a)javax.enterprise.inject.Typed|. When a
|@Typed| annotation is explicitly specified, only the types whose classes are explicitly
listed using the |value| member, together with |java.lang.Object| are bean types of the
bean.</text>
<assertion id="a">
<text>Check managed bean</text>
</assertion>
@@ -125,7 +129,7 @@
</group>
<group>
- <text>If a bean class or producer method or field specifies a |@BeanTypes|
annotation, and the value member specifies a class which does not correspond to a type in
the unrestricted set of bean types of a bean, the container automatically detects the
problem and treats it as a definition error.</text>
+ <text>If a bean class or producer method or field specifies a |@Typed|
annotation, and the |value| member specifies a class which does not correspond to a type
in the unrestricted set of bean types of a bean, the container automatically detects the
problem and treats it as a definition error.</text>
<assertion id="j">
<text>Check managed bean</text>
</assertion>
@@ -154,7 +158,7 @@
<section id="2.3.1" title="Built-in qualifier types">
<assertion id="a0">
- <text>Every bean has the built-in qualifier |@Any|, even if it does not
explicitly declare this qualifier, except for beans with the built-in qualifier |@New|
defined in Section 3.11, "Beans with the @New qualifier".</text>
+ <text>Every bean has the built-in qualifier |@Any|, even if it does not
explicitly declare this qualifier, except for the special |@New| qualified beans defined
in Section 3.12, "@New qualified beans".</text>
</assertion>
<assertion id="aa">
@@ -348,7 +352,7 @@
<section id="2.5.1" title="Declaring the bean EL name">
<group>
- <text>To specify the EL name of a bean, the |(a)javax.inject.Named| annotation
is applied to the bean class or producer method or field.</text>
+ <text>To specify the EL name of a bean, the qualifier |(a)javax.inject.Named|
is applied to the bean class or producer method or field.</text>
<assertion id="a">
<text>Test with a bean class.</text>
@@ -371,7 +375,7 @@
<section id="2.5.2" title="Default bean EL names">
<group>
- <text>A default EL name must be assigned by the container when a bean class
or producer method or field of a bean declares a |@Named| annotation and no EL name is
explicitly specified by the value member.</text>
+ <text>A default EL name must be assigned by the container when a bean class
or producer method or field of a bean declares a |@Named| annotation and no EL name is
explicitly specified by the |value| member.</text>
<assertion id="a">
<text>Test with a bean class.</text>
@@ -409,11 +413,24 @@
</section>
<section id="2.6.1" title="Declaring an alternative">
- <assertion id="a">
- <text>An alternative may be declared by annotating the bean class with the
|@Alternative| annotation.</text>
- </assertion>
<group>
+ <text>An alternative may be declared by annotating the bean class or producer
method or field with the |@Alternative| annotation.</text>
+
+ <assertion id="a">
+ <text>Test with a bean class.</text>
+ </assertion>
+
+ <assertion id="ab">
+ <text>Test with a producer method.</text>
+ </assertion>
+
+ <assertion id="ac">
+ <text>Test with a producer field.</text>
+ </assertion>
+ </group>
+
+ <group>
<text>An alternative may be declared by annotating a bean, producer method or
producer field with a stereotype that declares an |@Alternative| annotation.</text>
<assertion id="b">
@@ -735,7 +752,7 @@
<section id="3.1.4" title="Specializing a managed bean">
<group>
- <text>If a bean class of a managed bean X is annotated @Specializes, then the
bean class of X must directly extend the bean class of another managed bean Y. Then X
directly specializes Y, as defined in Section 4.3,
"Specialization".</text>
+ <text>If a bean class of a managed bean X is annotated |@Specializes|, then
the bean class of X must directly extend the bean class of another managed bean Y. Then X
directly specializes Y, as defined in Section 4.3,
"Specialization".</text>
<assertion id="aa">
<text>Test that a specializing bean has all its own qualifiers and the
qualifiers of the specialized bean.</text>
@@ -922,7 +939,7 @@
</assertion>
<assertion id="f">
- <text>If a producer method returns a null value at runtime, and the producer
method declares scope other than |@Dependent|, an |IllegalProductException| is thrown by
the container. This restriction allows the container to use a client proxy, as defined in
Section 5.5, "Client proxies".</text>
+ <text>If a producer method returns a null value at runtime, and the producer
method declares scope other than |@Dependent|, an |IllegalProductException| is thrown by
the container. This restriction allows the container to use a client proxy, as defined in
Section 5.4, "Client proxies".</text>
</assertion>
<assertion id="ga">
@@ -982,19 +999,19 @@
</assertion>
<assertion id="ba">
- <text>A producer method may specify a scope</text>
+ <text>A producer method may specify a scope.</text>
</assertion>
<assertion id="bb">
- <text>A producer method may specify a name</text>
+ <text>A producer method may specify a name.</text>
</assertion>
<assertion id="bd">
- <text>A producer method may specify stereotypes</text>
+ <text>A producer method may specify stereotypes.</text>
</assertion>
<assertion id="be">
- <text>A producer method may specify a qualifier</text>
+ <text>A producer method may specify qualifiers.</text>
</assertion>
<group>
@@ -1076,7 +1093,7 @@
</assertion>
<assertion id="ba">
- <text>When searching for disposer methods for a producer method, the
container considers the type and qualifiers of the disposed parameter. If a disposed
parameter resolves to a producer method declared by the same bean class, according to the
rules of typesafe resolution defined in Section 5.3 "Typesafe resolution", the
container must call this method when destroying an instance returned by that producer
method.</text>
+ <text>When searching for disposer methods for a producer method, the
container considers the type and qualifiers of the disposed parameter. If a disposed
parameter resolves to a producer method declared by the same bean class, according to the
rules of typesafe resolution defined in Section 5.2 "Typesafe resolution", the
container must call this method when destroying an instance returned by that producer
method.</text>
</assertion>
<assertion id="da">
@@ -1098,15 +1115,15 @@
</assertion>
<assertion id="ca">
- <text>If a disposal method is annotated |@Produces|, the container
automatically detects the problem and treats it as a definition error.</text>
+ <text>If a disposer method is annotated |@Produces|, the container
automatically detects the problem and treats it as a definition error.</text>
</assertion>
<assertion id="da">
- <text>If a disposal method is annotated |@Inject|, the container
automatically detects the problem and treats it as a definition error.</text>
+ <text>If a disposer method is annotated |@Inject|, the container
automatically detects the problem and treats it as a definition error.</text>
</assertion>
<assertion id="ea">
- <text>If a disposal method has a parameter annotated |@Observes|, the
container automatically detects the problem and treats it as a definition
error.</text>
+ <text>If a disposer method has a parameter annotated |@Observes|, the
container automatically detects the problem and treats it as a definition
error.</text>
</assertion>
<assertion id="fa">
@@ -1124,15 +1141,15 @@
<section id="3.3.7" title="Disposer method resolution">
<assertion id="aa">
- <text>When searching for disposer methods for a producer method, the
container searches for disposer methods which are declared by the same bean class as the
producer method, and for which the disposed parameter resolves to the producer method,
according to the typesafe resolution algorithm defined in Section 5.3, "Typesafe
resolution".</text>
+ <text>A disposer method is bound to a producer method if the producer method
is declared by the same bean class as the disposer method, and the producer method is
assignable to the disposed parameter, according to the rules of typesafe resolution
defined in Section 5.2, "Typesafe resolution".</text>
</assertion>
<assertion id="ba">
- <text>If there are multiple disposer methods for a single producer method,
the container automatically detects the problem and treats it as a definition error, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>If there are multiple disposer methods for a single producer method,
the container automatically detects the problem and treats it as a definition
error.</text>
</assertion>
<assertion id="ca">
- <text>If the disposed parameter of a disposer method does not resolve to any
producer method declared by the bean class, the container automatically detects the
problem and treats it as a definition error, as defined in Section 12.4, "Problems
detected automatically by the container".</text>
+ <text>If there is no producer method declared by the bean class that is
assignable to the disposed parameter of a dispose method, the container automatically
detects the problem and treats it as a definition error.</text>
</assertion>
</section>
@@ -1170,7 +1187,7 @@
</assertion>
<assertion id="e">
- <text>If a producer method contains a null value at runtime, and the producer
field declares any other scope, an |IllegalProductException| is thrown by the container.
This restriction allows the container to use a client proxy, as defined in Section 5.5,
"Client proxies"</text>
+ <text>If a producer method contains a null value at runtime, and the producer
field declares any other scope, an |IllegalProductException| is thrown by the container.
This restriction allows the container to use a client proxy, as defined in Section 5.4,
"Client proxies"</text>
</assertion>
<assertion id="fa">
@@ -1182,15 +1199,15 @@
</assertion>
<assertion id="ga">
- <text>If a producer field type contains a wildcard type parameter the
container automatically detects the problem and treats it as a definition error, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>If a producer field type contains a wildcard type parameter the
container automatically detects the problem and treats it as a definition
error.</text>
</assertion>
<assertion id="gb">
- <text>If the producer field type is a parameterized type with a type
variable, it must have scope |@Dependent|. If a producer field with a parameterized type
with a type variable declares any scope other than |@Dependent|, the container
automatically detects the problem and treats it as a definition error, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ <text>If the producer field type is a parameterized type with a type
variable, it must have scope |@Dependent|. If a producer field with a parameterized type
with a type variable declares any scope other than |@Dependent|, the container
automatically detects the problem and treats it as a definition error.</text>
</assertion>
<assertion id="ha">
- <text>If a producer field type is a type variable the container automatically
detects the problem and treats it as a definition error, as defined in Section 12.4,
"Problems detected automatically by the container".</text>
+ <text>If a producer field type is a type variable the container automatically
detects the problem and treats it as a definition error.</text>
</assertion>
<assertion id="i" testable="false">
@@ -1205,11 +1222,11 @@
<section id="3.4.1" title="Bean types of a producer field">
<assertion id="a">
- <text>The bean types of a producer field depend upon the field type. If the
field type is an interface, the unrestricted set of bean types contains the field type,
all interfaces it extends directly or indirectly and java.lang.Object</text>
+ <text>The bean types of a producer field depend upon the field type. If the
field type is an interface, the unrestricted set of bean types contains the field type,
all interfaces it extends directly or indirectly and |java.lang.Object|.</text>
</assertion>
<group>
- <text>The bean types of a producer field depend upon the field type. If a
field type is primitive or is a Java array type, the unrestricted set of bean types
contains exactly two types: the field type and java.lang.Object</text>
+ <text>The bean types of a producer field depend upon the field type. If a
field type is primitive or is a Java array type, the unrestricted set of bean types
contains exactly two types: the field type and |java.lang.Object|.</text>
<assertion id="ba">
<text>Check primitive type</text>
</assertion>
@@ -1311,6 +1328,14 @@
<assertion id="hh">
<text>The bean type and qualifiers of the resource are determined by the
producer field declaration.</text>
</assertion>
+
+ <assertion id="i">
+ <text>If the producer field declaration specifies an EL name, the container
automatically detects the problem and treats it as a definition error.</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>If the matching object in the Java EE component environment is not of
the same type as the producer field declaration, the container automatically detects the
problem and treats it as a definition errors.</text>
+ </assertion>
</section>
@@ -1353,7 +1378,7 @@
</assertion>
<assertion id="e">
- <text>If a Java EE component class has an injection point of type
|UserTransaction| and qualifier |@Default|, and may not validly make use of the JTA
|UserTransaction| according to the Java EE platform specification, the container
automatically detects the problem and treats it as a definition error, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ <text>If a Java EE component class has an injection point of type
|UserTransaction| and qualifier |@Default|, and may not validly make use of the JTA
|UserTransaction| according to the Java EE platform specification, the container
automatically detects the problem and treats it as a definition error.</text>
</assertion>
</section>
@@ -1374,22 +1399,21 @@
</assertion>
</group>
-
<assertion id="ba">
<text>If a bean class does not explicitly declare a constructor using
|@Inject|, the constructor that accepts no parameters is the bean
constructor.</text>
<note>Can't check implicit constructor</note>
</assertion>
<assertion id="ca">
- <text>If a bean class has more than one constructor annotated |@Inject|, the
container automatically detects the problem and treats it as a definition error, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>If a bean class has more than one constructor annotated |@Inject|, the
container automatically detects the problem and treats it as a definition
error.</text>
</assertion>
<assertion id="da">
- <text>If a bean constructor has a parameter annotated |@Disposes|, the
container automatically detects the problem and treats it as a definition error, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>If a bean constructor has a parameter annotated |@Disposes|, the
container automatically detects the problem and treats it as a definition
error.</text>
</assertion>
<assertion id="ea">
- <text>If a bean constructor has a parameter annotated |@Observes|, the
container automatically detects the problem and treats it as a definition error, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>If a bean constructor has a parameter annotated |@Observes|, the
container automatically detects the problem and treats it as a definition
error.</text>
</assertion>
<assertion id="f">
@@ -1428,6 +1452,10 @@
<assertion id="aa">
<text>An injected field may be declared by annotating the field
|(a)javax.inject.Inject|.</text>
</assertion>
+
+ <assertion id="b">
+ <text>If an injected field is annotated |@Produces|, the container
automatically detects the problem and treats it as a definition error.</text>
+ </assertion>
</section>
<section id="3.9" title="Initializer methods">
@@ -1454,10 +1482,6 @@
<assertion id="e">
<text>If the bean is a session bean, the initializer method is not required
to be a business method of the session bean.</text>
</assertion>
-
- <assertion id="ea">
- <text>A generic method may not be an initializer method.</text>
- </assertion>
<assertion id="f">
<text>Method interceptors are never called when the container calls an
initializer method</text>
@@ -1479,19 +1503,19 @@
</assertion>
<assertion id="ab">
- <text>If a generic method of a bean is annotated |@Inject|, the container
automatically detects the problem and treats it as a definition error, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ <text>If a generic method of a bean is annotated |@Inject|, the container
automatically detects the problem and treats it as a definition error.</text>
</assertion>
<assertion id="ba">
- <text>If an initializer method is annotated |@Produces|, the container
automatically detects the problem and treats it as a definition error, as defined in
Section 12.4, "Problems detected automatically by the container".</text>
+ <text>If an initializer method is annotated |@Produces|, the container
automatically detects the problem and treats it as a definition error.</text>
</assertion>
<assertion id="ca">
- <text>If an initializer method has a parameter annotated |@Disposes|, the
container automatically detects the problem and treats it as a definition error, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>If an initializer method has a parameter annotated |@Disposes|, the
container automatically detects the problem and treats it as a definition
error.</text>
</assertion>
<assertion id="da">
- <text>If an initializer method has a parameter annotated |@Observes|, the
container automatically detects the problem and treats it as a definition error, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>If an initializer method has a parameter annotated |@Observes|, the
container automatically detects the problem and treats it as a definition
error.</text>
</assertion>
<assertion id="e">
@@ -1511,11 +1535,11 @@
<section id="3.11" title="The qualifier @Named at injection
points">
<assertion id="a">
- <text>If an injected field declares a |@Named| annotation that does not
specify the value member, the name of the field is assumed.</text>
+ <text>If an injected field declares a |@Named| annotation that does not
specify the |value| member, the name of the field is assumed.</text>
</assertion>
<assertion id="b">
- <text>If any other injection point declares a |@Named| annotation that does
not specify the value member, the container automatically detects the problem and treats
it as a definition error, as defined in Section 12.4, "Problems detected
automatically by the container".</text>
+ <text>If any other injection point declares a |@Named| annotation that does
not specify the |value| member, the container automatically detects the problem and treats
it as a definition error.</text>
</assertion>
</section>
@@ -1613,7 +1637,7 @@
</assertion>
<group>
- <text>Note that this second bean exists, and may be enabled and available for
injection even if the first bean is disabled, as defined by Section 5.2.2, “Enabled and
disabled beans” or if the bean class is deployed outside of a bean deployment archive, as
defined in Section 12.1, “Bean deployment archives”, and is therefore not discovered
during the bean discovery process defined in Chapter 12, Packaging and deployment. The
container discovers |@New| qualified beans by inspecting injection points of other enabled
beans.</text>
+ <text>Note that this second bean exists, and may be enabled and available for
injection even if the first bean is disabled, as defined by Section 5.1.2, “Enabled and
disabled beans” or if the bean class is deployed outside of a bean deployment archive, as
defined in Section 12.1, “Bean deployment archives”, and is therefore not discovered
during the bean discovery process defined in Chapter 12, Packaging and deployment. The
container discovers |@New| qualified beans by inspecting injection points of other enabled
beans.</text>
<assertion id="ya">
<text>Check that @New on a field injection point outside the BDA, but in
the classpath causes a bean with qualifier @New and the given type to be
created</text>
</assertion>
@@ -2025,9 +2049,13 @@
<section id="5" title="Dependency injection, lookup, and
EL">
<assertion id="b">
- <text>The container is required to support circularities in the bean
dependency graph.</text>
+ <text>The container is required to support circularities in the bean
dependency graph where at least one bean participating in every circular chain of
dependencies has a normal scope, as defined in Section 6.3, "Normal scopes and
pseudo-scopes".</text>
<note>The RI has unit tests for this atm</note>
</assertion>
+
+ <assertion id="c" testable="false">
+ <text>The container is not required to support circular chains of
dependencies where every bean participating in the chain has a pseudo-scope.</text>
+ </assertion>
</section>
<section id="5.1" title="Modularity">
@@ -2048,7 +2076,7 @@
</group>
<assertion id="d">
- <text>An alternative is never available for injection, lookup or EL
resolution in a Java EE module or library that is not a bean deployment archive (a module
or library with no beans.xml| file.</text>
+ <text>An alternative is never available for injection, lookup or EL
resolution in a Java EE module or library that is not a bean deployment archive (a module
or library with no |beans.xml| file.</text>
</assertion>
<assertion id="e">
@@ -2094,15 +2122,15 @@
</assertion>
<assertion id="h">
- <text>Each child <class> element must specify the name of a
alternative bean class. If there is no class with the specified name, or if the class
with the specified name is not an alternative bean class, 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>
+ <text>Each child |<class>| element must specify the name of a
alternative bean class. If there is no class with the specified name, or if the class
with the specified name is not an alternative bean class, the container automatically
detects the problem and treats it as a deployment problem.</text>
</assertion>
<assertion id="i">
- <text>Each child <stereotype> element must specify the name of
a |@Alternative| stereotype annotation. If there is no annotation with the specified name,
or the annotation is not a |@Alternative| stereotype, 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>
+ <text>Each child |<stereotype>| element must specify the name
of a |@Alternative| stereotype annotation. If there is no annotation with the specified
name, or the annotation is not a |@Alternative| stereotype, the container automatically
detects the problem and treats it as a deployment problem.</text>
</assertion>
<assertion id="j">
- <text>If the same type is listed twice under the <alternatives>
element, 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>
+ <text>If the same type is listed twice under the
|<alternatives>| element, the container automatically detects the problem
and treats it as a deployment problem.</text>
</assertion>
<assertion id="k">
@@ -2112,20 +2140,20 @@
<section id="5.1.2" title="Enabled and disabled beans">
<assertion id="a" testable="false">
- <text>A bean is said to be enabled if it is deployed in a bean deployment
archive, as defined by Section 12.1, "Bean deployment archives", and it is not a
producer method or field of a disabled bean, and it is not specialized by any other
enabled bean, as defined in Section 4.3, "Specialization", and either it is not
an alternative, or it is a selected alternative of at least one bean deployment archive.
Otherwise, the bean is said to be disabled.</text>
+ <text>A bean is said to be enabled if it is deployed in a bean deployment
archive, and it is not a producer method or field of a disabled bean, and it is not
specialized by any other enabled bean, as defined in Section 4.3,
"Specialization", and either it is not an alternative, or it is a selected
alternative of at least one bean deployment archive. Otherwise, the bean is said to be
disabled.</text>
<note>Tested in 5.1.4</note>
</assertion>
</section>
<section id="5.1.3" title="Inconsistent specialization">
<assertion id="a">
- <text>Suppose an enabled bean X specializes a second bean Y. If there is
another enabled bean that specializes Y we say that inconsistent specialization exists.
The container automatically detects inconsistent specialization and treats it as a
deployment problem, as defined in Section 12.4, "Problems detected automatically by
the container".</text>
+ <text>Suppose an enabled bean X specializes a second bean Y. If there is
another enabled bean that specializes Y we say that inconsistent specialization exists.
The container automatically detects inconsistent specialization and treats it as a
deployment problem.</text>
</assertion>
</section>
<section id="5.1.4" title="Inter-module injection">
<group>
- <text>A bean is available for injection in a certain Java EE module or
library if the bean is not an interceptor or decorator, the bean is enabled, the bean is
either not an alternative, or the module or library is a bean deployment archive and the
bean is a selected alternative of the bean deployment archive, and the bean class is
required to be accessible to classes in the module or library, according to the class
loading requirements of the Java EE platform and Java Servlet
specifications.</text>
+ <text>A bean is available for injection in a certain module if the bean is
not an interceptor or decorator, the bean is enabled, the bean is either not an
alternative, or the module is a bean archive and the bean is a selected alternative of the
bean archive, and the bean class is required to be accessible to classes in the module,
according to the class accessibility requirements of the module
architecture.</text>
<assertion id="a">
<text>Check a decorator can not be injected</text>
@@ -2235,7 +2263,7 @@
</group>
<group>
- <text>A bean is assignable to a given injection point if the bean has all the
required qualifiers. If no required qualifiers were explicitly specified, the container
assumes the required qualifier |@Default|. A bean has the required qualifier if it has a
qualifier with (a) the same type and (b) the same annotation member value for each member
which is not annotated |(a)javax.enterprise.inject.NonBinding|.</text>
+ <text>A bean is assignable to a given injection point if the bean has all the
required qualifiers. If no required qualifiers were explicitly specified, the container
assumes the required qualifier |@Default|. A bean has the required qualifier if it has a
qualifier with (a) the same type and (b) the same annotation member value for each member
which is not annotated |(a)javax.enterprise.util.NonBinding|.</text>
<assertion id="la">
<text>Test with beans with required qualifiers.</text>
@@ -2250,12 +2278,12 @@
</assertion>
<assertion id="ld">
- <text>Test with matching beans with matching qualifier with same annotation
member value for each member which is not annotated
|(a)javax.enterprise.inject.NonBinding|.</text>
+ <text>Test with matching beans with matching qualifier with same annotation
member value for each member which is not annotated
|(a)javax.enterprise.util.NonBinding|.</text>
</assertion>
</group>
<assertion id="n">
- <text>A bean is eligible for injection to a certain injection point if it is
available for injection in the Java EE module or library that contains the class that
declares the injection point, and it is assignable to the injection point.</text>
+ <text>A bean is eligible for injection to a certain injection point if it is
available for injection in the module that contains the class that declares the injection
point, and it is assignable to the injection point.</text>
</assertion>
<group>
@@ -2273,7 +2301,7 @@
<section id="5.2.1" title="Unsatisfied and ambiguous
dependencies">
<assertion id="aa">
- <text>The container must validate all injection points of all enabled beans
when the application is initialized to ensure that there are no unsatisfied or ambiguous
dependencies. If an unsatisfied or ambiguous dependency exists, 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>
+ <text>The container must validate all injection points of all enabled beans
and of all other Java EE component classes supporting injection when the application is
initialized to ensure that there are no unsatisfied or ambiguous dependencies. If an
unsatisfied or ambiguous dependency exists, the container automatically detects the
problem and treats it as a deployment problem.</text>
<note>These need expanding out - one for each assertion that results in an
exception in 5.7.1</note>
</assertion>
@@ -2297,6 +2325,9 @@
</section>
<section id="5.2.3" title="Assignability of raw and parameterized
types">
+ <assertion id="a">
+ <text>A parameterized bean type is considered assignable to a raw required
type if the raw types are identical and all type parameters of the bean type are either
unbounded type variables or |java.lang.Object|.</text>
+ </assertion>
<group>
<text>A parameterized bean type is considered assignable to a parameterized
required type if they have identical raw type and for each parameter: the required type
parameter and the bean type parameter are actual types with identical raw type, and, if
the type is parameterized, the bean type parameter is assignable to the required type
parameter according to these rules, or the required type parameter is a wildcard, the bean
type parameter is an actual type and the actual type is assignable to the upper bound, if
any, of the wildcard and assignable from the lower bound, if any, of the wildcard, or the
required type parameter is a wildcard, the bean type parameter is a type variable and the
upper bound of the type variable is assignable to or assignable from the upper bound, if
any, of the wildcard and assignable from the lower bound, if any, of the wildcard, or the
required type parameter is an actual type, the bean type parameter is a type variable and
the actual typ!
e is as- signable to the upper bound, if any, of the type variable, or the required type
parameter and the bean type parameter are both type variables and the upper bound of the
required type parameter is assignable to the upper bound, if any, of the bean type
parameter.</text>
@@ -2353,7 +2384,7 @@
</group>
<assertion id="aa">
- <text>If an injection point of primitive type resolves to a bean that may
have null values, such as a producer method with a nonprimitive return type or a producer
field with a non-primitive type, 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>
+ <text>If an injection point of primitive type resolves to a bean that may
have null values, such as a producer method with a nonprimitive return type or a producer
field with a non-primitive type, the container automatically detects the problem and
treats it as a deployment problem.</text>
</assertion>
<assertion id="ba">
@@ -2363,7 +2394,7 @@
<section id="5.2.5" title="Qualifier annotations with
members">
<assertion id="a" testable="false">
- <text>Qualifier types with members are supported</text>
+ <text>Qualifier types may have annotation members.</text>
<note>A statement of intent</note>
</assertion>
@@ -2372,7 +2403,7 @@
</assertion>
<assertion id="c" testable="false">
- <text>Array-valued or annotation-valued members of a qualifier type must be
annotated |@NonBinding| in a portable application. If an array-valued or annotation-valued
member of a qualifier is not annotated |@NonBinding|, non-portable behavior
results.</text>
+ <text>Array-valued or annotation-valued members of a qualifier type should be
annotated |@NonBinding| in a portable application. If an array-valued or annotation-valued
member of a qualifier is not annotated |@NonBinding|, non-portable behavior
results.</text>
</assertion>
</section>
@@ -2406,11 +2437,11 @@
<section id="5.3.1" title="Ambiguous EL names">
<assertion id="ca">
- <text>An ambiguous EL name exists in an EL expression when there are multiple
beans which match the given EL name. When an ambiguous EL name exists, the container
attempts to resolve the ambiguity. If any of the beans are alternatives, the container
eliminates all beans that are not alternatives. If there is exactly one bean remaining,
the container will select this bean, and the ambiguous EL name is called
resolvable.</text>
+ <text>An ambiguous EL name exists in an EL expression when an EL name
resolves to multiple beans. When an ambiguous EL name exists, the container attempts to
resolve the ambiguity. If any of the beans are alternatives, the container eliminates all
beans that are not alternatives. If there is exactly one bean remaining, the container
will select this bean, and the ambiguous EL name is called resolvable.</text>
</assertion>
<group>
- <text>All unresolvable ambiguous EL names are detected by the container when
the application is initialized. Suppose two beans are both accessible to classes in a
certain war, according to the class loading requirements of the Java EE platform and Java
Servlet specifications. If each bean is either not an alternative, or is a selected
alternative of the war, and either the two beans have the same EL name and the name is not
resolvable, or the EL name of one bean is of the form |x.y|, where |y| is a valid bean EL
name, and |x| is the EL name of the other bean, the container automatically detects the
problem and treats it as a deployment problem.</text>
+ <text>All unresolvable ambiguous EL names are detected by the container when
the application is initialized. Suppose two beans are both accessible to classes in a
certain war, and either the two beans have the same EL name and the name is not
resolvable, or the EL name of one bean is of the form |x.y|, where |y| is a valid bean EL
name, and |x| is the EL name of the other bean, the container automatically detects the
problem and treats it as a deployment problem.</text>
<assertion id="da">
<text>Test with two beans with the same EL name.</text>
@@ -2423,22 +2454,26 @@
</section>
<section id="5.4" title="Client proxies">
- <assertion id="a" testable="false">
- <text>Client proxies are never required for a bean whose scope is a
pseudo-scope such as |@Dependent|</text>
+ <assertion id="b">
+ <text>A contextual reference to a bean with a normal scope, as defined in
Section 6.3, “Normal scopes and pseudo-scopes”, is not a direct reference to a contextual
instance of the bean (the object returned by |Contextual.create()|). Instead, the
contextual reference is a client proxy object.</text>
</assertion>
- <assertion id="b">
- <text>A contextual reference to a bean with a normal scope, as defined in
Section 6.3, “Normal scopes and pseudo-scopes”, is not a direct reference to a contextual
instaContextual.create()textual reference is a client proxy object.</text>
+ <assertion id="a" testable="false">
+ <text>Client proxies are never required for a bean whose scope is a
pseudo-scope such as |(a)Dependent|.</text>
</assertion>
<assertion id="c" implied="true">
<text>Client proxies are serializable</text>
- <note>For "client proxies are may be passivated, even when the bean
itself may not be. Therefore the container must use a client proxy whenever a bean with
normal scope is injected into a bean with a passivating scope" to hold true the
client proxy must be serializable</note>
+ <note>For the statement "Client proxies may be passivated, even when the
bean itself may not be. Therefore the container must use a client proxy whenever a bean
with normal scope is injected into a bean with a passivating scope" to hold true the
client proxy must be serializable.</note>
</assertion>
<assertion id="d">
<text>The container must guarantee that when any valid injected reference to
a bean of normal scope is invoked, the invocation is always processed by the current
instance of the injected bean.</text>
</assertion>
+
+ <assertion id="e">
+ <text>Client proxies may be shared between multiple injection
points.</text>
+ </assertion>
</section>
<section id="5.4.1" title="Unproxyable bean types">
@@ -2540,7 +2575,7 @@
<section id="5.5.1" title="Injection using the bean
constructor">
<assertion id="a">
- <text>When the container instantiates a managed bean with a constructor
annotated |@Inject|, the container calls this constructor, passing an injectable reference
to each parameter. If there is no constructor annotated |@Inject|, the container calls the
constructor with no parameters.</text>
+ <text>When the container instantiates a managed bean or session bean with a
constructor annotated |@Inject|, the container calls this constructor, passing an
injectable reference to each parameter. If there is no constructor annotated |@Inject|,
the container calls the constructor with no parameters.</text>
</assertion>
</section>
@@ -2616,7 +2651,7 @@
</group>
<group>
- <text>The container must ensure that: Initializer methods declared by a class
X in the type hierarchy of the bean are called after all injected fields declared by X or
by superclasses of X have been initialized, and after all Java EE component environment
resource dependencies declared by X or by superclasses of X have been injected. Any
@PostConstruct callback declared by a class X in the type hierarchy of the bean is called
after all initializer meth- ods declared by X or by superclasses of X have been called,
after all injected fields declared by X or by superclasses of X have been initialized, and
after all Java EE component environment resource dependencies declared by X or by
superclasses of X have been injected. Any servlet init() method is called after all
initializer methods have been called, all injected fields have been initialized and all
Java EE component environment resource dependencies have been injected.</text>
+ <text>The container must ensure that: Initializer methods declared by a class
X in the type hierarchy of the bean are called after all injected fields declared by X or
by superclasses of X have been initialized, and after all Java EE component environment
resource dependencies declared by X or by superclasses of X have been injected. Any
|@PostConstruct| callback declared by a class X in the type hierarchy of the bean is
called after all initializer meth- ods declared by X or by superclasses of X have been
called, after all injected fields declared by X or by superclasses of X have been
initialized, and after all Java EE component environment resource dependencies declared by
X or by superclasses of X have been injected. Any servlet |init()| method is called after
all initializer methods have been called, all injected fields have been initialized and
all Java EE component environment resource dependencies have been injected.</text>
<assertion id="ba">
<text>Test session bean initializer methods called after injected field of
X</text>
</assertion>
@@ -2676,17 +2711,17 @@
<section id="5.5.3" title="Destruction of dependent
objects">
<assertion id="a">
- <text>When the container destroys an instance of a bean or of any Java EE
component class supporting injection, the container destroys all dependent objects, as
defined in Section 6.4.2, "Dependent object destruction", after the
|@PreDestroy| callback completes and after the servlet |destroy()| method is
called.</text>
+ <text>When the container destroys an instance of a bean or of any Java EE
component class supporting injection, the container destroys all dependent objects, as
defined in Section 6.4.2, "Destruction of objects with scope @Dependent", after
the |@PreDestroy| callback completes and after the servlet |destroy()| method is
called.</text>
</assertion>
</section>
- <section id="5.5.4" title="Invocation of producer or disposal
methods">
+ <section id="5.5.4" title="Invocation of producer or disposer
methods">
<assertion id="a">
<text>When the container calls a producer method, if the method is static,
the container must invoke the method.</text>
</assertion>
<assertion id="b">
- <text>When the container calls a disposal method, if the method is static,
the container must invoke the method.</text>
+ <text>When the container calls a disposer method, if the method is static,
the container must invoke the method.</text>
</assertion>
<assertion id="c">
@@ -2694,11 +2729,11 @@
</assertion>
<assertion id="d">
- <text>When the container calls a disposal method, if the method is non-static
the container must obtain a contextual instance of the most specialized bean, as defined
by Section 6.5.2 "Contextual instance of a bean", then invoke the method upon
this instance.</text>
+ <text>When the container calls a disposer method, if the method is non-static
the container must obtain a contextual instance of the most specialized bean, as defined
by Section 6.5.2 "Contextual instance of a bean", then invoke the method upon
this instance.</text>
</assertion>
<assertion id="e">
- <text>The container passes an injectable reference to each injected method
parameter. The container is also responsible for destroying dependent objects created
during this invocation, as defined in Section 6.4.3 "Dependent object
destruction".</text>
+ <text>The container passes an injectable reference to each injected method
parameter. The container is also responsible for destroying dependent objects created
during this invocation, as defined in Section 6.4.2, "Destruction of objects with
scope @Dependent".</text>
</assertion>
</section>
@@ -2708,7 +2743,7 @@
</assertion>
<assertion id="b">
- <text>When the container accesses the value of a producer field, if the
producer field is non-static, the container must obtain a contextual instance of the most
specialized bean, as defined by Section 6.5.2 "Contextual instance of a bean",
then access the field value of this instance.</text>
+ <text>When the container accesses the value of a producer field, if the
producer field is non-static, the container must obtain a contextual instance of the bean
which declares the producer field, as defined by Section 6.5.2 "Contextual instance
of a bean", then access the field value of this instance.</text>
</assertion>
</section>
@@ -2726,7 +2761,7 @@
</assertion>
<assertion id="d">
- <text>The container is also responsible for destroying dependent objects
created during this invocation, as defined in Section 6.4.2, "Dependent object
destruction".</text>
+ <text>The container is also responsible for destroying dependent objects
created during this invocation, as defined in Section 6.4.2, "Destruction of objects
with scope @Dependent".</text>
</assertion>
</section>
@@ -2800,11 +2835,15 @@
<assertion id="da">
<text>The |@Any| qualifier may be used to allow the application to specify
qualifiers dynamically.</text>
</assertion>
+
+ <assertion id="e">
+ <text>The |@New| qualifier may be used, allowing the application to obtain a
|@New| qualified bean, as defined in Section 3.12, "@New qualified
beans".</text>
+ </assertion>
</section>
<section id="5.6.1" title="The Instance interface">
<assertion id="aa">
- <text>The |Instance| interface provides a method for obtaining instances of
beans with a specified combination of required type and qualifiers, and inherites the
ability to iterate beans with that combination of required type and qualifiers from
|java.lang.Iterable|.</text>
+ <text>The |Instance| interface provides a method for obtaining instances of
beans with a specified combination of required type and qualifiers, and inherits the
ability to iterate beans with that combination of required type and qualifiers from
|java.lang.Iterable|.</text>
</assertion>
<assertion id="ab">
@@ -2823,13 +2862,8 @@
<text>If an instance of an annotation that is not a qualifier type is passed
to |select()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
- <assertion id="ea" testable="false">
- <text>If an instance of javax.enterprise.inject.New is passed to select(),
non-portable behavior results. Portable applications should not pass qualifiers of type
@New to select().</text>
- <note>Describes non-portable behavior</note>
- </assertion>
-
<assertion id="fa">
- <text>The |get()| method must identify a bean that matches the required type
and required qualifiers and is accessible to the class into which the parent |Instance|
was injected, according to the rules of typesafe resolution, as defined in Section 5.3,
"Typesafe resolution" and resolving ambiguities according to Section 5.3.1,
"Unsatisfied and ambiguous dependencies".</text>
+ <text>The |get()| method must identify a bean that has the required type and
required qualifiers and is eligible for injection into the class into which the parent
|Instance| was injected, according to the rules of typesafe resolution, as defined in
Section 5.2, "Typesafe resolution", resolving ambiguities according to Section
5.2.1, "Unsatisfied and ambiguous dependencies".</text>
</assertion>
<assertion id="fba">
@@ -2845,7 +2879,7 @@
</assertion>
<assertion id="ja">
- <text>The |iterator()| method must identify the set of beans that match the
required type and required qualifiers and are accessible to the class into which the
parent |Instance| was injected, according to the rules of typesafe resolution, as defined
in Section 5.3, "Typesafe resolution".</text>
+ <text>The |iterator()| method must identify the set of beans that have the
required type and required qualifiers and are eligible for injection into the class into
which the parent |Instance| was injected, according to the rules of typesafe resolution,
as defined in Section 5.2, "Typesafe resolution".</text>
</assertion>
<assertion id="ka">
@@ -2853,11 +2887,11 @@
</assertion>
<assertion id="l">
- <text>The method |isUnsatisfied()| returns true if there is no bean that
matches the required type and qualifiers, or false otherwise.</text>
+ <text>The method |isUnsatisfied()| returns |true| if there is no bean that
has the required type and qualifiers and is eligible for injection into the class into
which the parent |Instance| was injected, or |false| otherwise.</text>
</assertion>
<assertion id="m">
- <text>The method |isAmbiguous()| returns true if there is more than one bean
that matches the required type and qualifiers, or false otherwise.</text>
+ <text>The method |isAmbiguous()| returns |true| if there is more than one
bean that has the required type and qualifiers and is eligible for injection into the
class into which the parent |Instance| was injected, or |false| otherwise.</text>
</assertion>
</section>
@@ -2888,7 +2922,13 @@
</section>
<section id="5.6.3" title="Using AnnotationLiteral and
TypeLiteral">
-
+ <assertion id="a" implied="true">
+ <text>Test |javax.enterprise.util.AnnotationLiteral| when using
|Instance.select()| to specify qualifiers.</text>
+ </assertion>
+
+ <assertion id="b" implied="true">
+ <text>Test |javax.enterprise.util.TypeLiteral| when specifying a
parameterized type with actual type parameters when calling
|Instance.select()|.</text>
+ </assertion>
</section>
<section id="6" title="Scopes and contexts">
@@ -4085,7 +4125,7 @@
</assertion>
<assertion id="ma">
- <text>When the |destroy()| method is called, and if there is a disposal
method for this producer method, the container must invoke the disposer method as defined
by Section 5.6.6, "Invocation of producer or disposal methods", passing the
instance given to |destroy()| to the disposed parameter.</text>
+ <text>When the |destroy()| method is called, and if there is a disposer
method for this producer method, the container must invoke the disposer method as defined
by Section 5.6.6, "Invocation of producer or disposer methods", passing the
instance given to |destroy()| to the disposed parameter.</text>
</assertion>
<assertion id="r">
@@ -4267,7 +4307,7 @@
</assertion>
<group>
- <text>A decorator must have exactly one delegate injection point. If a
decorator has more than one delegate injection point, or does not have a delegate
injection point, the container automatically detects the problem and treats it as a
definition error, as defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>A decorator must have exactly one delegate injection point. If a
decorator has more than one delegate injection point, or does not have a delegate
injection point, the container automatically detects the problem and treats it as a
definition error.</text>
<assertion id="ca">
<text>Test with more than one delegate injection point.</text>
@@ -4518,11 +4558,11 @@
</assertion>
<assertion id="c">
- <text>All interceptors declared using |@Interceptor| must specify at least
one interceptor binding. If an interceptor declared using |@Interceptor| does not declare
any interceptor binding, the container automatically detects the problem and treats it as
a definition error, as defined in Section 12.4, "Problems detected automatically by
the container".</text>
+ <text>All interceptors declared using |@Interceptor| must specify at least
one interceptor binding. If an interceptor declared using |@Interceptor| does not declare
any interceptor binding, the container automatically detects the problem and treats it as
a definition error.</text>
</assertion>
<assertion id="d">
- <text>An interceptor for lifecycle callbacks may only declare interceptor
binding types that are defined as |@Target(TYPE)|. If an interceptor for lifecycle
callbacks declares an interceptor binding type that is defined |@Target({TYPE, METHOD})|,
the container automatically detects the problem and treats it as a definition error, as
defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>An interceptor for lifecycle callbacks may only declare interceptor
binding types that are defined as |@Target(TYPE)|. If an interceptor for lifecycle
callbacks declares an interceptor binding type that is defined |@Target({TYPE, METHOD})|,
the container automatically detects the problem and treats it as a definition
error.</text>
</assertion>
</section>
@@ -6382,7 +6422,7 @@
<section id="12.3" title="Bean discovery">
<assertion id="a" testable="false">
- <text>The container automatically discovers managed beans (according to the
rules of Section 3.2.1, "Which Java classes are managed beans?") and session
beans in bean deployment archives and searches the bean classes for producer methods,
producer fields, disposal methods and observer methods.</text>
+ <text>The container automatically discovers managed beans (according to the
rules of Section 3.2.1, "Which Java classes are managed beans?") and session
beans in bean deployment archives and searches the bean classes for producer methods,
producer fields, disposer methods and observer methods.</text>
<note>Statement of intent</note>
</assertion>