[webbeans-commits] Webbeans SVN: r2766 - tck/trunk/impl/src/main/resources.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Thu Jun 4 19:59:36 EDT 2009


Author: shane.bryzak at jboss.com
Date: 2009-06-04 19:59:36 -0400 (Thu, 04 Jun 2009)
New Revision: 2766

Modified:
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
updated section 7 assertions

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-06-04 23:09:42 UTC (rev 2765)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-06-04 23:59:36 UTC (rev 2766)
@@ -3079,13 +3079,8 @@
       <note>Cannot test as their as what happens is not well defined</note>
     </assertion>  
   </section>
-
-  
-  
-  
-  
    
-  <section id="6" title="Bean lifecycle">
+  <section id="7" title="Bean lifecycle">
     <assertion id="a">
       <text>To create a contextual instance of a session bean, the container creates an EJB local object reference</text>
     </assertion>
@@ -3099,7 +3094,7 @@
     </assertion>
     
     <assertion id="d">
-      <text>To create a contextual instance of a simple bean, the container calls the bean constructor</text>
+      <text>To create a contextual instance of a managed bean, the container calls the bean constructor</text>
     </assertion>
     
     <assertion id="e">
@@ -3109,139 +3104,84 @@
     <assertion id="f">
       <text>To destroy a contextual instance of a producer method bean, the container calls the disposal method, if any</text>
     </assertion>
-    
-    <assertion id="g">
-      <text>When the container injects a dependency and there is no existing instance of the bean cached by the context object for the bean scope, the context object automatically creates a new contextual instance of the bean</text>
-    </assertion>
-    
-    <assertion id="h">
-      <text>When the container resolves an EL name and there is no existing instance of the bean cached by the context object for the bean scope, the context object automatically creates a new contextual instance of the bean</text>
-    </assertion>
-    
-    <assertion id="i">
-      <text>When a context is destroyed, the context object automatically destroys any instances associated with that context</text>
-    </assertion>
-    
-    <assertion id="j">
-      <text>To create and destroy contextual instances, the context object calls operations defined by the interface Contextual</text>
-    </assertion>
   </section>
   
-  <section id="6.1" title="The Contextual interface">
-    <assertion id="a" testable="false">
-      <text>The interface |javax.context.CreationalContext| provides an operation that allows the |create()| method to register an incompletely initialized contextual instance with the container.  A contextual instance is considered incompletely initialized until the |create()| method returns the instance</text>
-      <note>Statement of intent</note>
+  <section id="7.1" title="Container invocations and interception">
+    <assertion id="a">
+      <text>Invocations of initializer methods by the container are not business method invocations and are never intercepted.</text>
     </assertion>
     
     <assertion id="b">
-      <text>If |Contextual.create()| calls |CreationalContext.push()|, it must also return the instance passed to |push()|</text>
+      <text>Invocations of producer, disposal and observer methods by the container are business method invocations and are intercepted by method interceptors and decorators.</text>
     </assertion>
     
-    <assertion id="c" testable="false">
-      <text>The implementation of |Contextual| is not required to call |CreationalContext.push()|</text>
-      <note>No way to test this really</note>
+    <assertion id="c">
+      <text>Invocation of lifecycle callbacks by the container are not business method invocations, but are intercepted by interceptors for lifecycle callbacks.</text>
     </assertion>
-  </section>
-  
-  <section id="6.2" title="Creation">
-    <assertion id="a">
-      <text>The |Contextual.create()| method obtains an instance of the bean</text>
-    </assertion>
     
     <assertion id="d">
-      <text>The |Contextual.create()| method injects any dependencies</text>
+      <text>Invocations of interceptors and decorator methods during method or lifecycle callback interception are not business method invocations, and therefore no recursive interception occurs.</text>
     </assertion>
-    
-    <assertion id="f">
-      <text>The |Contextual.create()| method calls the |@PostConstruct| method, if necessary</text>
-    </assertion>
-    
-    <assertion id="g">
-      <text>If any exception occurs while creating an instance, the exception is rethrown by the |create()| method</text>
-    </assertion>
-    
-    <assertion id="h">
-      <text>If a checked exception occurs while creating an instance, it is wrapped and rethrown as an (unchecked) |CreationException|</text>
-    </assertion>
   </section>
   
-  <section id="6.3" title="Destruction">
+  <section id="7.2" title="Lifecycle of managed beans">
     <assertion id="a">
