Author: shane.bryzak(a)jboss.com
Date: 2009-01-27 01:29:21 -0500 (Tue, 27 Jan 2009)
New Revision: 1244
Added:
tck/trunk/impl/tck-audit.xml
tck/trunk/impl/tck-audit.xsd
Log:
start of audit document
Added: tck/trunk/impl/tck-audit.xml
===================================================================
--- tck/trunk/impl/tck-audit.xml (rev 0)
+++ tck/trunk/impl/tck-audit.xml 2009-01-27 06:29:21 UTC (rev 1244)
@@ -0,0 +1,579 @@
+<specification
xmlns="http://jboss.com/products/webbeans/tck/audit"
+ name="JSR-299: Java Contexts and Dependency Injection"
+ version="Revised Public Review Draft">
+
+ <section id="3.2" title="Simple beans">
+ <assertion code="a">
+ <text>The bean class of a simple bean may not be a non-static inner class or
a parameterized type</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>The bean class of a simple bean may not be an abstract class, unless
the simple bean is a decorator</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If the bean class of a simple bean is annotated with both the
@Interceptor and @Decorator stereotypes, a DefinitionException is thrown by the container
at deployment time.</text>
+ </assertion>
+
+ <assertion code="d">
+ <text>Multiple simple beans may share the same bean class. This occurs when
beans are defined using XML. Only one simple bean per bean class may be defined using
annotations.</text>
+ </assertion>
+
+ <assertion code="e">
+ <text>If a simple bean has a public field, it must have scope @Dependent. 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>
+
+ </section>
+
+ <section id="3.2.1" title="Which Java classes are beans?">
+ <assertion code="a">
+ <text>A top-level Java class is not a simple bean if it is a parameterized
type</text>
+ </assertion>
+ <assertion code="b">
+ <text>A top-level Java class is not a simple bean if it is a non-static inner
class</text>
+ </assertion>
+ <assertion code="c">
+ <text>A top-level Java class is only a simple bean if it is a concrete class,
or annotated @Decorator.</text>
+ </assertion>
+ <assertion code="d">
+ <text>A top-level Java class is not a simple bean if it is annotated with the
JPA @Entity annotation</text>
+ </assertion>
+ <assertion code="e">
+ <text>A top-level Java class is not a simple bean if it is annotated with any
of the EJB component-defining annotations</text>
+ </assertion>
+ <assertion code="f">
+ <text>A top-level Java class is not a simple bean if it implements the
javax.servlet.Servlet interface</text>
+ </assertion>
+ <assertion code="g">
+ <text>A top-level Java class is not a simple bean if it implements the
javax.servlet.Filter interface</text>
+ </assertion>
+ <assertion code="h">
+ <text>A top-level Java class is not a simple bean if it implements the
javax.servlet.ServletContextListener interface</text>
+ </assertion>
+ <assertion code="i">
+ <text>A top-level Java class is not a simple bean if it implements the
javax.servlet.http.HttpSessionListener interface</text>
+ </assertion>
+ <assertion code="j">
+ <text>A top-level Java class is not a simple bean if it implements the
javax.servlet.ServletRequestListener interface</text>
+ </assertion>
+ <assertion code="k">
+ <text>A top-level Java class is not a simple bean if it implements the
javax.ejb.EnterpriseBean interface</text>
+ </assertion>
+ <assertion code="l">
+ <text>A top-level Java class is not a simple bean if it extends
javax.faces.component.UIComponent</text>
+ </assertion>
+ <assertion code="m">
+ <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>
+ </assertion>
+ <assertion code="n">
+ <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 code="o">
+ <text>A top-level Java class is only a simple bean if it has an appropriate
constructor - either a constructor with no parameters, or declares a constructor annotated
@Initializer</text>
+ </assertion>
+ <assertion code="p">
+ <text>Additional simple beans with the same bean class may be defined using
XML, by specifying the class in beans.xml.</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.2.2" title="Bean types of a simple bean">
+ <assertion code="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">
+ <assertion code="a">
+ <text>A simple bean with a constructor that takes no parameters does not
require any special annotations</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>A bean class may also specify a scope, name, deployment type,
stereotypes and/or bindings</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>A simple bean may extend another simple bean</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.4" title="Declaring a simple bean using
XML">
+ <assertion code="a">
+ <text>Simple beans may be declared in beans.xml using the bean class
name</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>A simple bean may even be declared at any injection point declared in
XML, as defined in Section 9.9, "Inline bean declarations", in which case no
bindings are specified.</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If the bean class of a simple bean defined in XML is a parameterized
type or a non-static inner class, a DefinitionException is thrown by the container at
deployment time.</text>
+ </assertion>
+
+ <assertion code="d">
+ <text>If the bean class of a simple bean defined in XML is an abstract class,
and the simple bean is not a decorator, a DefinitionException
+is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion code="e">
+ <text>If the bean class of a simple bean defined in XML is annotated
@Interceptor, then the bean must be explicitly declared as an interceptor in XML, as
defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple
bean defined in XML has a bean class annotated @Interceptor and is not declared as an
interceptor in XML, a DefinitionException is
+thrown by the container at deployment time.</text>
+ </assertion>
+
+ <assertion code="f">
+ <text>If the bean class of a simple bean defined in XML is annotated
@Interceptor, then the bean must be explicitly declared as an interceptor in XML, as
defined in Section A.3.5.2, "Declaring an interceptor using XML". If a simple
bean defined in XML has a bean class annotated @Interceptor and is not declared as an
interceptor in XML, a DefinitionException is
+thrown by the container at deployment time.</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.5" title="Simple beans with the @New
binding">
+ <assertion code="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 code="b">
+ <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, initializer methods and injected fields defined by
annotations</text>
+ </assertion>
+ <assertion code="c">
+ <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
interceptor bindings defined by annotations</text>
+ </assertion>
+ <assertion code="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 code="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 code="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
@javax.inject.New as the only binding</text>
+ </assertion>
+ <assertion code="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 code="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 code="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, producer methods or fields or disposal methods</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.6" title="Bean constructors">
+ <assertion code="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>
+ </assertion>
+ <assertion code="b">
+ <text>The application may call bean constructors directly. However, if the
application directly instantiates the bean, no parameters are passed to the constructor by
the container; the returned object is not bound to any context; no dependencies are
injected by the container; and the lifecycle of the new instance is not managed by the
container</text>
+ </assertion>
+ </section>
+
+ <section id="3.2.6.1" title="Declaring a bean constructor using
annotations">
+ <assertion code="a">
+ <text>The bean constructor may be identified by annotating the constructor
@Initializer</text>
+ </assertion>
+
+ <assertion code="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>
+
+ <assertion code="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>
+
+ <assertion code="d">
+ <text>If a bean constructor has a parameter annotated @Disposes, or
@Observes, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.2.6.2" title="Declaring a bean constructor using
XML">
+
+ <assertion code="a">
+ <text>For a simple bean defined using XML, the bean constructor may be
specified by listing the parameter types of the constructer, in order, as direct children
of the element that declares the bean</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>If a simple bean defined using XML does not explicitly declare
constructor parameters in XML, the constructor that accepts no parameters is the bean
constructor</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If a simple bean declared in XML does not have a constructor with the
parameter types declared in XML, a DefinitionException is thrown by the container at
deployment time</text>
+ </assertion>
+
+ <assertion code="d">
+ <text>When a bean constructor is declared in XML, the container ignores
binding annotations applied to Java constructor parameters</text>
+ </assertion>
+
+ </section>
+
+ <section id="3.2.6.3" title="Bean constructor parameters">
+ <assertion code="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 code="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>
+
+ <assertion code="b">
+ <text>We say that X directly specializes Y, and we can be certain that Y will
never be instantiated or called by the container if X is enabled.</text>
+ <note>This assertion relates to specialized beans declared using
annotations</note>
+ </assertion>
+
+ <assertion code="c">
+ <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>
+
+ <assertion code="d">
+ <text>If a simple bean X defined in XML declares the
<Specializes> element, then the bean class of X must be 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>
+
+ <assertion code="e">
+ <text>We say that X directly specializes Y, and we can be certain that Y will
never be instantiated or called by the container if X is enabled</text>
+ <note>This assertion relates to specialized beans declared in
XML</note>
+ </assertion>
+ </section>
+
+ <section id="3.2.8" title="Default name for a simple bean">
+ <assertion code="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>
+ </assertion>
+ </section>
+
+ <section id="3.3" title="Session beans">
+ <assertion code="a">
+ <text>A session bean is a bean that is implemented by an EJB 3-style session
bean</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>A stateless session bean must belong to the @Dependent
pseudo-scope</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>A singleton bean must belong to either the @ApplicationScoped scope or
to the @Dependent pseudo-scope</text>
+ </assertion>
+
+ <assertion code="d">
+ <text>If a session bean specifies an illegal scope, a DefinitionException is
thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion code="e">
+ <text>Note that multiple session beans may share the same bean class. This
occurs when beans are defined using XML</text>
+ </assertion>
+
+ <assertion code="f">
+ <text>If the bean class of a session bean is annotated @Interceptor or
@Decorator, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.1" title="EJB remove methods of session
beans">
+ <assertion code="a">
+ <text>If a session bean is a stateful session bean, and the scope is
@Dependent, the application may call any EJB remove method of an instance of the session
bean.</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>If a session bean is a stateful session bean, and the scope is not
@Dependent, the application may not directly call any EJB remove method of any instance of
the session bean</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If the application directly calls an EJB remove method of an instance
of a session bean that is a stateful session bean and declares any scope other than
@Dependent, an UnsupportedOperationException is thrown</text>
+ </assertion>
+
+ <assertion code="d">
+ <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. Furthermore, 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>
+
+ </section>
+
+ <section id="3.3.2" title="Which EJBs are beans?">
+ <assertion code="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 code="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">
+
+ <assertion code="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>
+
+ <assertion code="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>
+
+ <assertion code="c">
+ <text>java.lang.Object is a bean type of every session bean</text>
+ </assertion>
+
+ <assertion code="d">
+ <text>Remote interfaces are not included in the set of bean
types</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.4" title="Declaring a session bean using
annotations">
+ <assertion code="a">
+ <text>A session bean does not require any special annotations</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>A bean class may also specify a scope, name, deployment type,
stereotypes and/or bindings</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>A session bean class may extend another bean class</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.5" title="Declaring a session bean using
XML">
+ <assertion code="a">
+ <text>Session beans may be declared in beans.xml using the bean class name
(for EJBs defined using a component-defining annotation) or bean class and EJB name (for
EJBs defined in ejb-jar.xml)</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>The ejbName attribute declares the EJB name of an EJB defined in
ejb-jar.xml</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If an entity or message-driven bean class is declared in XML, a
DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.6" title="Session beans with the @New
binding">
+
+ <assertion code="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>
+
+ <assertion code="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 code="c">
+ <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
interceptor bindings defined by annotations</text>
+ </assertion>
+
+ <assertion code="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
@Dependent,</text>
+ </assertion>
+
+ <assertion code="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
@Standard</text>
+ </assertion>
+
+ <assertion code="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
@javax.inject.New as the only binding</text>
+ </assertion>
+
+ <assertion code="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 code="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 code="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, producer methods or fields or disposal methods</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.7" title="Specializing a session bean">
+
+ <assertion code="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 code="b">
+ <text>We say that X directly specializes Y, and we can be certain that Y will
never be instantiated or called by the container if X is enabled</text>
+ </assertion>
+
+ <assertion code="c">
+ <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>
+
+ <assertion code="d">
+ <text>If a session bean X defined in XML declares the
<Specializes> element, then the bean class of X must be 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.</text>
+ </assertion>
+ </section>
+
+ <section id="3.3.8" title="Default name for a session bean">
+ <assertion code="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>
+ </assertion>
+ </section>
+
+ <section id="3.3.9" title="Session bean proxies">
+ <assertion code="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 code="b">
+ <text>All session bean proxies must be serializable</text>
+ </assertion>
+ </section>
+
+ <section id="3.4" title="Producer methods">
+ <assertion code="a">
+ <text>A producer method must be a method of a simple bean class or session
bean class</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>A producer method may be either static or non-static</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If the bean is a session bean, the producer method must be either a
business method of the EJB or a static method of the bean class</text>
+ </assertion>
+
+ <assertion code="d">
+ <text>If a producer method sometimes returns a null value, then the producer
method must have scope @Dependent</text>
+ </assertion>
+
+ <assertion code="e">
+ <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>
+ </assertion>
+
+ <assertion code="f">
+ <text>If the producer method return type is a parameterized type, it must
specify actual type parameters for each type parameter</text>
+ </assertion>
+
+ <assertion code="g">
+ <text>If a producer method return type contains a wildcard type parameter or
type variable, a DefinitionException is thrown by the container at deployment
time</text>
+ </assertion>
+
+ <assertion code="h">
+ <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>
+
+ <assertion code="i">
+ <text>A bean may declare multiple producer methods</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.1" title="Bean types of a producer method">
+
+ <assertion code="a">
+ <text>If the return type of a producer method is an interface, the set of
bean types contains the return type, all interfaces it extends directly or indirectly and
java.lang.Object</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>If a return type of a producer method is primitive or is a Java array
type, the set of bean types contains exactly two types: the method return type and
java.lang.Object</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If the return type of a producer method is a class, the set of bean
types contains the return type, every superclass and all interfaces it implements directly
or indirectly</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.2" title="Declaring a producer method using
annotations">
+
+ <assertion code="a">
+ <text>A producer method may be declared by annotating a method with the
@javax.inject.Produces annotation</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>A producer method may also specify scope, name, deployment type,
stereotypes and/or bindings</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If a producer method is annotated @Initializer, has a parameter
annotated @Disposes, or has a parameter annotated @Observes, a DefinitionException is
thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion code="d">
+ <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>
+ </section>
+
+ <section id="3.4.3" title="Declaring a producer method using
XML">
+
+ <assertion code="a">
+ <text>For a bean defined in XML, a producer method may be declared using the
method name, the <Produces> element, the return type, and the parameter
types of the method</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>When a producer method is declared in XML, the container ignores
binding annotations applied to the Java method or method parameters</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If the bean class of a bean declared in XML does not have a method with
the name and parameter types declared in XML, a DefinitionException is thrown by the
container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.4" title="Producer method parameters">
+ <assertion code="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>
+ </assertion>
+ </section>
+
+ <section id="3.4.5" title="Specializing a producer method">
+
+ <assertion code="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.
+ </assertion>
+
+ <assertion code="b">
+ <text>If the method is static or does not directly override another producer
method, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.6" title="Disposal methods">
+
+ <assertion code="a">
+ <text>A disposal method must be a method of a simple bean class or session
bean class.</text>
+ </assertion>
+
+ <assertion code="b">
+ <text>A disposal method may be either static or non-static</text>
+ </assertion>
+
+ <assertion code="c">
+ <text>If the bean is a session bean, the disposal method must be a business
method of the EJB or a static method of the bean class</text>
+ </assertion>
+
+ <assertion code="d">
+ <text>A bean may declare multiple disposal methods</text>
+ </assertion>
+ </section>
+
+ <section id="3.4.7" title="Disposed parameter of a disposal
method">
+
+ <assertion code="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 code="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>
+
+ <assertion code="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>
+ </section>
+
+
+</specification>
Added: tck/trunk/impl/tck-audit.xsd
===================================================================
--- tck/trunk/impl/tck-audit.xsd (rev 0)
+++ tck/trunk/impl/tck-audit.xsd 2009-01-27 06:29:21 UTC (rev 1244)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+
targetNamespace="http://jboss.com/products/webbeans/tck/audit"
+
xmlns:audit="http://jboss.com/products/webbeans/tck/audit">
+
+ <xs:element name="specification">
+ <xs:annotation>
+ <xs:documentation> The specification tag is the root element for
tck-audit.xml. </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="audit:section"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="section">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded"
ref="audit:assertion"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="audit:attlist.section"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.section">
+ <xs:attribute name="id" type="xs:string"/>
+ <xs:attribute name="title" type="xs:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="assertion">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="1" maxOccurs="1"
ref="audit:text"/>
+ <xs:element minOccurs="0" maxOccurs="1"
ref="audit:note"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="audit:attlist.assertion"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.assertion">
+ <xs:attribute name="code" type="xs:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="text">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string"/>
+ </xs:simpleContent"
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="note">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string"/>
+ </xs:simpleContent"
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
\ No newline at end of file