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

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Feb 15 22:14:56 EST 2009


Author: shane.bryzak at jboss.com
Date: 2009-02-15 22:14:56 -0500 (Sun, 15 Feb 2009)
New Revision: 1534

Modified:
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
completed chapter 8 assertions

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-16 02:53:34 UTC (rev 1533)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-16 03:14:56 UTC (rev 1534)
@@ -2184,8 +2184,326 @@
   </section>
   
   <section id="8.4" title="Passivating scopes and serialization">
+    <assertion id="a">
+      <text>The container must validate that every bean declared with a passivating scope truly is serializable - EJB local objects are serializable. Therefore, a session bean may declare any passivating scope</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>Simple beans are not required to be serializable. If a simple bean declares a passivating scope, and the bean class is not serializable, a DefinitionException is thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>If a producer method or field declares a passivating scope and returns a non-serializable object at runtime, an IllegalProductException is thrown by the container</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>The built-in session and conversation scopes are passivating</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>No other built-in scope besides session and conversation scopes are passivating</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>A contextual instance of a bean may be serialized when the bean declares a passivating scope, and context passivation occurs</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>A contextual instance of a bean may be serialized when the bean is an EJB stateful session bean, and it is passivated by the EJB container</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>In either case of assertion f or g above, any non-transient field that holds a reference to another bean must be serialized along with the bean that is
+being serialized. Therefore, the reference must be to a serializable type</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>Any reference to a bean which declares a normal scope is serializable</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>Dependent objects (including interceptors and decorators with scope @Dependent) of a stateful session bean or of a bean with a passivating scope must be serialized and deserialized along with their owner - EJB local objects are serializable. Therefore, any reference to a session bean of scope @Dependent is serializable</text>
+    </assertion>
+    
+    <assertion id="k">
+      <text>Dependent objects (including interceptors and decorators with scope @Dependent) of a stateful session bean or of a bean with a passivating scope must be serialized and deserialized along with their owner - A simple bean of scope @Dependent may or may not be serializable. If a simple bean of scope @Dependent and a nonserializable bean class is injected into a stateful session bean, into a non-transient field, bean constructor parameter or initializer method parameter of a bean which declares a passivating scope, or into a parameter of a producer method
+which declares a passivating scope, an UnserializableDependencyException must be thrown by the container at deployment time</text>
+    </assertion>
+    
+    <assertion id="l">
+      <text>Dependent objects (including interceptors and decorators with scope @Dependent) of a stateful session bean or of a bean with a passivating scope must be serialized and deserialized along with their owner - If a producer method or field of scope @Dependent returns a non-serializable object for injection into a stateful session bean, into a non-transient field, bean constructor parameter or initializer method parameter of a bean which declares a passivating scope, or into a parameter of a producer method which declares a passivating scope, an  IllegalProductException is thrown by the container</text>
+    </assertion>
+    
+    <assertion id="m">
+      <text>Dependent objects (including interceptors and decorators with scope @Dependent) of a stateful session bean or of a bean with a passivating scope must be serialized and deserialized along with their owner - The container must guarantee that JMS resource proxy objects are serializable</text>
+    </assertion>
+    
+    <assertion id="n">
+      <text>The method Bean.isSerializable() may be used to detect if a bean is serializable</text>
+    </assertion>
+  </section>
   
+  <section id="8.5" title="Context management for built-in scopes">
+  
+    <assertion id="a">
+      <text>The container provides an implementation of the Context interface for each of the built-in scopes</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>For each of the built-in normal scopes, contexts propagate across any Java method call, including invocation of EJB local business methods</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>The built-in contexts do not propagate across remote method invocations or to asynchronous processes such as JMS message listeners or EJB timer service timeouts</text>
+    </assertion>
+  
   </section>
   