-      <text>The |Contextual.destroy()| method calls the disposal method, if necessary</text>
+      <text>When the create() method of the Bean object that represents a managed bean is called, the container first calls the bean constructor to obtain an instance of the bean, as defined in Section 5.4.3, "Injection
+using the bean constructor". The container is permitted to return an instance of a container-generated subclass of the bean class, allowing interceptor and decorator bindings.</text>
     </assertion>
     
     <assertion id="b">
-      <text>The |Contextual.destroy()| method calls the |@PreDestroy method|, if necessary</text>
+      <text>Next, the container performs Java EE component environment injection, as required by the managed bean specification.</text>
     </assertion>
     
     <assertion id="c">
-      <text>The |Contextual.destroy()| method destroys all dependent objects of the instance, as defined in Section 8.3.2, "Dependent object destruction"</text>
+      <text>Next, the container performs dependency injection, as defined in Section 5.4.4, "Injection of fields and initializer methods".</text>
     </assertion>
     
     <assertion id="d">
-      <text>If any exception occurs while destroying an instance, the exception is caught by the |destroy()| method</text>
+      <text>Finally, the container calls the |@PostConstruct| method, if any.</text>
     </assertion>
     
-    <assertion id="e" testable="false">
-      <text>If the application invokes a contextual instance after it has been destroyed, the behavior is undefined</text>
-      <note>In otherwords, the behavious is unspecified!</note>
+    <assertion id="e">
+      <text>When the |destroy()| method is called, the container calls the |@PreDestroy| method, if any.</text>
     </assertion>
+    
+    <assertion id="f">
+      <text>Finally, the container destroys dependent objects, as defined in Section 5.4.5, "Destruction of dependent objects.</text>
+    </assertion>
   </section>
   
-  <section id="6.4" title="Lifecycle of simple beans">
-    
-    <assertion id="b">
-      <text>When the |create()| method of the |Bean| object that represents a simple bean is called, after the bean constructor is called the container next initializes the values of any attributes annotated |@EJB|</text>
+  <section id="7.3" title="Lifecycle of stateful session beans">  
+    <assertion id="aa">
+      <text>When the |create()| method of a |Bean| object that represents a stateful session bean that is called, the container creates and returns a container-specific internal local reference to a new session bean instance. The reference must be passivation capable. This reference is not directly exposed to the application.</text>
     </assertion>
     
-    <assertion id="c">
-      <text>When the |create()| method of the |Bean| object that represents a simple bean is called, after the bean constructor is called the container next initializes the values of any attributes annotated |@PersistenceContext|</text>
+    <assertion id="bb">
+      <text>Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying stateful session bean instance. This object must be passivation capable.</text>
     </assertion>
-    
-    <assertion id="d">
-      <text>When the |create()| method of the |Bean| object that represents a simple bean is called, after the bean constructor is called the container next initializes the values of any attributes annotated |@Resource|</text>
+
+    <assertion id="bc">
+      <text>When the |destroy()| method is called, and if the underlying EJB was not already removed by direct invocation of a remove method by the application, the container removes the stateful session bean. The |@PreDestroy| callback must be invoked by the container.</text>
     </assertion>
-    
-    <assertion id="e">
-      <text>When the |create()| method of the |Bean| object that represents a simple bean is called, after the |@EJB|, |@PersistenceContext| and |@Resource| attributes are initialized the container initializes the values of all injected fields. For each injected field, the container sets the value to the object returned by |Manager.getInstanceToInject()|.</text>
-    </assertion>
-    
-    <assertion id="k">
-      <text>When the |destroy()| method of a |Bean| object is called, the container calls the |@PreDestroy| method, if any</text>
-    </assertion>
-    
-    <assertion id="l">
-      <text>When the |destroy()| method of a |Bean| object is called, after the container calls the |@PreDestroy| method, it finally destroys dependent objects</text>
-    </assertion>
   </section>
   
-  <section id="6.5" title="Lifecycle of stateful session beans">
+  <section id="7.4" title="Lifecycle of stateless session and singleton beans">
     <assertion id="a">
-      <text>When the |create()| method of a |Bean| object that represents a stateful session bean that is called, the container creates and returns a session bean proxy, as defined in Section 3.3.9, "Session bean proxies".</text>
+      <text>When the |create()| method of a Bean object that represents a stateless session or singleton session bean is called, the container
+creates and returns a container-specific internal local reference to the session bean. This reference is not directly exposed to the application.</text>
     </assertion>
     
     <assertion id="b">
-      <text>When the |destroy()| method of a |Bean| object is called, the container removes the stateful session bean. The |@PreDestroy| callback must be invoked by the container</text>
+      <text>Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying session bean. This object must be passivation capable.</text>
     </assertion>
     
     <assertion id="c">
