[webbeans-commits] Webbeans SVN: r1279 - tck/trunk/impl.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Thu Jan 29 02:26:05 EST 2009


Author: shane.bryzak at jboss.com
Date: 2009-01-29 02:26:05 -0500 (Thu, 29 Jan 2009)
New Revision: 1279

Modified:
   tck/trunk/impl/tck-audit.xml
Log:
chapter 4 assertions

Modified: tck/trunk/impl/tck-audit.xml
===================================================================
--- tck/trunk/impl/tck-audit.xml	2009-01-29 06:51:30 UTC (rev 1278)
+++ tck/trunk/impl/tck-audit.xml	2009-01-29 07:26:05 UTC (rev 1279)
@@ -1,29 +1,11 @@
 <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" title="Bean implementation">
-    <assertion id="a">
-      <text>The container provides built-in support for simple beans (Java classes)</text>
-    </assertion>
-    
-    <assertion id="b">
-      <text>The container provides built-in support for session beans</text>
-    </assertion>
-    
-    <assertion id="c">
-      <text>The container provides built-in support for producer methods and fields</text>
-    </assertion>
-    
-    <assertion id="d">
-      <text>The container provides built-in support for Resources (Java EE resources, persistence contexts, persistence units, remote EJBs and web services)</text>
-    </assertion>
-    
-    <assertion id="e">
-      <text>The container provides built-in support for JMS resources (topics and queues)</text>
-    </assertion>
+
+  <section id="3" title="Bean Implementation">
+  
   </section>
-  
+     
   <section id="3.1" title="Restriction upon bean instantiation">
     <assertion id="a">
       <text>The bean class is a concrete class and is not required to implement any special interface or extend any special superclass</text>
@@ -461,7 +443,7 @@
   
   <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>
+      <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">
@@ -1022,5 +1004,301 @@
       <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>
   </section>