+  <section id="8.5.1" title="Request context lifecycle">
+  
+    <assertion id="a">
+      <text>The request scope is active during the service() method of any servlet in the web application</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>The request scope is active during the doFilter() method of any servlet filter</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>The request context is destroyed at the end of the servlet request, after the service() method and all doFilter() methods return</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>The request scope is active during any Java EE web service invocation</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>The request context is destroyed after a web service invocation completes</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>The request scope is active during any asynchronous observer method notification</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>The request context is destroyed after a asynchronous observer method notification completes</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>The request scope is active during any remote method invocation of any EJB</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>The request scope is active during any call to an EJB timeout method</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>The request scope is active during message delivery to any EJB message-driven bean</text>
+    </assertion>
+    
+    <assertion id="k">
+      <text>The request context is destroyed after the remote EJB method invocation completes</text>
+    </assertion>
+    
+    <assertion id="l">
+      <text>The request context is destroyed after the invocation of an EJB timeout method</text>
+    </assertion>
+    
+    <assertion id="m">
+      <text>The request context is destroyed after message delivery to an EJB message-drive bean completes</text>
+    </assertion>
+  </section>
+  
+  <section id="8.5.2" title="Session context lifecycle">
+  
+    <assertion id="a">
+      <text>The session scope is active during the service() method of any servlet in the web application</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>The session scope is active during the doFilter() method of any servlet filter</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>The session context is shared between all servlet requests that occur in the same HTTP servlet session</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>The session context is destroyed when the HTTPSession is invalidated</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>The session context is destroyed when the HTTPSession times out</text>
+    </assertion>
+  </section>
+  
+  <section id="8.5.3" title="Application context lifecycle">
+  
+    <assertion id="a">
+      <text>The application scope is active during the service() method of any servlet in the web application</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>The application scope is active during the doFilter() method of any servlet filter</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>The application scope is active during any Java EE web service invocation</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>The application scope is active during any asynchronous observer method notification</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>The application scope is active during any remote method invocation of any EJB</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>The application scope is active during any call to an EJB timeout method</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>The application scope is active during message delivery to any EJB message-driven bean</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>The application context is shared between all servlet requests that execute within the same application</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>The application context is shared between all asynchronous observer method notifications that execute within the same application</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>The application context is shared between all web service invocations that execute within the same application</text>
+    </assertion>
+    
+    <assertion id="k">
+      <text>The application context is shared between all EJB remote method invocations that execute within the same application</text>
+    </assertion>
+    
+    <assertion id="l">
+      <text>The application context is shared between all EJB timeouts that execute
+within the same application</text>
+    </assertion>
+    
+    <assertion id="m">
+      <text>The application context is shared between all message deliveries to message driven beans that execute within the same application</text>
+    </assertion>
+    
+    <assertion id="n">
+      <text>The application context is destroyed when the application is undeployed</text>
+    </assertion>
+  </section>
+  
+  <section id="8.5.4" title="Conversation context lifecycle">
+  
+    <assertion id="a">
+      <text>For a JSF faces request, the conversation context is active from the beginning of the apply request values phase, until the response is complete</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>For a JSF non-faces request, the context is active during the render response phase</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>Any JSF request has exactly one associated conversation</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>The conversation associated with a JSF request is determined at the end of the restore view phase and does not change during the request</text>
+    </assertion>
+    
+    <assertion id="e">
+      <text>By default, a conversation is transient</text>
+    </assertion>
+    
+    <assertion id="f">
+      <text>A transient conversation may be marked long-running by calling Conversation.begin()</text>
+    </assertion>
+    
+    <assertion id="g">
+      <text>A long-running conversation may be marked transient by calling Conversation.end()</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>All long-running conversations have a string-valued unique identifier, which may be set by the application when the conversation is marked long-running, or generated by the container</text>
+    </assertion>
+    
+    <assertion id="i">
+      <text>The container provides a built-in bean with bean type javax.context.Conversation, scope @RequestScoped, deployment type @Standard and binding @Current, named javax.context.conversation</text>
+    </assertion>
+    
+    <assertion id="j">
+      <text>If the conversation associated with the current JSF request is in the transient state at the end of a JSF request, it is destroyed, and the conversation context is also destroyed</text>
+    </assertion>
+    
+    <assertion id="k">
+      <text>If the conversation associated with the current JSF request is in the long-running state at the end of a JSF request, it is not destroyed</text>
+    </assertion>
+    
+    <assertion id="l">
+      <text>The long-running conversation context associated with a request that renders a JSF view is automatically propagated to any faces request (JSF form submission) that originates from that rendered page</text>
+    </assertion>
+    
+    <assertion id="m">
+      <text>The long-running conversation context associated with a request that renders a JSF view is automatically propagated to any faces request (JSF form submission) that originates from that rendered page</text>
+    </assertion>
+    
+    <assertion id="n">
+      <text>The long-running conversation associated with a request may be propagated to any non-faces request via use of a GET request parameter named cid containing the unique identifier of the conversation. In this case, the application must manage this request parameter</text>
+    </assertion>
+    
+    <assertion id="o">
+      <text>When no conversation is propagated to a JSF request, the request is associated with a new transient conversation</text>
+    </assertion>
+    
+    <assertion id="p">
+      <text>All long-running conversations are scoped to a particular HTTP servlet session and may not cross session boundaries</text>
+    </assertion>
+    
+    <assertion id="q">
+      <text>When the HTTP servlet session is invalidated, all long-running conversation contexts created during the current session are destroyed</text>
+    </assertion>
+    
+    <assertion id="r">
+      <text>The container is permitted to arbitrarily destroy any long-running conversation that is associated with no current JSF request, in order to conserve resources</text>
+    </assertion>
+    
+    <assertion id="s">
+      <text>If the propagated conversation cannot be restored, the request is associated with a new transient conversation</text>
+    </assertion>
+    
+    <assertion id="t">
+      <text>The method Conversation.setTimeout() is a hint to the container that a conversation should not be destroyed if it has been active within the last given interval in milliseconds</text>
+    </assertion>
+    
+    <assertion id="u">
+      <text>The container ensures that a long-running conversation may be associated with at most one request at a time, by blocking or rejecting concurrent requests</text>
+    </assertion>
+  </section>
+  
+  <section id="8.6" title="Context management for custom scopes">
+  
+    <assertion id="a">
+      <text>A custom implementation of Context may be associated with any scope type at any point in the execution of the application, by calling Manager.addContext()</text>
+    </assertion>
+    
+    <assertion id="b">
+      <text>Every time Manager.getInstance() is called, for example, during instance or EL name resolution, the container must call Manager.getContext() to retrieve an active context object associated with the bean scope</text>
+    </assertion>
+    
+    <assertion id="c">
+      <text>If no active context object exists for the given scope type,
+Manager.getContext() must throw a ContextNotActiveException</text>
+    </assertion>
+    
+    <assertion id="d">
+      <text>If more than one active context object exists for the given
+scope type, Manager.getContext() must throw an IllegalStateException</text>
+    </assertion>
+  </section>
+  
 
 </specification>




More information about the weld-commits mailing list