Author: shane.bryzak(a)jboss.com
Date: 2009-06-01 03:26:53 -0400 (Mon, 01 Jun 2009)
New Revision: 2736
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
section 3 assertions updated
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-05-30 13:35:51 UTC (rev 2735)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-06-01 07:26:53 UTC (rev 2736)
@@ -628,100 +628,69 @@
</assertion>
</section>
- <section id="3.2" title="Simple beans">
- <assertion id="a">
- <text>The bean class of a simple bean may not be a non-static inner
class</text>
- </assertion>
+ <section id="3.2" title="Managed beans">
- <assertion id="b">
- <text>The bean class of a simple bean may not be a parameterized
type</text>
+ <assertion id="f0">
+ <text>If the bean class of a managed bean is annotated with both the
|@Interceptor| and |@Decorator| stereotypes, 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>
</assertion>
-
- <assertion id="ca">
- <text>The bean class of a simple bean may not be an abstract class, ~unless
the simple bean is a decorator~</text>
- </assertion>
-
+
<assertion id="fa">
- <text>If a simple bean has a public field, it must have scope
|(a)Dependent|.</text>
+ <text>If a managed bean has a public field, it must have scope
|(a)Dependent|.</text>
<note>Check that a dependent scoped bean with a public field does
work</note>
</assertion>
- <assertion id="fb">
- <text>If a simple bean with a public field declares any scope other than
|@Dependent|, a |DefinitionException| is thrown by the container at deployment
time.</text>
+ <assertion id="fba">
+ <text>If a managed bean has a public field, it must have scope |@Dependent|.
If a managed bean with a public field 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>
</assertion>
+
+ <assertion id="g">
+ <text>If the managed bean class is a parameterized type, it must have scope
|@Dependent|. If a managed bean with a parameterized bean class 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>
+ </assertion>
</section>
- <section id="3.2.1" title="Which Java classes are beans?">
- <assertion id="a">
- <text>A top-level Java class is not a simple bean if it is a parameterized
type</text>
- </assertion>
+ <section id="3.2.1" title="Which Java classes are managed
beans?">
+
<assertion id="b">
- <text>A top-level Java class is not a simple bean if it is a non-static inner
class</text>
+ <text>A top-level Java class is not a managed bean if it is a non-static
inner class</text>
</assertion>
<assertion id="ba">
- <text>A top-level Java class that is a static inner class can be a simple
bean</text>
+ <text>A top-level Java class that is a static inner class can be a managed
bean</text>
</assertion>
<assertion id="ca">
- <text>A top-level Java class is not a simple bean if it is an abstract
class</text>
+ <text>A top-level Java class is not a managed bean if it is an abstract
class</text>
</assertion>
<assertion id="cb">
- <text>A top-level Java class is not a simple bean if it is an
interface</text>
+ <text>A top-level Java class is not a managed bean if it is an
interface</text>
</assertion>
- <assertion id="cc">
- <text>A top-level Java class can be a simple bean if it is static inner
class</text>
- </assertion>
- <assertion id="e">
- <text>A top-level Java class is not a simple bean if it is annotated with the
JPA |@Entity| annotation</text>
- </assertion>
+
<assertion id="f">
- <text>A top-level Java class is not a simple bean if it is annotated with any
of the EJB component-defining annotations</text>
+ <text>A top-level Java class is not a managed bean if it is annotated with
any of the EJB component-defining annotations</text>
</assertion>
- <assertion id="g">
- <text>A top-level Java class is not a simple bean if it implements the
|javax.servlet.Servlet| interface</text>
- </assertion>
- <assertion id="h">
- <text>A top-level Java class is not a simple bean if it implements the
|javax.servlet.Filter| interface</text>
- </assertion>
- <assertion id="i">
- <text>A top-level Java class is not a simple bean if it implements the
|javax.servlet.ServletContextListener| interface</text>
- </assertion>
- <assertion id="j">
- <text>A top-level Java class is not a simple bean if it implements the
|javax.servlet.http.HttpSessionListener| interface</text>
- </assertion>
- <assertion id="k">
- <text>A top-level Java class is not a simple bean if it implements the
|javax.servlet.ServletRequestListener| interface</text>
- </assertion>
- <assertion id="l">
- <text>A top-level Java class is not a simple bean if it implements the
|javax.ejb.EnterpriseBean| interface</text>
- </assertion>
- <assertion id="m">
- <text>A top-level Java class is not a simple bean if it extends
|javax.faces.component.UIComponent|</text>
- </assertion>
+
<assertion id="n">
- <text>A top-level Java class is not a simple bean if it is declared as an EJB
bean class in |ejb-jar.xml|</text>
+ <text>A top-level Java class is not a managed bean if it is declared as an
EJB bean class in |ejb-jar.xml|</text>
</assertion>
- <assertion id="o">
- <text>A top-level Java class is not a simple bean if it is declared as a JPA
entity in |orm.xml|</text>
- </assertion>
+
<assertion id="p">
- <text>A top-level Java class is only a simple bean if it has an appropriate
constructor - a constructor with no parameters</text>
+ <text>A top-level Java class is only a managed bean if it has an appropriate
constructor - a constructor with no parameters</text>
</assertion>
+
<assertion id="q">
- <text>A top-level Java class is only a simple bean if it has an appropriate
constructor - a constructor annotated |@Initializer|</text>
+ <text>A top-level Java class is only a managed bean if it has an appropriate
constructor - a constructor annotated |@Initializer|</text>
</assertion>
</section>
- <section id="3.2.2" title="Bean types of a simple bean">
+ <section id="3.2.2" title="Bean types of a managed bean">
<assertion id="a">
<text>The set of bean types for a simple bean contains the bean class, every
superclass and all interfaces it implements directly or indirectly.</text>
</assertion>
</section>
- <section id="3.2.3" title="Declaring a simple bean using
annotations">
+ <section id="3.2.3" title="Declaring a managed bean">
<assertion id="a">
- <text>A simple bean with a constructor that takes no parameters does not
require any special annotations</text>
+ <text>A managed bean with a constructor that takes no parameters does not
require any special annotations</text>
</assertion>
<assertion id="ba">
@@ -745,129 +714,73 @@
</assertion>
<assertion id="c">
- <text>A simple bean may extend another simple bean</text>
+ <text>A managed bean may extend another managed bean</text>
</assertion>
</section>
-
- <section id="3.2.4" title="Declaring a simple bean using
XML">
-
- </section>
-
- <section id="3.2.5" title="Simple beans with the @New
binding">
- <assertion id="a">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _the same bean class_.</text>
- </assertion>
- <assertion id="ba">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _the same bean constructor defined by
annotations_.</text>
- </assertion>
- <assertion id="bb">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _the same bean initializer methods defined by
annotations_.</text>
- </assertion>
- <assertion id="bc">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _the same injected fields defined by
annotations_.</text>
- </assertion>
- <assertion id="d">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _scope @Dependent_.</text>
- </assertion>
- <assertion id="e">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _deployment type @Standard_.</text>
- </assertion>
- <assertion id="f">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _(a)javax.inject.New_ as the only binding.</text>
- </assertion>
- <assertion id="g">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _no bean name_.</text>
- </assertion>
- <assertion id="h">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _no stereotypes_.</text>
- </assertion>
- <assertion id="i">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _no observer methods_.</text>
- </assertion>
- <assertion id="j">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _no producer methods_.</text>
- </assertion>
- <assertion id="k">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _no producer fields_.</text>
- </assertion>
- <assertion id="l">
- <text>Every class that satisfies the requirements of Section 3.2.1,
"Which Java classes are beans?" is a bean, with scope, deployment type and
bindings defined using annotations. Additionally, for each such simple bean, a second
simple bean exists which has _no disposal methods_.</text>
- </assertion>
- </section>
-
- <section id="3.2.6" title="Bean constructors">
+ <section id="3.2.4" title="Bean constructors">
<assertion id="a">
- <text>When the container instantiates a simple bean, it calls the bean
constructor. The bean constructor is a constructor of the bean class</text>
+ <text>When the container instantiates a managed bean, it calls the bean
constructor. The bean constructor is a constructor of the bean class</text>
</assertion>
</section>
- <section id="3.2.6.1" title="Declaring a bean constructor using
annotations">
+ <section id="3.2.4.1" title="Declaring a bean constructor">
<assertion id="a">
<text>The bean constructor may be identified by annotating the constructor
|@Initializer|</text>
</assertion>
- <assertion id="b">
- <text>If a simple bean defined using annotations does not explicitly declare
a constructor using |@Initializer|, the constructor that accepts no parameters is the bean
constructor</text>
+ <assertion id="ba">
+ <text>If a managed bean does not explicitly declare a constructor using
|@Initializer|, the constructor that accepts no parameters is the bean
constructor</text>
<note>Can't check implicit constructor</note>
</assertion>
- <assertion id="c">
- <text>If a simple bean defined using annotations has more than one
constructor annotated |@Initializer|, a |DefinitionException| is thrown by the container
at deployment time</text>
+ <assertion id="ca">
+ <text>If a managed bean has more than one constructor annotated
|@Initializer|, 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>
</assertion>
- <assertion id="d">
- <text>If a bean constructor has a parameter annotated |@Disposes|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <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>
</assertion>
- <assertion id="e">
- <text>If a bean constructor has a parameter annotated |@Observes|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <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>
</assertion>
</section>
- <section id="3.2.6.2" title="Declaring a bean constructor using
XML">
-
- </section>
-
- <section id="3.2.6.3" title="Bean constructor parameters">
- <assertion id="a">
- <text>If the bean constructor has parameters, the container calls the method
Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies"
to determine a value for each parameter and calls the constructor with those parameter
values.</text>
- </assertion>
- </section>
-
- <section id="3.2.7" title="Specializing a simple bean">
- <assertion id="a">
- <text>If a bean class of a simple bean X defined using annotations is
annotated @Specializes, then the bean class of X must directly extend the bean class of
another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if
Y has a name, X has the same name as Y.</text>
- </assertion>
+ <section id="3.2.4.2" title="Bean constructor parameters">
<assertion id="b">
- <text>We say that X directly specializes Y, and we can be certain that Y will
never be instantiated by the container if X is enabled.</text>
- <note>This assertion relates to specialized beans declared using
annotations</note>
+ <text>A bean constructor may have any number of parameters.</text>
</assertion>
<assertion id="c">
- <text>We say that X directly specializes Y, and we can be certain that Y will
never be called by the container if X is enabled.</text>
- <note>This assertion relates to specialized beans declared using
annotations</note>
+ <text>All parameters of a bean constructor are injection
points.</text>
</assertion>
+ </section>
+
+ <section id="3.2.5" title="Specializing a managed bean">
+ <assertion id="aa">
+ <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>
- <assertion id="d">
- <text>If the bean class of X does not directly extend the bean class of
another simple bean, a |DefinitionException| is thrown by the container at deployment
time.</text>
+ <assertion id="da">
+ <text>If the bean class of X does not directly extend the bean class of
another managed bean, 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>
</assertion>
</section>
- <section id="3.2.8" title="Default name for a simple bean">
+ <section id="3.2.6" title="Default name for a managed bean">
<assertion id="a">
- <text>The default name for a simple bean is the unqualified class name of the
bean class, after converting the first character to lower case</text>
+ <text>The default name for a managed bean is the unqualified class name of
the bean class, after converting the first character to lower case</text>
</assertion>
</section>
<section id="3.3" title="Session beans">
- <assertion id="a" testable="false">
- <text>A session bean is a bean that is implemented by an EJB 3-style session
bean</text>
+ <assertion id="aa" testable="false">
+ <text>A session bean is a bean that is implemented by a session bean with an
EJB 3.x client view. The basic lifecycle and semantics of an EJB session bean are defined
by the EJB specification.</text>
<note>This is a reference to the EJB specification</note>
</assertion>
@@ -879,10 +792,31 @@
<text>A singleton bean must belong to either the |@ApplicationScoped| scope
or to the |@Dependent| pseudo-scope</text>
</assertion>
- <assertion id="d">
- <text>If a session bean specifies an illegal scope, a |DefinitionException|
is thrown by the container at deployment time</text>
+ <assertion id="da">
+ <text>If a session bean specifies an illegal scope, 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>
</assertion>
+ <assertion id="e">
+ <text>A stateful session bean may have any scope.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>When a contextual instance of a session bean is obtained via the
dependency injection service, the behavior of
|SessionContext.getInvokedBusinessInterface()| is specific to the container
implementation. Portable applications should not rely upon the value returned by this
method.</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>If the bean class of a session bean is annotated |@Interceptor|, 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>
+ </assertion>
+
+ <assertion id="h">
+ <text>If the bean class of a session bean is annotated |@Decorator|, 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>
+ </assertion>
+
+ <assertion id="i">
+ <text>If the session bean class is a parameterized type, it must have scope
|@Dependent|. If a session bean with a parameterized bean class 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>
+ </assertion>
+
</section>
<section id="3.3.1" title="EJB remove methods of session
beans">
@@ -902,31 +836,20 @@
<text>If the application directly calls an EJB remove method of an instance
of a session bean that is a stateful session bean and has scope |@Dependent| then no
parameters are passed to the method by the container.</text>
</assertion>
- <assertion id="db">
- <text>If the application directly calls an EJB remove method of an instance
of a session bean that is a stateful session bean and has scope |@Dependent| then the
container ignores the instance instead of destroying it when |Bean.destroy()| is called,
as defined in Section 6.5, "Lifecycle of stateful session beans"</text>
+ <assertion id="dba">
+ <text>If the application directly calls an EJB remove method of an instance
of a session bean that is a stateful session bean and has scope |@Dependent| then the
container ignores the instance instead of destroying it when |Contextual.destroy()| is
called, as defined in Section 6.5, "Lifecycle of stateful session
beans"</text>
</assertion>
</section>
-
- <section id="3.3.2" title="Which EJBs are beans?">
- <assertion id="a">
- <text>All session beans exposing an EJB 3.x client view and declared via an
EJB component defining annotation on the EJB bean class are beans, and thus no special
declaration is required. Additional beans for these EJBs may be defined using XML, by
specifying the bean class in beans.xml</text>
- </assertion>
- <assertion id="b">
- <text>All session beans exposing an EJB 3.x client view and declared in
|ejb-jar.xml| are also beans. Additional beans for these EJBs may be defined using XML, by
specifying the bean class and EJB name in |beans.xml|</text>
- </assertion>
- </section>
-
- <section id="3.3.3" title="Bean types of a session bean">
+ <section id="3.3.2" title="Bean types of a session bean">
- <assertion id="a">
- <text>The set of bean types for a session bean contains all local interfaces
of the bean that do not have wildcard type parameters or type variables and their
superinterfaces.</text>
+ <assertion id="aa">
+ <text>The set of bean types for a session bean contains all local interfaces
of the bean and their superinterfaces.</text>
</assertion>
- <assertion id="b">
- <text>If the EJB has a bean class local view and the bean class is not a
parameterized
-type, the set of bean types contains the bean class and all superclasses.</text>
+ <assertion id="ba">
+ <text>If the session bean has a bean class local view, the set of bean types
contains the bean class and all superclasses.</text>
</assertion>
<assertion id="c">
@@ -938,7 +861,7 @@
</assertion>
</section>
- <section id="3.3.4" title="Declaring a session bean using
annotations">
+ <section id="3.3.3" title="Declaring a session bean">
<assertion id="a">
<text>A session bean does not require any special annotations</text>
</assertion>
@@ -968,101 +891,34 @@
</assertion>
</section>
- <section id="3.3.5" title="Declaring a session bean using
XML">
-
- </section>
+ <section id="3.3.4" title="Specializing a session bean">
- <section id="3.3.6" title="Session beans with the @New
binding">
-
<assertion id="aa">
- <text>Check that all enterprise beans have a |@New| bean</text>
- <note>Sanity check</note>
- </assertion>
+ <text>If a bean class of a session bean X is annotated |@Specializes|, then
the bean class of X must directly extend the bean class of another session bean Y. Then X
directly specializes Y, as defined in Section 4.3
"Specialization".</text>
- <assertion id="a">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has the
same bean class</text>
+ <assertion id="da">
+ <text>If the bean class of X does not directly extend the bean class of
another session bean, 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>
</assertion>
- <assertion id="b">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has the
initializer methods and injected fields defined by annotations</text>
- </assertion>
-
- <assertion id="d">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has
scope |(a)Dependent|.</text>
- </assertion>
-
<assertion id="e">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has
deployment type |(a)Standard|.</text>
+ <text>Session bean X that specializes session bean Y must support all local
interfaces supported by Y</text>
</assertion>
<assertion id="f">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has
|(a)javax.inject.New| as the only binding</text>
+ <text>Session bean X that specializes session bean Y must support a
bean-class local view if Y supports a bean-class local view</text>
</assertion>
-
- <assertion id="g">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has no
bean name</text>
- </assertion>
-
- <assertion id="h">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has no
stereotypes</text>
- </assertion>
-
- <assertion id="i">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has no
observer methods</text>
- </assertion>
-
- <assertion id="j">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has no
producer methods</text>
- </assertion>
-
- <assertion id="k">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has no
producer fields</text>
- </assertion>
-
- <assertion id="l">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which
EJBs are beans?" is a bean, with scope, deployment type and bindings defined using
annotations. Additionally, for each such session bean, a second bean exists which has no
disposal methods</text>
- </assertion>
- </section>
-
- <section id="3.3.7" title="Specializing a session bean">
-
- <assertion id="a">
- <text>If a bean class of a session bean X defined using annotations is
annotated |@Specializes|, then the bean class of X must directly extend the bean class of
another session bean Y defined using annotations. Then X inherits all bindings of Y, and
if Y has a name, X has the same name as Y. Also, X must support all local interfaces
supported by Y, and if Y supports a bean-class local view, X must also support a
bean-class local view. Otherwise, a |DefinitionException| is thrown by the container at
deployment time.</text>
- </assertion>
-
- <assertion id="b">
- <text>We say that X directly specializes Y, and we can be certain that Y will
never be instantiated by the container if X is enabled</text>
- </assertion>
-
- <assertion id="c">
- <text>We say that X directly specializes Y, and we can be certain that Y will
never be called by the container if X is enabled</text>
- </assertion>
-
- <assertion id="d">
- <text>If the bean class of X does not directly extend the bean class of
another session bean, a |DefinitionException| is thrown by the container at deployment
time</text>
- </assertion>
</section>
- <section id="3.3.8" title="Default name for a session bean">
+ <section id="3.3.5" title="Default name for a session bean">
<assertion id="a">
- <text>The default name for a session bean is the unqualified class name of
the bean class, after converting the first character to lower case</text>
+ <text>The default name for a managed bean is the unqualified class name of
the session bean class, after converting the first character to lower case</text>
</assertion>
</section>
-
- <section id="3.3.9" title="Session bean proxies">
- <assertion id="a">
- <text>EJB local object references do not implement all local interfaces of
the EJB. A local object reference may not be typecast to different local interface type,
as required by Section 2.2, "Bean types". Therefore, the container proxies the
local object reference. A session bean proxy implements all local interfaces of the
EJB.</text>
- </assertion>
-
- <assertion id="b">
- <text>All session bean proxies must be serializable</text>
- </assertion>
- </section>
-
+
<section id="3.4" title="Producer methods">
<assertion id="a">
- <text>A producer method must be a method of a simple bean class or session
bean class</text>
+ <text>A producer method must be a method of a managed bean class or session
bean class</text>
</assertion>
<assertion id="b">
@@ -1082,21 +938,27 @@
</assertion>
<assertion id="f">
- <text>If a producer method returns a null value at runtime, and the producer
method 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>
+ <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.3, "Client proxies".</text>
</assertion>
- <assertion id="g">
- <text>If the producer method return type is a parameterized type, it must
specify actual type parameters for each type parameter</text>
+ <assertion id="ga">
+ <text>If the producer method return type is a parameterized type, it must
specify an actual type parameter or type variable for each type parameter</text>
</assertion>
- <assertion id="h">
- <text>If a producer method return type contains a wildcard type parameter, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="ha">
+ <text>If a producer method return 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>
</assertion>
- <assertion id="i">
- <text>If a producer method return type contains a type variable, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="ia">
+ <text>If the producer method return type is a parameterized type with a type
variable, it must have scope @Dependent. If a producer
+method with a parameterized return 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>
</assertion>
+ <assertion id="ib">
+ <text>If a producer method return 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>
+ </assertion>
+
<assertion id="j" testable="false">
<text>The application may call producer methods directly. However, if the
application calls a producer method directly, no parameters will be passed to the producer
method by the container; the returned object is not bound to any context; and its
lifecycle is not managed by the container</text>
</assertion>
@@ -1121,10 +983,10 @@
</assertion>
</section>
- <section id="3.4.2" title="Declaring a producer method using
annotations">
+ <section id="3.4.2" title="Declaring a producer method">
<assertion id="a">
- <text>A producer method may be declared by annotating a method with the
|(a)javax.inject.Produces| annotation</text>
+ <text>A producer method may be declared by annotating a method with the
|(a)javax.enterprise.inject.Produces| annotation</text>
</assertion>
<assertion id="ba">
@@ -1147,52 +1009,53 @@
<text>A producer method may specify a binding type</text>
</assertion>
- <assertion id="c">
- <text>If a producer method is annotated |@Initializer|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="ca">
+ <text>If a producer method is annotated |@Initializer|, 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>
</assertion>
- <assertion id="d">
- <text>If a producer method has a parameter annotated |@Disposes|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="da">
+ <text>If a producer 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>
</assertion>
- <assertion id="e">
- <text>If a producer method has a parameter annotated |@Observes|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="ea">
+ <text>If a producer 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>
</assertion>
- <assertion id="f">
- <text>If a non-static method of a session bean class is annotated
|@Produces|, and the method is not a business method of the EJB, a |DefinitionException|
is thrown by the container at deployment time</text>
+ <assertion id="fa">
+ <text>If a non-static method of a session bean class is annotated
|@Produces|, and the method is not a business method of the session bean, 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>
</assertion>
</section>
- <section id="3.4.3" title="Declaring a producer method using
XML">
-
- </section>
-
- <section id="3.4.4" title="Producer method parameters">
- <assertion id="a">
- <text>If the producer method has parameters, the container calls the method
|Manager.getInstanceToInject()| defined in Section 5.7.1, "Resolving
dependencies" to determine a value for each parameter and calls the producer method
with those parameter values</text>
+ <section id="3.4.3" title="Producer method parameters">
+
+ <assertion id="b">
+ <text>A producer method may have any number of parameters.</text>
</assertion>
+
+ <assertion id="c">
+ <text>All producer method parameters are injection points.</text>
+ </assertion>
</section>
- <section id="3.4.5" title="Specializing a producer method">
+ <section id="3.4.4" title="Specializing a producer method">
- <assertion id="a">
- <text>If a producer method X is annotated |@Specializes|, then it must be
non-static and directly override another producer method Y. Then X inherits all bindings
of Y, and if Y has a name, X has the same name as Y.</text>
+ <assertion id="aa">
+ <text>If a producer method X is annotated |@Specializes|, then it must be
non-static and directly override another producer method Y. Then X directly specializes Y,
as defined in Section 4.3 "Specialization".</text>
</assertion>
- <assertion id="b">
- <text>If the method is static, a |DefinitionException| is thrown by the
container at deployment time</text>
+ <assertion id="ba">
+ <text>If a producer method is static, 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>
</assertion>
- <assertion id="c">
- <text>If the method does not directly override another producer method, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="ca">
+ <text>If a producer method does not directly override another 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>
</assertion>
</section>
- <section id="3.4.6" title="Disposal methods">
+ <section id="3.4.5" title="Disposal methods">
<assertion id="a">
- <text>A disposal method must be a method of a simple bean class or session
bean class.</text>
+ <text>A disposal method must be a method of a managed bean class or session
bean class.</text>
</assertion>
<assertion id="b">
@@ -1212,75 +1075,75 @@
</assertion>
</section>
- <section id="3.4.7" title="Disposed parameter of a disposal
method">
+ <section id="3.4.6" title="Disposed parameter of a disposal
method">
<assertion id="a">
<text>Each disposal method must have exactly one disposed parameter, of the
same type as the corresponding producer method return type</text>
</assertion>
- <assertion id="b">
- <text>When searching for disposal methods for a producer method, the
container considers the type and bindings of the disposed parameter. If a disposed
parameter resolves to a producer method according to the typesafe resolution algorithm,
the container must call this method when destroying an instance returned by that producer
method</text>
+ <assertion id="ba">
+ <text>When searching for disposal methods for a producer method, the
container considers the type and bindings of the disposed parameter. If a disposed
parameter resolves to a producer method declared by the same bean class, according to the
typesafe resolution algorithm, the container must call this method when destroying an
instance returned by that producer method</text>
</assertion>
- <assertion id="c">
- <text>If the disposed parameter does not resolve to any producer method
according to the typesafe resolution algorithm, an UnsatisfiedDependencyException is
thrown by the container at deployment time</text>
+ <assertion id="da">
+ <text>A disposal method may resolve to multiple producer methods declared by
the bean class, in which case the container must call it when destroying any instance
returned by any of these producer methods.</text>
</assertion>
-
- <assertion id="d">
- <text>If a disposed parameter resolves to a producer method according to the
typesafe resolution algorithm, the container must call this method when destroying an
instance returned by that producer method</text>
- </assertion>
</section>
- <section id="3.4.8" title="Declaring a disposal method using
annotations">
+ <section id="3.4.7" title="Declaring a disposal method">
<assertion id="a">
- <text>A disposal method may be declared using annotations by annotating a
parameter |(a)javax.inject.Disposes|. That parameter is the disposed parameter</text>
+ <text>A disposal method may be declared by annotating a parameter
|(a)javax.enterprise.inject.Disposes|. That parameter is the disposed
parameter</text>
</assertion>
- <assertion id="b">
- <text>If a method has more than one parameter annotated |@Disposes|, a
|DefinitionException| is thrown by the container</text>
+ <assertion id="b0">
+ <text>Bindings may be declared by annotating the disposed
parameter.</text>
</assertion>
- <assertion id="c">
- <text>If a disposal method is annotated |@Produces|, a |DefinitionException|
is thrown by the container at deployment time</text>
+ <assertion id="ba">
+ <text>If a method has more than one 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>
</assertion>
- <assertion id="d">
- <text>If a disposal method is annotated |@Initializer|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="ca">
+ <text>If a disposal 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>
</assertion>
- <assertion id="e">
- <text>If a disposal method has a parameter annotated |@Observes|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="da">
+ <text>If a disposal method is annotated |@Initializer|, 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>
</assertion>
- <assertion id="f">
- <text>If a non-static method of a session bean class has a parameter
annotated |@Disposes|, and the method is not a business method of the EJB, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <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, as
defined in Section 12.4 "Problems detected automatically by the
container".</text>
</assertion>
+
+ <assertion id="fa">
+ <text>If a non-static method of a session bean class has a parameter
annotated |@Disposes|, and the method is not a business method of the session bean, 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>
+ </assertion>
</section>
- <section id="3.4.9" title="Declaring a disposal method using
XML">
+ <section id="3.4.8" title="Disposal method parameters">
- </section>
-
- <section id="3.4.10" title="Disposal method parameters">
-
<assertion id="a">
- <text>In addition to the disposed parameter, a disposal method may declare
additional parameters, which may also specify bindings. The container calls
|Manager.getInstanceToInject()| to determine a value for each parameter of a disposal
method and calls the disposal method with those parameter values</text>
+ <text>In addition to the disposed parameter, a disposal method may declare
additional parameters, which may also specify bindings. These additional parameters are
injection points.</text>
</assertion>
</section>
- <section id="3.4.11" title="Disposal method resolution">
+ <section id="3.4.9" title="Disposal method resolution">
- <assertion id="a">
- <text>When searching for disposal methods for a producer method, the
container searches for disposal methods which are declared by an enabled bean, and for
which the disposed parameter must resolve to the producer method, according to the
typesafe resolution algorithm</text>
+ <assertion id="aa">
+ <text>When searching for disposal methods for a producer method, the
container searches for disposal 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.1, "Typesafe
resolution algorithm".</text>
</assertion>
- <assertion id="b">
- <text>If there are multiple disposal methods for a producer method, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="ba">
+ <text>If there are multiple disposal 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>
</assertion>
+
+ <assertion id="c">
+ <text>If the disposed parameter of a disposal 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>
+ </assertion>
</section>
- <section id="3.4.12" title="Default name for a producer
method">
+ <section id="3.4.10" title="Default name for a producer
method">
<assertion id="a">
<text>The default name for a producer method is the method name, unless the
method follows the JavaBeans property getter naming convention, in which case the default
name is the JavaBeans property name</text>
@@ -1290,7 +1153,7 @@
<section id="3.5" title="Producer fields">
<assertion id="a">
- <text>A producer field must be a field of a simple bean class or session bean
class</text>
+ <text>A producer field must be a field of a managed bean class or session
bean class</text>
</assertion>
<assertion id="b">
@@ -1306,21 +1169,25 @@
</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.4,
"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.3,
"Client proxies"</text>
</assertion>
- <assertion id="f">
- <text>If the producer field return type is a parameterized type, it must
specify actual type parameters for each type parameter</text>
+ <assertion id="fa">
+ <text>If the producer field type is a parameterized type, it must specify an
actual type parameter or type variable for each type parameter</text>
</assertion>
- <assertion id="g">
- <text>If a producer field return type contains a wildcard type parameter, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <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>
</assertion>
- <assertion id="h">
- <text>If a producer field return type contains a type variable, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <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>
</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>
+ </assertion>
+
<assertion id="i" testable="false">
<text>The application may access producer fields directly. However, if the
application accesses a producer field directly, the returned object is not bound to any
context; and its lifecycle is not managed by the container</text>
<note>This is a statement of intent</note>
@@ -1349,7 +1216,7 @@
<section id="3.5.2" title="Declaring a producer field using
annotations">
<assertion id="a">
- <text>A producer field may be declared by annotating a field with the
|(a)javax.inject.Produces| annotation</text>
+ <text>A producer field may be declared by annotating a field with the
|(a)javax.enterprise.inject.Produces| annotation</text>
</assertion>
<assertion id="b">
@@ -1373,128 +1240,74 @@
</assertion>
</section>
- <section id="3.5.3" title="Declaring a producer field using
XML">
-
- </section>
-
- <section id="3.5.4" title="Default name for a producer
field">
+ <section id="3.5.3" title="Default name for a producer
field">
<assertion id="a">
<text>The default name for a producer field is the field name</text>
</assertion>
</section>
<section id="3.6" title="Resources">
- <assertion id="a">
- <text>Resources may be declared in beans.xml, allowing direct injection of an
EE resource</text>
- </assertion>
- <assertion id="b">
- <text>Resources may be declared in beans.xml, allowing direct injection of an
entity manager</text>
- </assertion>
-
- <assertion id="c">
- <text>Resources may be declared in beans.xml, allowing direct injection of an
entity manager factory</text>
- </assertion>
-
- <assertion id="d">
- <text>Resources may be declared in beans.xml, allowing direct injection of an
EJB remote object</text>
- </assertion>
-
- <assertion id="e">
- <text>Resources may be declared in beans.xml, allowing direct injection of a
web service reference</text>
- </assertion>
-
- <assertion id="f">
- <text>The lifecycle of an injected reference is identical to the semantics of
Java EE injection using |@Resource|</text>
- </assertion>
-
- <assertion id="g">
- <text>The lifecycle of an injected reference is identical to the semantics of
Java EE injection using |@PersistenceContext|</text>
- </assertion>
-
- <assertion id="h">
- <text>The lifecycle of an injected reference is identical to the semantics of
Java EE injection using |@PersistenceUnit|</text>
- </assertion>
-
- <assertion id="i">
- <text>The lifecycle of an injected reference is identical to the semantics of
Java EE injection using |@EJB|</text>
- </assertion>
-
- <assertion id="j">
- <text>The lifecycle of an injected reference is identical to the semantics of
Java EE injection using |@WebServiceRef|</text>
- </assertion>
-
<assertion id="k">
<text>A resource always has scope |@Dependent|</text>
</assertion>
<assertion id="l">
- <text>A resource may not declare a bean name</text>
+ <text>A resource may not declare a bean EL name</text>
</assertion>
-
- <assertion id="m" testable="false">
- <text>Resources are always declared using XML</text>
- <note>This is a statement of intent</note>
- </assertion>
+
</section>
- <section id="3.6.1" title="Declaring a resource using XML">
-
- <assertion id="a">
- <text>A resource may be declared in |beans.xml| using an element that
represents the Java type of the resource. For a Java EE resource, the EE resource type
must be specified - for example |javax.sql.Datasource| for a JDBC datasource. The bean
type of the resource is this specified type</text>
- </assertion>
+ <section id="3.6.1" title="Declaring a resource">
- <assertion id="b">
- <text>A resource may be declared in |beans.xml| using an element that
represents the Java type of the resource. For a persistence context,
|javax.persistence.EntityManager| must be specified. The bean type of the resource is
this specified type</text>
+ <assertion id="aa">
+ <text>A resource may be declared by specifying a Java EE component
environment injection annotation as part of a producer field declaration.</text>
</assertion>
- <assertion id="c">
- <text>A resource may be declared in |beans.xml| using an element that
represents the Java type of the resource. For a persistence unit,
|javax.persistence.EntityManagerFactory| must be specified. The bean type of the resource
is this specified type</text>
+ <assertion id="bb">
+ <text>For a Java EE resource, |@Resource| must be specified.</text>
</assertion>
- <assertion id="d">
- <text>A resource may be declared in |beans.xml| using an element that
represents the Java type of the resource. For a remote EJB, an EJB remote interface type
must be specified. The bean type of the resource is this specified type</text>
+ <assertion id="cc">
+ <text>For a persistence context, |@PersistenceContext| must be
specified.</text>
</assertion>
- <assertion id="e">
- <text>A resource may be declared in |beans.xml| using an element that
represents the Java type of the resource. For a web service, a web service type must be
specified. The bean type of the resource is this specified type</text>
+ <assertion id="dd">
+ <text>For a persistence unit, |@PersistenceUnit| must be
specified.</text>
</assertion>
- <assertion id="f">
- <text>Each resource declaration must contain a child
|<Resource>|, |<PersistenceContext>|,
|<PersistenceUnit>|, |<EJB>| or
-|<WebServiceRef>| element. For a Java EE resource, a JNDI name or mapped
name must be specified using the |<name>| or |<mappedName>|
child elements of the |<Resource>| element</text>
+ <assertion id="ee">
+ <text>For a remote EJB, |@EJB| must be specified.</text>
</assertion>
- <assertion id="g">
- <text>Each resource declaration must contain a child
|<Resource>|, |<PersistenceContext>|,
|<PersistenceUnit>|, |<EJB>| or
|<WebServiceRef>| element. For a persistence context, a persistence unit
name must be specified using the |<unitName>| child element of the
|<PersistenceContext>| element</text>
+ <assertion id="ff">
+ <text>For a web service, |@WebServiceRef| must be specified.</text>
</assertion>
- <assertion id="h">
- <text>Each resource declaration must contain a child
|<Resource>|, |<PersistenceContext>|,
|<PersistenceUnit>|, |<EJB>| or
|<WebServiceRef>| element. For a persistence unit, a persistence unit name
must be specified using the |<unitName>| child element of the
|<PersistenceUnit>| element</text>
+ <assertion id="gg">
+ <text>The injection annotation specifies the metadata needed to obtain the
resources, entity manager, entity manager factory, remote
+EJB instance or web service reference from the component environment.</text>
</assertion>
- <assertion id="i">
- <text>Each resource declaration must contain a child
|<Resource>|, |<PersistenceContext>|,
|<PersistenceUnit>|, |<EJB>| or
|<WebServiceRef>| element. For a remote EJB, a JNDI name, mapped name or
EJB link must be specified using the |<name>|, |<mappedName>|
or |<ejbLink>| child elements of the |<EJB>|
element</text>
+ <assertion id="hh">
+ <text>The bean type, bindings and deployment type of the resource are
determined by the producer field declaration.</text>
</assertion>
-
- <assertion id="j">
- <text>Each resource declaration must contain a child
|<Resource>|, |<PersistenceContext>|,
|<PersistenceUnit>|, |<EJB>| or
|<WebServiceRef>| element. For a web service, a JNDI name or mapped name
must be specified using the |<name>| or |<mappedName>| child
elements of the |<WebServiceRef>| element. Optionally, a URL pointing to a
WSDL document may be specified using the |<wsdlLocation>| child
element</text>
- </assertion>
-
- <assertion id="k">
- <text>The JNDI name specified by the |<name>| element must be a
name in the global |java:global| or application |java:app| naming context</text>
- </assertion>
-
- <assertion id="l">
- <text>Optionally, one or more bindings may be specified for resources in XML.
If no binding is explicitly specified, the default binding |@Current| is
assumed.</text>
- </assertion>
</section>
- <section id="3.7" title="JMS resources">
+ <section id="3.6.2" title="Bean types of a resource">
<assertion id="a">
- <text>JMS resources may be declared in |beans.xml|</text>
+ <text>The bean types of a resource are the declared type of the field
declaration, together with |java.lang.Object|.</text>
</assertion>
+ </section>
+
+ <section id="3.6.3" title="The JTA TransactionManager">
+ <assertion id="a">
+ <text>The container must provide a built-in resource with bean type
|javax.transaction.TransactionManager| and binding |@Current|, representing a reference to
the JTA transaction manager.</text>
+ </assertion>
+ </section>
+
+ <section id="3.7" title="Message destinations">
<assertion id="b">
<text>JMS queue resources must allow the direct injection of the
|Queue|</text>
@@ -1648,34 +1461,35 @@
<text>A JMS |TopicPublisher| resource may not declare a bean
name</text>
</assertion>
- <assertion id="an">
- <text>JMS resources are always declared using XML</text>
- </assertion>
</section>
- <section id="3.7.1" title="Bean types of a JMS resource">
+ <section id="3.7.1" title="Bean types of a message
destination">
<assertion id="a">
- <text>For JMS resources that represent a queue, the bean types are |Queue|,
|QueueConnection|, |QueueSession| and |QueueSender|</text>
+ <text>For message destination that represent a queue, the bean types are
|Queue|, |QueueConnection|, |QueueSession| and |QueueSender|</text>
</assertion>
<assertion id="b">
- <text>For JMS resources that represent a topic, the bean types are |Topic|,
|TopicConnection|, |TopicSession| and |TopicPublisher|</text>
+ <text>For message destination that represent a topic, the bean types are
|Topic|, |TopicConnection|, |TopicSession| and |TopicPublisher|</text>
</assertion>
+
+ <assertion id="c">
+ <text>The supertypes |Session|, |MessageProducer|, |MessageConsumer|,
|Connection| and |Destination| are bean types of any message destination.</text>
+ </assertion>
</section>
- <section id="3.7.2" title="Declaring a JMS resource using
XML">
+ <section id="3.7.2" title="Declaring a message destination">
- <assertion id="a">
- <text>A JMS resource may be declared using the |<Topic>| or
|<Queue>| elements in |beans.xml|</text>
+ <assertion id="d">
+ <text>A message destination may be declared by specifying a |@Resource|
annotation as part of a producer field declaration of type |Topic| or
|Queue|.</text>
</assertion>
- <assertion id="b">
- <text>Each JMS resource declaration must contain a child
|<Resource>| element. A JNDI name or mapped name must be specified using the
|<name>| or |<mappedName>| child elements of the
|<Resource>| element</text>
+ <assertion id="e">
+ <text>The |@Resource| annotation specifies the metadata needed to obtain the
topic or queue from the component environment.</text>
</assertion>
- <assertion id="c">
- <text>One or more bindings may be specified. If no binding is explicitly
specified, the default binding |@Current| is assumed</text>
+ <assertion id="f">
+ <text>The bindings and deployment type of the resource are determined by the
producer field declaration.</text>
</assertion>
</section>
@@ -1689,166 +1503,183 @@
<text>An injected field is a ~non-static, ~non-final field of a bean
class.</text>
</assertion>
- <assertion id="b">
- <text>An injected field is a non-static, non-final field of a
servlet.</text>
- <note>Test needs to check that static and final fields aren't injected
and also that no exception is thrown when you have them</note>
+ <assertion id="ba">
+ <text>An injected field is a non-static, ~non-final~ field of any Java EE
component class supporting injection.</text>
</assertion>
-
- <assertion id="c">
- <text>An injected field is a non-static, non-final field of any EJB session
bean class.</text>
+
+ <assertion id="bb">
+ <text>An injected field is a ~non-static~, non-final field of any Java EE
component class supporting injection.</text>
</assertion>
-
- <assertion id="d">
- <text>An injected field is a non-static, non-final field of any message
driven bean class.</text>
+
+ <assertion id="ea">
+ <text>Injected fields are initialized by the container before initializer
methods are called, and before the |@PostConstruct| callback occurs.</text>
</assertion>
-
- <assertion id="e">
- <text>Injected fields are initialized by the container immediately after
instantiation and before any methods of the instance are invoked. The container calls the
method |Manager.getInstanceToInject()| defined in Section 5.7.1, "Resolving
dependencies" to determine a value for each injected field</text>
- </assertion>
-
- <assertion id="f">
- <text>Any EJB session bean may declare injected fields and have those fields
injected by the container</text>
- </assertion>
-
- <assertion id="g">
- <text>Any EJB message driven bean may declare injected fields and have those
fields injected by the container</text>
- </assertion>
-
+
<assertion id="h">
<text>If a field is a producer field, it is not an injected
field</text>
</assertion>
</section>
- <section id="3.8.1" title="Declaring an injected field using
annotations">
+ <section id="3.8.1" title="Declaring an injected field">
<assertion id="a">
<text>An injected field may be declared by annotating the field with any
binding type</text>
</assertion>
</section>
- <section id="3.8.2" title="Declaring an injected field using
XML">
-
- </section>
-
<section id="3.9" title="Initializer methods">
<assertion id="aa">
<text>An initializer method is a non-static method of a bean
class.</text>
</assertion>
- <assertion id="ab">
- <text>An initializer method is a non-static method of a
servlet.</text>
+ <assertion id="ca">
+ <text>An initializer method is a non-static method of any Java EE component
class supporting injection.</text>
</assertion>
+
+ <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="b">
- <text>An initializer method is a non-static method of any EJB session bean
class.</text>
+ <assertion id="g">
+ <text>A bean class may declare multiple (or zero) initializer
methods</text>
</assertion>
- <assertion id="c">
- <text>An initializer method is a non-static method of a of any EJB message
driven bean class.</text>
+ <assertion id="ea">
+ <text>Initializer methods are called by the container after injected fields
are initialized, and before the |@PostConstruct| callback occurs.</text>
</assertion>
+ <assertion id="f">
+ <text>Method interceptors are never called when the container calls an
initializer method</text>
+ </assertion>
+
+ <assertion id="h" testable="false">
+ <text>The application may call initializer methods directly, but then no
parameters will be passed to the method by the container</text>
+ <note>This is a statement of intent</note>
+ </assertion>
+
+ <section id="3.9.1" title="Declaring an initializer method">
+ <assertion id="a">
+ <text>An initializer method may be declared by annotating the method
|(a)javax.enterprise.inject.Initializer|</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>
+ </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>
+ </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>
+ </assertion>
+
+ </section>
+
+ <section id="3.9.2" title="Initializer method parameters">
+ <assertion id="aa">
+ <text>An initializer method may have any number of parameters.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>All initializer method parameters are injection points.</text>
+ </assertion>
+ </section>
+
+ <section id="3.10" title="The default binding at injection
points">
+ <assertion id="a">
+ <text>If an injection point declares no binding, the default binding
|@Current| is assumed.</text>
+ </assertion>
+ </section>
+
+ <section id="3.11" title="Beans with the @New binding">
<assertion id="d">
- <text>Initializer methods are called by the container immediately after
injected fields have been initialized by the container and before any other methods of the
instance are invoked.</text>
+ <text>For each managed bean, a second bean exists which has the same bean
class.</text>
</assertion>
<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>
+ <text>For each managed bean, a second bean exists which has the same bean
types.</text>
</assertion>
<assertion id="f">
- <text>Method interceptors are never called when the container calls an
initializer method</text>
+ <text>For each managed bean, a second bean exists which has the same bean
constructor.</text>
</assertion>
<assertion id="g">
- <text>A bean class may declare multiple (or zero) initializer
methods</text>
+ <text>For each managed bean, a second bean exists which has the same
initializer methods.</text>
</assertion>
- <assertion id="h" testable="false">
- <text>The application may call initializer methods directly, but then no
parameters will be passed to the method by the container</text>
- <note>This is a statement of intent</note>
+ <assertion id="h">
+ <text>For each managed bean, a second bean exists which has the same injected
fields.</text>
</assertion>
<assertion id="i">
- <text>Any EJB session bean may declare initializer methods and have the
methods called by the container</text>
+ <text>For each managed bean, a second bean exists which has the same
interceptor bindings.</text>
</assertion>
<assertion id="j">
- <text>Any EJB message driven bean may declare initializer methods and have
the methods called by the container</text>
+ <text>For each session bean, a second bean exists which has the same bean
class.</text>
</assertion>
- </section>
-
- <section id="3.9.1" title="Declaring an initializer method using
annotations">
- <assertion id="a">
- <text>An initializer method may be declared by annotating the method
|(a)javax.inject.Initializer|</text>
+
+ <assertion id="k">
+ <text>For each session bean, a second bean exists which has the same bean
types.</text>
</assertion>
- <assertion id="b">
- <text>If an initializer method is annotated |@Produces|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="l">
+ <text>For each session bean, a second bean exists which has the same bean
constructor.</text>
</assertion>
- <assertion id="c">
- <text>If an initializer method has a parameter annotated |@Disposes|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="m">
+ <text>For each session bean, a second bean exists which has the same
initializer methods.</text>
</assertion>
- <assertion id="d">
- <text>If an initializer method has a parameter annotated |@Observes|, a
|DefinitionException| is thrown by the container at deployment time</text>
+ <assertion id="n">
+ <text>For each session bean, a second bean exists which has the same injected
fields.</text>
</assertion>
- </section>
-
- <section id="3.9.2" title="Declaring an initializer method using
XML">
-
- </section>
-
- <section id="3.9.3" title="Initializer method parameters">
- <assertion id="a">
- <text>An initializer method may have any number of parameters. If the
initializer method has parameters, the container calls |Manager.getInstanceToInject()| to
determine a value for each parameter and calls the initializer method with those parameter
values</text>
+ <assertion id="o">
+ <text>For each session bean, a second bean exists which has the same
interceptor bindings.</text>
</assertion>
- </section>
-
- <section id="3.10" title="Support for Common Annotations">
- <assertion id="a">
- <text>Dependency injection via |@EJB| is provided by the container when
annotations are applied to the bean class of a simple bean</text>
+
+ <assertion id="p">
+ <text>This second bean has scope |(a)Dependent|.</text>
</assertion>
- <assertion id="b">
- <text>Dependency injection via |@Resource| is provided by the container when
annotations are applied to the bean class of a simple bean</text>
+ <assertion id="p">
+ <text>This second bean has deployment type |(a)Standard|.</text>
</assertion>
- <assertion id="c">
- <text>Dependency injection via |@PersistenceUnit| is provided by the
container when annotations are applied to the bean class of a simple bean</text>
+ <assertion id="p">
+ <text>This second bean has exactly one binding:
|(a)javax.enterprise.inject.New(X.class)| where |x| is the bean class.</text>
</assertion>
- <assertion id="d">
- <text>Dependency injection via |@PersistenceContext| is provided by the
container when annotations are applied to the bean class of a simple bean</text>
+ <assertion id="q">
+ <text>This second bean has no bean EL name.</text>
</assertion>
- <assertion id="e">
- <text>|@PostConstruct| callbacks are provided by the container when
annotations are applied to the bean class of a simple bean</text>
+ <assertion id="r">
+ <text>This second bean has no stereotypes.</text>
</assertion>
- <assertion id="f">
- <text>|@PreDestroy| callbacks are provided by the container when annotations
are applied to the bean class of a simple bean</text>
+ <assertion id="s">
+ <text>This second bean has no observer methods.</text>
</assertion>
- <assertion id="h">
- <text>|@PersistenceContext(type=EXTENDED)| is not supported for simple
beans</text>
+ <assertion id="t">
+ <text>This second bean has no producer methods.</text>
</assertion>
- </section>
-
- <section id="3.11" title="The Bean object for a bean">
- <assertion id="a" testable="false">
- <text>Concrete subclasses of Bean must implement the operations defined by
the Contextual interface defined in Section 6.1, "The Contextual
interface".</text>
- <note>This is asserted by the JLS</note>
+
+ <assertion id="u">
+ <text>This second bean has no producer fields.</text>
</assertion>
- <assertion id="b">
- <text>An instance of Bean exists for every enabled bean in a
deployment</text>
+ <assertion id="v">
+ <text>This second bean has no disposal methods.</text>
</assertion>
- <assertion id="c">
- <text>An application or third party framework may add support for new kinds
of beans beyond those defined by the this specification (simple beans, session beans,
producer methods and fields, resources and JMS resources) by extending Bean and
registering beans with the container, using the mechanism defined in Section 11.3,
"Bean registration".</text>
+ <assertion id="w">
+ <text>This bean is available even if the bean class declares a disabled
deployment type.</text>
</assertion>
</section>