+  
+  <section id="4" title="Inheritance, specialization and realization">
+    
+  </section>
+  
+  <section id="4.1" title="Inheritance of type-level metadata">
+  
+    <assertion id="a">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a binding type, stereotype or interceptor binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares an annotation of type Z.</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited metaannotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a deployment type.</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scopes and deployment types declared by stereotypes.</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a binding type, stereotype or interceptor binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare an annotation of type Z using XML.</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited metaannotation and Y does not explicitly declare a scope type using XML.</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a deployment type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a deployment type using XML.</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, the scope types and deployment types explicitly declared by and inherited from the class X take precedence over default scope and deployment types declared by stereotypes.</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>For annotations defined by the bean specification, all built-in scope types are declared @Inherited</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>For annotations defined by the bean specification, all built-in stereotypes are declared @Inherited</text>
+    </assertion>
+    
+    <assertion id="k">
+      <text>For annotations defined by the bean specification, no built-in binding type is declared @Inherited</text>
+    </assertion>
+    
+    <assertion id="l">
+      <text>For annotations defined by the bean specification, the built-in deployment type is not declared @Inherited</text>
+    </assertion>
+    
+    <assertion id="m">
+      <text>the @Named annotation is not declared @Inherited and bean names are not inherited unless specialization is used</text>
+    </assertion>
+    
+  </section>
+  
+  <section id="4.2" title="Inheritance of member-level metadata">
+    <assertion id="a">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares an injected field x then Y inherits x.</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static producer, disposal, or observer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static producer field x then Y does not inherit this field unless Y is explicitly declared to specialize or realize X.</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if Y is a decorator and X declares a delegate attribute x then Y inherits x if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y defines a delegate attribute</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares an injected field x then Y inherits x, unless Y explicitly declares x using XML.</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x(), unless Y explicitly declares x() using XML</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding, unless Y explicitly declares x() using XML.</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer, disposal, or observer method x() then Y does not inherit this method, unless Y is explicitly declared to specialize or realize X.</text>
+    </assertion>
+    
+    <assertion id="k">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this method, unless Y is explicitly declared to specialize or realize X.</text>
+    </assertion>
+    
+    <assertion id="l">
+      <text>For class X which is the bean class of a simple or session bean Y declared using XML, if Y is a decorator and X declares a delegate attribute x then Y inherits x, unless Y explicitly declares a delegate attribute using XML.</text>
+    </assertion>
+  </section>
+  
+  <section id="4.3" title="Specialization">
+  
+    <assertion id="a">
+      <text>If two beans both support a certain bean type, and share at least one binding, then they are both eligible for injection to any injection point with that declared type and binding. The container will choose the bean with the highest priority enabled deployment type.</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>If the bean with the lower priority deployment type declares a binding that is not declared by the bean with the higher priority deployment type, then the bean with the higher priority deployment type will not be eligible for injection to an injection point with that binding.</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>The only way one bean can completely override a lower-priority bean at all injection points is if it implements all the bean types and declares all the bindings of the lower-priority bean. However, if the lower-priority bean declares a producer method, then even this is not enough to ensure that the lower-priority bean is never called</text>
+    </assertion>
+  
+  </section>
+  
+  <section id="4.3.1" title="Using specialization">
+  
+    <assertion id="a">
+      <text>A bean declared using annotations may declare that it specializes a lower-priority bean using the @Specializes annotation</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>A bean declared using XML may declare that it specializes a lower-priority bean using the <Specializes> element</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>The bindings of a bean X that specializes a lower-priority bean Y include all bindings of Y, together with all bindings declared explicitly by X.</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>If a bean X specializes a lower-priority bean Y with a name, the name of X is the same as the name of Y. If X declares a name explicitly, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>When an enabled bean specializes a lower-priority bean, we can be certain that the lower-priority bean is never instantiated or called by the container. Even if the lower-priority bean defines a producer method, the method will be called upon an instance of the first bean</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>Specialization applies only to simple beans, as defined in Section 3.2.7, "Specializing a simple bean", session beans, as defined in Section 3.3.7, "Specializing a session bean" and producer methods, as defined in Section 3.4.5, "Specializing a producer method".</text>
+    </assertion>
+  </section>
+  
+  <section id="4.3.2" title="Direct and indirect specialization">
+    <assertion id="a">
+      <text>The @javax.inject.Specializes annotation or &lt;Specializes&gt; XML element is used to indicate that one bean directly specializes another bean</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>A bean X is said to specialize another bean Y if X directly specializes Y, or a bean Z exists, such that X directly specializes Z and Z specializes Y</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>Any non-static producer methods (see Section 3.4, "Producer methods"), producer fields (see Section 3.5, "Producer fields"), disposal methods (see Section 3.4.6, "Disposal methods") or observer methods (see Section 7.5, "Observer methods") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 6.7, "Lifecycle of producer methods", Section 6.8, "Lifecycle of producer fields" and Section 7.4, "Observer notification".</text>
+    </assertion>
+  </section>
+  
+  <section id="4.3.3" title="Inconsistent specialization">
+    <assertion id="a">
+      <text>If, in a particular deployment, either some enabled bean X specializes another enabled bean Y and X does not have a higher precedence than Y, or more than one enabled bean directly specializes the same bean we say that inconsistent specialization exists, and an InconsistentSpecializationException is thrown by the container at deployment time</text>
+    </assertion> 
+  </section>
+  
+  <section id="4.4" title="Realization">
+    <assertion id="a">
+      <text>Any bean that extends a generic class may directly extend the generic class, in the case of a bean declared using annotations</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>Any bean that extends a generic class may declare that the generic class is the bean class, in the case of a bean declared using XML, and then explicitly declare that it realizes the generic class.</text>
+    </assertion>
+  
+  </section>
+  
+  <section id="4.4.1" title="Using realization">
+    <assertion id="a">
+      <text>A bean declared using annotations may declare that it realizes a generic class by annotating the bean class with the @javax.inject.Realizes annotation</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>A bean declared using XML may declare that it realizes a generic class using the &lt;Realizes&gt; element.</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>If a generic class Y declares a non-static producer method or field with a certain combination of scope, stereotypes, bindings and interceptor bindings, then every bean X that realizes Y also has a producer method or field with the same scope, stereotypes and interceptor bindings. The bindings for this inherited producer method or field consist of all bindings declared by the producer method or field of Y, excluding all bindings of Y, together with the bindings declared explicitly by X. The deployment type of the inherited producer method or field is the deployment type of X</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>If a generic class Y declares a non-static disposal method with a disposed parameter with a certain combination of bindings, then every bean X that realizes Y also has a disposal method. The bindings of the disposed parameter of this
+inherited disposal method consist of all bindings declared by the disposed parameter of the disposal method of Y, excluding all bindings of Y, together with the bindings declared explicitly by X.</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>If a generic class Y declares a non-static observer method with an event parameter with a certain combination of event bindings, then every bean X that realizes Y also has an observer method. The event bindings of the event parameter of
+this inherited observer method consist of all event bindings declared by the event parameter of the observer method of Y.</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>Realization applies only to simple beans and session beans</text>
+    </assertion>
+  </section>
+  
+  <section id="5" title="Lookup, dependency injection and EL resolution">
+    <assertion id="a">
+      <text>The container is required to ensure that any injected reference to a contextual instance of a bean may be cast to any bean type of the bean.</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>The container is required to support circularities in the bean dependency graph</text>
+    </assertion>
+  </section>
+  
+  <section id="5.1" title="Unsatisfied and ambiguous dependencies">
+    <assertion id="a">
+      <text>The container must validate all injection points of all enabled beans at deployment time to ensure that there are no unsatisfied or ambiguous dependencies. If an unsatisfied or ambiguous dependency exists, an UnsatisfiedDependencyException
+or AmbiguousDependencyException is thrown by the container at deployment time, as defined in Section 5.7.1, "Resolving dependencies".</text>
+    </assertion>
+  </section>
+  
+  <section id="5.2" title="Primitive types and null values">
+    <assertion id="a">
+      <text>If an injection point of primitive type resolves to a bean that may be null, such as a producer method with a nonprimitive return type or a producer field with a non-primitive type, a NullableDependencyException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>The method Bean.isNullable() may be used to detect if a bean has null values</text>
+    </assertion>
+  </section>
+  
+  <section id="5.3" title="Injected reference validity">
+    <assertion id="a">
+      <text>Any reference to a bean with a normal scope is valid as long as the application maintains a hard reference to it.  However, it may only be invoked when the context associated with the normal scope is active. If it is invoked when the context is inactive, a ContextNotActiveException is thrown by the container</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>Any reference to a bean with a pseudo-scope (such as @Dependent) is valid until the bean instance to which it refers is destroyed. It may be invoked even if the context associated with the pseudo-scope is not active. If the application invokes a method of a reference to an instance that has already been destroyed, the behavior is undefined</text>
+    </assertion>
+  </section>
+  
+  <section id="5.4" title="Client proxies">
+    
+  </section>
+  
+  <section id="5.4.1" title="Unproxyable bean types">
+  
+  </section>
+  
+  <section id="5.4.2" title="Client proxy invocation">
+  
+  </section>
+  
+  <section id="5.5" title="The default binding at injection points">
+  
+  </section>
+  
+  <section id="5.6" title="Injection point metadata">
+  
+  </section>
+  
+  <section id="5.6.1" title="Injecting InjectionPoint">
+  
+  </section>
+  
+  <section id="5.7" title="The Manager object">
+  
+  </section>
+  
+  <section id="5.7.1" title="Resolving dependencies">
+  
+  </section>
+  
+  <section id="5.7.2" title="Obtaining contextual instances">
+  
+  </section>
+  
+  <section id="5.8" title="Dynamic lookup">
+  
+  </section>
+  
+  <section id="5.9" title="Typesafe resolution algorithm">
+  
+  </section>
+  
+  
+  
 
 </specification>




More information about the weld-commits mailing list