-      <text>If the underlying EJB was already removed by direct invocation of a remove method by the application, the container ignores the instance</text>
+      <text>When the |destroy()| method is called, the container simply discards this internal reference.</text>
     </assertion>
   </section>
   
-  <section id="6.6" title="Lifecycle of stateless session and singleton beans">
+  <section id="7.5" title="Lifecycle of producer methods">
     <assertion id="a">
-      <text>When the |create()| method of a |Bean| object that represents a stateless session or singleton session bean is called, the container creates and returns a session bean proxy, as defined in Section 3.3.9, "Session bean proxies".</text>
-    </assertion>
-    
-    <assertion id="b" testable="false">
-      <text>When the |destroy()| method of a |Bean| object is called, the container simply discards the proxy and all underlying EJB local object references</text>
-      <note>Untestable</note>
-    </assertion>
-  </section>
-  
-  <section id="6.7" title="Lifecycle of producer methods">
-    <assertion id="a">
       <text>Any Java object may be returned by a producer method. It is not required that the returned object be an instance of another bean</text>
     </assertion>
     
@@ -3260,30 +3200,10 @@
       <note>In other words the behaviour is unspecified</note>
     </assertion>
     
-    <assertion id="e">
-      <text>When the |create()| method of a |Bean| object that represents a producer method is called, the container must invoke the producer method, passing the object returned by  |Manager.getInstanceToInject()| to each parameter</text>
+    <assertion id="ea">
+      <text>When the create() method of a Bean object that represents a producer method is called, the container must invoke the producer method as defined by Section 5.4.6, "Invocation of producer or disposal methods". The return value of the producer method, after method interception completes, is the new contextual instance to be returned by |Bean.create()|.</text>
     </assertion>
     
-    <assertion id="f">
-      <text>If a producer method is static, the container must invoke the method</text>
-    </assertion>
-    
-    <assertion id="g">
-      <text>If a producer method is not static, the container must obtain the |Bean| object for the most specialized bean that specializes the bean which declares the producer method</text>
-    </assertion>
-    
-    <assertion id="h">
-      <text>If a producer method is not static, after obtaining the most specialized |Bean| object the container must obtain an instance of the most specialized bean, by calling |Manager.getInstance()|, passing the |Bean| object representing the bean</text>
-    </assertion>
-    
-    <assertion id="i">
-      <text>If a producer method is not static, after obtaining an instance of the most specialized bean the container must invoke the producer method upon this instance</text>
-    </assertion>
-    
-    <assertion id="j">
-      <text>The return value of the producer method, after method interception completes, is the new contextual instance to be returned by |Bean.create()|</text>
-    </assertion>
-    
     <assertion id="k">
       <text>If the producer method returns a null value and the producer method bean has the scope |@Dependent|, the |create()| method returns a null value</text>
     </assertion>
@@ -3292,32 +3212,17 @@
       <text>If the producer method returns a null value, and the scope of the producer method is not |@Dependent|, the |create()| method throws an |IllegalProductException|</text>
     </assertion>
     
-    <assertion id="m">
-      <text>When the |destroy()| method is called, and if there is a disposal method for this producer method, the container must invoke the disposal method, passing the instance given to |destroy()| to the disposed parameter, and the object returned by |Manager.getInstanceToInject()| to each of the other parameters</text>
+    <assertion id="ma">
+      <text>When the destroy() method is called, and if there is a disposal method for this producer method, the container must invoke
+the disposal method as defined by Section 5.4.6, "Invocation of producer or disposal methods", passing the instance given to |destroy()| to the disposed parameter.</text>
     </assertion>
-    
-    <assertion id="n">
-      <text>If a disposal method is static, the container must invoke the method</text>
-    </assertion>
-    
-    <assertion id="o">
-      <text>If a disposal method is non-static, the container must obtain the |Bean| object for the most specialized bean that specializes the bean which declares the disposal method</text>
-    </assertion>
-    
-    <assertion id="p">
-      <text>If a disposal method is non-static, after obtaining the |Bean| object for the most specialized bean, the container must obtain an instance of the most specialized bean, by calling |Manager.getInstance()|, passing the |Bean| object representing the bean</text>
-    </assertion>
-    
-    <assertion id="q">
-      <text>If a disposal method is non-static, after obtaining the instance of the most specialized bean the container must invoke the disposal method upon this instance</text>
-    </assertion>
-    
+       
     <assertion id="r">
       <text>Finally, the container destroys dependent objects</text>
