Author: shane.bryzak(a)jboss.com
Date: 2009-03-06 06:10:58 -0500 (Fri, 06 Mar 2009)
New Revision: 1785
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
some chapter 9 assertions
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-06 10:44:07 UTC (rev 1784)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-03-06 11:10:58 UTC (rev 1785)
@@ -5032,5 +5032,607 @@
</assertion>
</section>
+ <section id="9" title="XML based metadata">
+ <assertion id="a">
+ <text>XML-based bean declarations define additional beans�they do not
redefine or disable any bean that was declared via annotations</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Multiple namespaces are accommodated, each representing a Java
package</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>XML elements belonging to these namespaces represent Java types, fields
and methods</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Each namespace may declare an XML schema</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If a beans.xml file contains any XML element without a declared
namespace, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+
+ </section>
+
+ <section id="9.1" title="XML namespace for a Java package">
+ <assertion id="a">
+ <text>Every Java package has a corresponding XML namespace. The namespace URN
consists of the package name, with the prefix urn:java:</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Each namespace may, optionally, have a schema</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>An XML element belonging to such a namespace represents a Java type in
the corresponding Java package, or a method or field of a type in that
package</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If there is a Java type in the package with the same name as the XML
element, the XML element can be interpreted to represent that Java type</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>Type parameters may be specified by child elements of the element that
represents the type</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>Members of a type may be specified by child elements of the element
that represents the type, in the same namespace as the element that represents the
type</text>
+ </assertion>
+
+ </section>
+
+ <section id="9.2" title="XML namespace aggregating multiple
packages">
+ <assertion id="a">
+ <text>Alternatively, a namespace may represent several Java packages. Such a
namespace must have a URN consisting of the prefix urn:java: followed by a
period-separated list of valid Java identifiers</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The list of packages for such a namespace must be defined in a
classpath resource named namespace in the path named by the identifier list</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The format of the file is a list of packages, separated by
whitespace</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>An XML element belonging to such a namespace represents a Java type in
one of the listed packages, or a method or field of a type in one of the listed
packages</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If there are multiple packages containing a Java type with the same
name as the XML element, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If there is exactly one Java type in the listed packages with the same
name as the XML element, the XML element can be interpreted to represent that Java
type</text>
+ </assertion>
+ </section>
+
+ <section id="9.2.1" title="The Java EE namespace">
+ <assertion id="a">
+ <text>The Java EE namespace urn:java:ee represents the following packages:
java.lang, java.util, javax.annotation, javax.inject, javax.context, javax.interceptor,
javax.decorator, javax.event, javax.ejb, javax.persistence, javax.xml.ws, javax.jms, and
javax.sql</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Several elements in the urn:java:ee namespace do not represent Java
types</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The root <Beans> element, together with the
<Deploy>, <Interceptors> and <Decorators>
elements belong to the namespace urn:java:ee and do not represent Java types nor members
of Java types</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Java array types may be represented by an <Array> element
in the namespace urn:java:ee, with a child element representing the element
type</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>Primitive types may be represented by the XML element that represents
the corresponding wrapper type in java.lang, since primitive and wrapper types are
considered identical for the purposes of typesafe resolution, and assignable for the
purposes of injection</text>
+ </assertion>
+ </section>
+
+ <section id="9.3" title="Standard schema location for a
namespace">
+ <assertion id="a">
+ <text>The container must validate all namespaces for which schemas are
available in the classpath</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The container searches for a schema for each namespace in the classpath
directory corresponding to the namespace</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The schema must be named schema.xsd</text>
+ </assertion>
+ </section>
+
+ <section id="9.4" title="Stereotype, binding type and interceptor
binding type declarations">
+ <assertion id="a">
+ <text>An XML element that appears as a direct child of the root
<Beans> element is interpreted as a binding type declaration if it has a
direct child <BindingType> element in the Java EE namespace, as defined in
Section 2.3.2, "Defining new binding types"</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>An XML element that appears as a direct child of the root
<Beans> element is interpreted as an interceptor binding type if it has a
direct child <InterceptorBindingType> element in the Java EE namespace, as
defined in Section A.3.4, "Interceptor bindings"</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>An XML element that appears as a direct child of the root
<Beans> element is interpreted as a stereotype declaration if it has a
direct child <Stereotype> element in the Java EE namespace, as defined in
Section 2.7.1, "Defining new stereotypes"</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The XML element is interpreted as a Java type. If no such Java type
exists in the classpath, a DefinitionException is thrown by the container at deployment
time. If the type is not an annotation type, a DefinitionException is thrown by the
container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the annotation type is already declared as a binding type using
annotations, the annotations are ignored by the container and the XML-based declaration is
used</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the annotation type is already declared as an interceptor binding
type using annotations, the annotations are ignored by the container and the XML-based
declaration is used</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>If the annotation type is already declared as a stereotype using
annotations, the annotations are ignored by the container and the XML-based declaration is
used</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>If a certain annotation type is declared more than once as a binding
type, interceptor binding type or stereotype using XML, a DeploymentException is thrown by
the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="9.4.1" title="Child elements of a stereotype
declaration">
+ <assertion id="a">
+ <text>Every direct child element of a stereotype declaration is interpreted
as a Java type</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If no such Java type exists in the classpath, a DefinitionException is
thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the type is not an annotation type, a DefinitionException is thrown
by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the annotation type is a scope type, the default scope of the
stereotype was declared</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the annotation type is a deployment type, the default scope of the
stereotype was declared</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the annotation type is a interceptor binding type, an interceptor
binding of the stereotype was declared</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>If the annotation type is javax.annotation.Named, a stereotype with
name defaulting was declared</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>Otherwise, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="9.4.2" title="Child elements of an interceptor binding
type declaration">
+ <assertion id="a">
+ <text>Every direct child element of an interceptor binding type declaration
is interpreted as a Java type</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If no such Java type exists in the classpath, a DefinitionException is
thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the type is not an annotation type, a DefinitionException is thrown
by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the annotation type is an interceptor binding type, an inherited
interceptor binding was declared, as defined in Section A.3.4.1, "Interceptor binding
types with additional interceptor bindings"</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the annotation type is not an interceptor binding type, a
DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ </section>
+
+ <section id="9.5" title="Bean declarations">
+
+ <assertion id="a">
+ <text>An XML element that appears as a direct child of the root
<Beans> element is interpreted as a bean declaration if it is not a
<Deploy>, <Interceptors> or <Decorators> element
in the Java EE namespace, and does not have a direct child
<BindingType>,<InterceptorBindingType> or
<Stereotype> element in the Java EE namespace</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The name of the XML element is interpreted as a Java type. The
container inspects the Java type and other metadata to determine what kind of bean is
being declared. If no such Java type exists in the classpath, a DefinitionException is
thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the type is javax.jms.Queue or javax.jms.Topic, it declares a JMS
resource, as defined in Section 3.7.2, "Declaring a JMS resource using
XML"</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the element has a child <Resource>,
<PersistenceContext>, <PersistenceUnit>, <EJB>
or <WebServiceRef> element, it declares a resource, as defined in Section
3.6.1, "Declaring a resource using XML"</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the type is an EJB bean class, a session bean was declared, as
defined in Section 3.3.5, "Declaring a session bean using XML"</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the type is a concrete class, is not an EJB bean class, and is not a
parameterized type, a simple bean was declared, as defined in Section 3.2.4,
"Declaring a simple bean using XML"</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>Otherwise, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>Inline bean declarations may occur at injection points, as defined in
Section 9.9, "Inline bean declarations". Inline bean declarations always declare
simple beans</text>
+ </assertion>
+
+ </section>
+
+ <section id="9.5.1" title="Child elements of a bean
declaration">
+ <assertion id="a">
+ <text>If the child element can be interpreted as a Java annotation type, the
container interprets the child element as declaring type-level metadata</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the child element can be interpreted as a Java class or interface,
the container interprets the child element as declaring a parameter of the bean
constructor</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the child element namespace is the same as the namespace of the
parent, the container interprets the element as declaring a method or field of the
bean</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the name of the child element matches the name of both a method and
a field of the bean class, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the name of the child element matches the name of a method of the
bean class, is it interpreted to represent that method</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the name of the child element matches the name of a field of the
bean class, is it interpreted to represent that field</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>Otherwise, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="9.5.2" title="Type-level metadata for a bean">
+ <assertion id="a">
+ <text>Type-level metadata is specified via direct child elements of the bean
declaration that represent Java annotation types</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The child element is interpreted as a Java annotation
type</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the annotation type is a deployment type, the deployment type of the
bean was declared, as defined in Section 2.5.4, "Declaring the deployment type of a
bean using XML"</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the annotation type is a scope type, the scope of the bean was
declared, as defined in Section 2.4.4, "Declaring the bean scope using
XML"</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the annotation type is a binding type, a binding of the bean was
declared, as defined in Section 2.3.4, "Declaring the bindings of a bean using
XML"</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the annotation type is an interceptor binding type, an interceptor
binding of the bean was declared, as defined in Section A.3.6.2, "Binding an
interceptor using XML"</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>If the annotation type is a stereotype, a stereotype of the bean was
declared, as defined in Section 2.7.3, "Declaring the stereotypes for a bean using
XML"</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>If the annotation type is javax.annotation.Name, the name of the bean
was declared, as defined in Section 2.6.2, "Declaring the bean name using
XML"</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>If the annotation type is javax.inject.Specializes, the bean was
declared to directly specialize the bean with the same bean class that was defined using
annotations, as specified in Section 3.2.7, "Specializing a simple bean" and
Section 3.3.7, "Specializing a session bean"</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>If the annotation type is javax.inject.Realizes, the bean was declared
to realize the bean with the same bean class that was defined using
annotations</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>If the annotation type is javax.interceptor.Interceptor, or
javax.decorator.Decorator the bean is an interceptor or decorator, as defined in Section
9.7, "Interceptor and decorator declarations"</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>If the annotation type is javax.annotation.Resource, javax.ejb.EJB,
javax.xml.ws.WebServiceRef, javax.persistence.PersistenceContext or
javax.persistence.PersistenceUnit, the metadata for a resource or JMS resource was
declared, as defined in Section 3.6.1, "Declaring a resource using XML" and
Section 3.7.2, "Declaring a JMS resource using XML"</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>Otherwise, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="9.5.3" title="Bean constructor declarations">
+ <assertion id="a">
+ <text>The bean constructor for a simple bean is declared by the list of
direct child elements of the bean declaration that represent Java class or interface
types</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The container interprets these elements as declaring parameters of the
constructor</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Each constructor parameter declaration is interpreted as an injection
point declaration, as specified in Section 9.8, "Injection point
declarations"</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the simple bean class has exactly one constructor such that the
constructor has the same number of parameters as the bean declaration has constructor
parameter declarations, and the Java type represented by each constructor parameter
declaration is assignable to the Java type of the corresponding constructor parameter then
the element is interpreted to represent that constructor, and that constructor is the bean
constructor</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If more than one constructor exists which satisfies these conditions, a
DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If no constructor of the simple bean class satisfies these conditions,
a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>For any constructor parameter, the bean type declared in XML may be a
subtype of the Java parameter type. In this case, the container will use the bean type
declared in XML when resolving the dependency</text>
+ </assertion>
+ </section>
+
+ <section id="9.5.4" title="Fields of a bean">
+ <assertion id="a">
+ <text>A field of a bean is declared by a direct child element of the bean
declaration. The name of the field is the same as the name of the element</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the bean class has exactly one field with the same name as the child
element, then the child element is interpreted to represent that field</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean class does not have exactly one field with the specified
name, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If more than one child element of a bean declaration represents the
same field of the bean class, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>A field declaration may contain child elements</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If a field declaration has more than one direct child element, and at
least
+one of these elements is something other than a <value> element in the Java
EE namespace, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>An element that represents a field may declare an injected field, a
producer field or a field with an initial value</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>If the element contains a child <Produces> element in the
Java EE namespace, a producer field was declared, as defined in Section 3.5.3,
"Declaring a producer field using XML"</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>If the element contains a child <value> element in the
Java EE namespace, a field with an initial value of type Set or List was declared, as
defined in Section 9.5.5, "Field initial value declarations"</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>If the element has exactly one child element, an injected field was
declared, as defined in Section 3.8.2, "Declaring an injected field using
XML"</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>If the element has a non-empty body, and no child elements, a field
with an initial value was declared, as defined in Section 9.5.5, "Field initial value
declarations"</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>Otherwise, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>If a field declaration represents an injected field, the child element
is interpreted as an injection point declaration, as specified in Section 9.8,
"Injection point declarations"</text>
+ </assertion>
+
+ <assertion id="n">
+ <text>If the declared type is not assignable to the Java type of the field, a
DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="o">
+ <text>The bean type declared in XML may be a subtype of the Java field type.
In this case, the container will use the bean type declared in XML when resolving the
dependency</text>
+ </assertion>
+
+ </section>
+
+ <section id="9.5.5" title="Field initial value
declarations">
+ <assertion id="a">
+ <text>The initial value of a field of a simple bean or session bean with any
one of the following types may be specified in XML: any primitive type, or java.lang
wrapper type, any enumerated type, java.lang.String, java.util.Date, java.sql.Date,
java.sql.Time or java.sql.Timestamp, java.util.Calendar, java.math.BigDecimal or
java.math.BigInteger, java.lang.Class, java.util.List<java.lang.String> or
java.util.Set<java.lang.String>,
java.util.List<java.lang.Class> or
java.util.Set<java.lang.Class>, java.util.List<X> or
java.util.Set<X> where X is an enumerated type</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The initial value of the field is specified in the body of an XML
element representing the field</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The initial value of a field of primitive type or java.lang wrapper
type is specified using the Java literal syntax for that type</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The initial value of a field of type java.lang.String is specified
using the string value</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>The initial value of a field of enumerated type is specified using the
unqualified name of the enumeration value</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>The initial value of a field of type java.util.Date, java.sql.Date,
java.sql.Time, java.sql.Timestamp or java.util.Calendar is specified using a format that
can be parsed by calling
+java.text.DateFormat.getDateTimeInstance().parse()</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>The initial value of a field of type java.math.BigDecimal or
java.math.BigInteger is specified using a format that can be parsed by the constructor
that accepts a string</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>The initial value of a field of type java.lang.Class is specified using
the fully qualified Java class name</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>The initial value of a field of type java.util.List or java.util.Set is
specified by a list of <value> elements. The body of the value element is
specified using the string value, fully qualified Java class name or unqualified name of
the enumeration value</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>If a field with an initial value specified in XML is not of one of the
listed types, or if the initial value is not specified in the correct format for the type
of the field, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>If an element representing a field specifies both an initial value and
a type declaration, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+ </section>
+
+ <section id="9.5.6" title="Methods of a bean">
+ <assertion id="a">
+ <text>A method of a bean is declared by a direct child element of the bean
declaration. The name of the declared method is the same as the name of the child
element</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A method declaration may have any number of direct child
elements</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The container inspects the direct child elements of the method
declaration. For each child element, the element is interpreted as a Java type. If no such
Java type exists in the classpath, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If the type is javax.inject.Disposes, the container searches for a
direct child element of the child element and interprets that element as declaring a
disposed parameter of the disposal method</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the type is javax.event.Observes, the container searches for a
direct child element of the child element that is not an <IfExists>,
<Asynchronously>, <AfterTransactionCompletion>,
<AfterTransactionSuccess>, <AfterTransactionFailure> or
<BeforeTransactionCompletion> element in the Java EE namespace, and
interprets that element as declaring an event parameter of the observer
method</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the type is some other Java annotation type, the container
interprets the child element as declaring method-level metadata</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>If the type is a Java class or interface, the container interprets the
child element as declaring a parameter of the method</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>Otherwise, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>If a method declaration has more than one direct child element which is
an <Initializer>, <Produces>, <Disposes> or
<Observes> element in the Java EE namespace, a DefinitionException is thrown
by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>If a <Disposes> element does not contain exactly one
direct child element, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>If an <Observes> element does not contain exactly one
direct child element that is not an <IfExists>,
<Asynchronously>, <AfterTransactionCompletion>,
<AfterTransactionSuccess>, <AfterTransactionFailure> or
<BeforeTransactionCompletion> element in the Java EE namespace, a
DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>Each method parameter declaration and disposed parameter declaration is
interpreted as an injection point declaration, as specified in Section 9.8,
"Injection point declarations". An event parameter declaration is interpreted as
a type declaration, as defined in Section 9.10, "Specifying bean types and
bindings"</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>If the bean class has exactly one method such that the method name is
the same as the name of the element that declares the method, the method has the same
number of parameters as the element that declares the method has child elements, and the
Java type represented by each method parameter declaration is assignable to the Java type
of the corresponding method parameter, then the element is interpreted to represent that
method</text>
+ </assertion>
+
+ <assertion id="n">
+ <text>If more than one method exists which satisfies these conditions, a
DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="o">
+ <text>If no method of the bean class satisfies these conditions, a
DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="p">
+ <text>For any method parameter, the bean type declared in XML may be a
subtype of the Java parameter type. In this case, the container will use the bean type
declared in XML when resolving the dependency</text>
+ </assertion>
+
+ <assertion id="q">
+ <text>If more than one child element of a bean declaration represents the
same method of the bean class, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+
+ <assertion id="r">
+ <text>An element that represents a method may declare an initializer method,
an observer method, a producer method or a disposal method. Alternatively, or
additionally, it may declare method-level interceptor binding</text>
+ </assertion>
+
+ <assertion id="s">
+ <text>If the element contains a child <Initializes> element in
the Java EE namespace, an initializer method was declared, as defined in Section 3.9.2,
"Declaring an initializer method using XML"</text>
+ </assertion>
+
+ <assertion id="t">
+ <text>If the element contains a child <Produces> element in the
Java EE namespace, a producer method was declared, as defined in Section 3.4.3,
"Declaring a producer method using XML"</text>
+ </assertion>
+
+ <assertion id="u">
+ <text>If the element contains a child <Disposes> element in the
Java EE namespace, a disposal method was declared, as defined in Section 3.4.9,
"Declaring a disposal method using XML"</text>
+ </assertion>
+
+ <assertion id="v">
+ <text>If the element contains a child <Observes> element in the
Java EE namespace, an observer method was declared, as defined in Section 7.5.3,
"Declaring an observer method using XML"</text>
+ </assertion>
+
+ <assertion id="w">
+ <text>If the element contains a child element which can be interpreted as an
interceptor binding type, method-level interceptor binding was declared, as defined in
Section A.3.6.2, "Binding an interceptor using XML"</text>
+ </assertion>
+ </section>
+
+ <section id="9.6" title="Producer method and field
declarations">
+ <assertion id="a">
+ <text>A producer method or field declaration is formed by adding a direct
child <Produces> element to an element that represents the method or field, as
defined in Section 3.4.3, "Declaring a producer method using XML" and Section
3.5.3, "Declaring a producer field using XML"</text>
+ </assertion>
+
+ </section>
+
+ <section id="9.6.1" title="Child elements of a producer field
declaration">
+ <assertion id="a">
+ <text>The container inspects the direct child elements of a producer field
declaration</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If there is more than one direct child element, a DefinitionException
is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Otherwise, the direct child element is a <Produces>
element in the Java EE namespace, and declares the return type, bindings and member-level
metadata of the producer field</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The container inspects the direct child elements of the
<Produces> element. For each child element, the element is interpreted as a
Java type. If no such Java type exists in the classpath, a DefinitionException is thrown
by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the type is a Java class or interface type, the type of the producer
field was declared</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the type is a Java annotation type, it declares member-level
metadata of the producer field</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>Otherwise, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>If more than one child element represents a Java class or interface
type, or if no child element represents a Java class or interface type, a
DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="9.6.2" title="Child elements of a producer method
declaration">
+
+ </section>
</specification>