-    </assertion>
+    </assertion>    
   </section>
-  
-  <section id="6.8" title="Lifecycle of producer fields">
+
+  <section id="7.6" title="Lifecycle of producer fields">
     <assertion id="a">
       <text>Any Java object may be the value of a producer field</text>
     </assertion>
@@ -3346,108 +3251,53 @@
       <note>In other words the behaviour is unspecified</note>
     </assertion>
     
-    <assertion id="g">
-      <text>When the |create()| method of a |Bean| object that represents a producer field is called, the container must access the producer field to obtain the current value of the field</text>
+    <assertion id="ga">
+      <text>When the |create()| method of a |Bean| object that represents a producer field is called, the container must access the producer field as defined by Section 5.4.7, "Access to producer field values" to obtain the current value of the field. The value of the producer field is the new contextual instance to be returned by |Bean.create()|.</text>
     </assertion>
-    
-    <assertion id="h">
-      <text>If a producer field is static, the container must access the field value</text>
-    </assertion>
-    
-    <assertion id="i">
-      <text>If a producer field is non-static, the container must obtain the |Bean| object for the most specialized bean that specializes the bean which declares the producer field</text>
-    </assertion>
-    
-    <assertion id="j">
-      <text>If a producer field is non-static, after obtaining the |Bean| object for the most specialized bean the container must obtain an instance of the most specialized bean, by calling |Manager.getInstance()|, passing the |Bean| object representing the bean</text>
-    </assertion>
-    
-    <assertion id="k">
-      <text>If a producer field is non-static, after obtaining an instance of the most specialized bean, the container must access the field value of this instance</text>
-    </assertion>
-    
-    <assertion id="l">
-      <text>The value of the producer field is the new contextual instance to be returned by |Bean.create()|</text>
-    </assertion>
-    
+        
     <assertion id="m">
       <text>If the producer field contains a null value and the producer field bean has the scope |@Dependent|, the create() method returns a null value</text>
     </assertion>
     
     <assertion id="n">
       <text>If the producer field contains a null value, and the scope of the producer method is not |@Dependent|, the |create()| method throws an |IllegalProductException|</text>
-    </assertion>
+    </assertion>    
   </section>
   
   <section id="6.9" title="Lifecycle of resources">
-    <assertion id="a" testable="false">
-      <text>An instance of a resource is a proxy object, provided by the container, that implements the declared bean type, delegating the actual implementation of the methods directly to the underlying Java EE resource, entity manager, entity manager factory, EJB remote object or web service referenc</text>
+    <assertion id="l">
+      <text>When the |create()| method of a |Bean| object that represents a resource is called, the container creates and returns a container-
+specific internal reference to the Java EE component environment resource, entity manager, entity manager factory, remote EJB instance or web service reference. This reference is not directly exposed to the application./text>
     </assertion>
     
-    <assertion id="b">
-      <text>A resource proxy object is a dependent object of the object it is injected into</text>
+    <assertion id="m">
+      <text>Before injecting or returning a contextual instance to the application, the container transforms its internal reference into an object that implements the bean types expected by the application and delegates method invocations to the underlying resource, entity manager, entity manager factory, remote EJB instance or web service reference. This object must be passivation capable.</text>
     </assertion>
     
-    <assertion id="c">
-      <text>Resource proxy objects are serializable</text>
+    <assertion id="n">
+      <text>When the |destroy()| method is called, the container discards this internal reference.</text>
     </assertion>
-    
-    <assertion id="d">
-      <text>When the |create()| method of a |Bean| object that represents a JMS resource is called, the container creates and returns a proxy object that implements the bean type of the resource</text>
-    </assertion>
-    
-    <assertion id="e">
-      <text>The methods of this proxy object delegate to the underlying implementation, which is obtained using the metadata provided in the resource declaration</text>
-    </assertion>
-    
-    <assertion id="f">
-      <text>A Java EE resource is obtained using the JNDI name or mapped name specified by |&lt;Resource&gt;|</text>
-    </assertion>
-    
-    <assertion id="g">
-      <text>A persistence context is obtained using the persistence unit name specified by |&lt;PersistenceContext&gt;|</text>
-    </assertion>
-    
-    <assertion id="h">
-      <text>A persistence unit is obtained using the persistence unit name specified by |&lt;PersistenceUnit&gt;|</text>
-    </assertion>
-    
-    <assertion id="i">
-      <text>A remote EJB is obtained using the JNDI name, mapped name or EJB link specified by |&lt;EJB&gt;|</text>
-    </assertion>
-    
-    <assertion id="j">
-      <text>A web service is obtained using the JNDI name or mapped name specified by |&lt;WebServiceRef&gt;|</text>
-    </assertion>
-    
-    <assertion id="k">
-      <text>When the |destroy()| method is called, the container discards the proxy object</text>
-    </assertion>
   </section>
   
-  <section id="6.10" title="Lifecycle of JMS resources">
+  <section id="7.8" title="Lifecycle of message destinations">
     <assertion id="a" testable="false">
-      <text>An instance of a JMS resource is a proxy object, provided by the container, that implements all the bean types defined in Section 3.7, "JMS resources", delegating the actual implementation of these methods directly to the underlying JMS objects</text>
+  <text>An instance of a message destination is a proxy object, provided by the container, that implements all the bean types defined in Section 3.7, "JMS resources", delegating the actual implementation of these methods directly to the underlying JMS objects.  This proxy must be passivation capable.</text>
     </assertion>
     
     <assertion id="b">
-      <text>A JMS resource proxy object is a dependent object of the object it is injected into</text>
+      <text>A message destination resource proxy object is a dependent object of the object it is injected into.</text>
     </assertion>
     
-    <assertion id="c">
-      <text>JMS resource proxy objects are serializable</text>
+    <assertion id="da">
+      <text>When the |create()| method of a |Bean| object that represents a message destination is called, the container creates and returns a proxy object.</text>
     </assertion>
     
-    <assertion id="d">
-      <text>When the |create()| method of a |Bean| object that represents a JMS resource is called, the container creates and returns a proxy object that implements all the bean types of the JMS resource</text>
-    </assertion>
-    
     <assertion id="e">
-      <text>The methods of this proxy object delegate to JMS objects obtained as needed using the metadata provided by the JMS resource declaration and using standard JMS APIs</text>
+      <text>The methods of this proxy object delegate to JMS objects obtained as needed using the metadata provided by the message destination declaration.</text>
     </assertion>
     
     <assertion id="f">
-      <text>The Destination is obtained using the JNDI name or mapped name specified by |&lt;Resource&gt;|</text>
+      <text>The Destination is obtained using the JNDI name or mapped name specified by |@Resource|.</text>
     </assertion>
     
     <assertion id="g">
@@ -3499,43 +3349,11 @@
     </assertion>
     
     <assertion id="s">
-      <text>The |close()| method of a JMS resource proxy object always throws an |UnsupportedOperationException|</text>
+      <text>The |close()| method of a message destination proxy object always throws an |UnsupportedOperationException|.</text>
     </assertion>
     
   </section>
   
-  <section id="6.11" title="Lifecycle of EJBs">
-    <assertion id="a">
-      <text>When the EJB container creates a new instance of an EJB, after Java EE injection has been performed and before the |@PostConstruct| callback occurs the container must initialize the values of all injected fields .  For each injected field, the container sets the value to the object returned by |Manager.getInstanceToInject()|</text>
-    </assertion>
-    
-    <assertion id="c">
-      <text>When the EJB container creates a new instance of an EJB, after Java EE injection has been performed and before the |@PostConstruct| callback occurs the container calls all initializer methods. For each initializer method parameter, the container passes the object returned by |Manager.getInstanceToInject()|</text>
-    </assertion>
-    
-    <assertion id="f">
-      <text>When the EJB container removes an instance of an EJB, the container destroys all dependent objects, after the |@PreDestroy| callback completes</text>
-    </assertion>
-  </section>
-  
-  <section id="6.12" title="Lifecycle of servlets">
-    <assertion id="a">
-      <text>When the servlet container creates a new instance of a servlet, the container initializes the values of all injected fields. For each injected field, the container sets the value to the object returned by |Manager.getInstanceToInject()|</text>
-    </assertion>
-    
-    <assertion id="b">
-      <text>When the servlet container creates a new instance of a servlet, the container calls all initializer methods. For each initializer method parameter, the container passes the object returned by |Manager.getInstanceToInject()|</text>
-    </assertion>
-    
-    <assertion id="c">
-      <text>When the servlet container destroys a servlet, the container destroys all dependent objects</text>
-    </assertion>
-    
-    <assertion id="d" testable="false">
-      <text>In a Java EE 5 environment, the container is not required to support injected fields or initializer methods of servlets</text>
-    </assertion>
-  </section>
-  
   <section id="7" title="Events">
   
   </section>




More information about the weld-commits mailing list