[webbeans-commits] Webbeans SVN: r2757 - tck/trunk/impl/src/main/resources.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Thu Jun 4 11:58:03 EDT 2009
Author: shane.bryzak at jboss.com
Date: 2009-06-04 11:58:03 -0400 (Thu, 04 Jun 2009)
New Revision: 2757
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
section 6 assertions updated
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-06-03 23:00:24 UTC (rev 2756)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-06-04 15:58:03 UTC (rev 2757)
@@ -2518,6 +2518,572 @@
<text>For each distinct name that appears in the EL expression, the resolver must be called at most once. Even if a name appears more than once in the same expression, the container may not call the resolver multiple times with that name. This restriction ensures that there is a unique instance of each bean with scope |@Dependent| in any EL evaluation.</text>
</assertion>
</section>
+
+ <section id="6" title="Scopes and contexts">
+
+ </section>
+
+ <section id="6.1" title="The Contextual interface">
+ <assertion id="a">
+ <text>The container and portable extensions may define implementations of the Contextual interface that do not extend |Bean|, but it is not recommended that applications directly implement |Contextual|.</text>
+ </assertion>
+ </section>
+
+ <section id="6.1.1" title="Instance creation">
+ <assertion id="a">
+ <text>The |Contextual.create()| method is responsible for creating new contextual instances of the type.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If any exception occurs while creating an instance, the exception is rethrown by the |create()| method. If the exception is a checked exception, it is wrapped and rethrown as an (unchecked) |CreationException|.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The interface |javax.enterprise.context.spi.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>
+ </assertion>
+
+ <assertion id="d">
+ <text>The method |push()| registers the incompletely initialized instance.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If |create()| calls |CreationalContext.push()|, it must also return the instance passed to |push()|.</text>
+ </assertion>
+ </section>
+
+ <section id="6.1.2" title="Instance destruction">
+ <assertion id="a">
+ <text>The |Contextual.destroy()| method is responsible for destroying instances of the type. In particular, it is responsible for destroying all dependent objects of an instance, as defined in Section 6.4.3, "Dependent object destruction". If any exception occurs while destroying an instance, the exception is caught by the |destroy()| method.</text>
+ </assertion>
+ </section>
+
+ <section id="6.2" title="The Context interface">
+ <assertion id="ha">
+ <text>When a context object is active the |isActive()| method returns |true|. Otherwise, we say that the context object is inactive and the |isActive()| method returns false.</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>The |Context.get()| method may either return an existing instance of the given contextual type, ~or if no |CreationalContext| is given, return a null value, or if a |CreationalContext| is given, create a new instance of the given contextual type by calling |Contextual.create() and return the new instance~.</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>The |Context.get()| method may either ~return an existing instance of the given contextual type~, or if no |CreationalContext| is given, return a null value, ~or if a |CreationalContext| is given, create a new instance of the given contextual type by calling |Contextual.create() and return the new instance~.</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>The |Context.get()| method may either ~return an existing instance of the given contextual type, or if no |CreationalContext| is given, return a null value~, or if a |CreationalContext| is given, create a new instance of the given contextual type by calling |Contextual.create() and return the new instance.</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>If the context object is inactive, the |get()| method must throw a |ContextNotActiveException|.</text>
+ </assertion>
+
+ <assertion id="n">
+ <text>The |get()| method may not return a null value unless no |CreationalContext| is given, or |Contextual.create()| returns a null value.</text>
+ </assertion>
+
+ <assertion id="o">
+ <text>The |get()| method may not create a new instance of the given contextual type unless a |CreationalContext| is given.</text>
+ </assertion>
+
+ <assertion id="p">
+ <text>The context object is responsible for destroying any contextual instance it creates by passing the instance to the |destroy()|
+method of the Contextual object representing the contextual type. A destroyed instance must not subsequently be returned by the |get()| method.</text>
+ </assertion>
+ </section>
+
+ <section id="6.3" title="Normal scopes and pseudo-scopes">
+ <assertion id="a" testable="false">
+ <text>There may be no more than one mapped instance of a context object per contextual type per thread</text>
+ <note>Not testable through API</note>
+ </assertion>
+
+ <assertion id="b" testable="false">
+ <text>A context may be associated with one or more threads</text>
+ <note>A statement of intent</note>
+ </assertion>
+
+ <assertion id="c">
+ <text>The |get()| operation of the |Context| object for an active normal scope returns the current instance of the given contextual type</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>When a context is destroyed, all mapped instances belonging to that context are destroyed by passing them to the |Contextual.destroy()| method.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>Contexts with normal scopes must obey the following rule: Suppose beans A, B and Z all have normal scopes. Suppose A has an injection point x, and B has an injection point y. Suppose further that both x and y resolve to bean Z according to the typesafe resolution algorithm. If a is the current instance of A, and b is the current instance of B, then both a.x and b.y refer to the same instance of Z. This instance is the current instance of Z.</text>
+ </assertion>
+
+ <assertion id="f" testable="false">
+ <text>All pseudo-scopes must be explicitly declared |@ScopeType(normal=false)|, to indicate to the container that no client proxy is required</text>
+ <note>A statement of intent</note>
+ </assertion>
+
+ <assertion id="g" testable="false">
+ <text>All scopes defined by this specification, except for the |@Dependent| pseudo-scope, are normal scopes</text>
+ <note>A statement of intent</note>
+ </assertion>
+ </section>
+
+ <section id="6.4" title="Dependent pseudo-scope">
+ <assertion id="a">
+ <text>When a bean is declared to have |@Dependent| scope, no injected instance of the bean is ever shared between multiple injection points</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When a bean is declared to have |@Dependent| scope, any injected instance of the bean is bound to the lifecycle of the bean, servlet or EJB into which it is injected</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that is used to evaluate a Unified EL expression exists to service that evaluation only</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a producer method, producer field, disposal method or observer method invocation exists to service that invocation only</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>Every invocation of the |get()| operation of the |Context| object for the |@Dependent| scope with a |CreationalContext| returns a new instance of the given bean</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>Every invocation of the |get()| operation of the |Context| object for the |@Dependent| scope with no |CreationalContext| returns a null value</text>
+ </assertion>
+ </section>
+
+ <section id="6.4.1" title="Dependent scope lifecycle">
+ <assertion id="g">
+ <text>The |@Dependent| scope is inactive except when an instance of a bean with scope |@Dependent| is created by the container to receive a producer method, producer field, disposal method or observer method invocation</text>
+ <note>Assertions g through k are all related and should be treated as "or" conditions</note>
+ </assertion>
+
+ <assertion id="h">
+ <text>The |@Dependent| scope is inactive except while a Unified EL expression is evaluated</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>The |@Dependent| scope is inactive except while an observer method is invoked</text>
+ </assertion>
+
+ <assertion id="ja">
+ <text>The |@Dependent| scope is inactive except when the container is creating or destroying a contextual instance of a bean, injecting its dependencies, invoking its observer methods, or invoke its |@PostConstruct| or |@PreDestroy| callback.</text>
+ </assertion>
+
+ <assertion id="ka">
+ <text>The |@Dependent| scope is inactive except when the container is injecting dependencies or invoking the |@PostConstruct| or |@PreDestroy| callback of a Java EE component class supporting injection.</text>
+ </assertion>
+
+ <assertion id="la">
+ <text>The |@Dependent| scope is inactive except when |Instance.get()|, |Instance.iterator()| or |BeanManager.getReference()| is invoked upon an instance of |Instance| or |BeanManager| injected by the container into a bean or other Java EE component class supporting injection.</text>
+ </assertion>
+
+ <assertion id="n">
+ <text>The |@Dependent| scope is not active when |Instance.get()|, |Instance.iterator()| or |BeanManager.getReference()| is invoked upon an instance of |Instance| or |BeanManager| that was not injected by the container.</text>
+ </assertion>
+ </section>
+
+ <section id="6.4.2" title="Dependent objects">
+ <assertion id="a">
+ <text>Instances of interceptors or decorators with scope |@Dependent| are dependent objects of the bean instance they intercept or decorate.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>An instance of a bean with scope |@Dependent| injected into a field, bean constructor, initializer method or observer method is a dependent object of the bean or Java EE component class instance into which it was injected.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>An instance of a bean with scope |@Dependent| injected into a producer method or disposal method is a dependent object of the producer method bean instance that is being produced or disposed.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>An instance of a bean with scope |@Dependent| obtained by direct invocation of |BeanManager| or |Instance| during invocation of a bean constructor, initializer method, observer method, |@PostConstruct| or |@PreDestroy| callback is a dependent object of the bean or Java EE component class instance upon which the method is being invoked.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>An instance of a bean with scope |@Dependent| obtained by direct invocation of |BeanManager| or |Instance| during invocation of a producer method or disposal method is a dependent object of the producer method bean instance that is being produced or disposed.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>Otherwise, an instance of a bean with scope |@Dependent| obtained by direct invocation of an instance of |Instance| or |BeanManager| that was injected by the container into a bean or Java EE component class instance is a dependent object of the bean or Java EE component class instance. </text>
+ </assertion>
+ </section>
+
+ <section id="6.4.3" title="Dependent object destruction">
+ <assertion id="a">
+ <text>The container must destroy all dependent objects of a contextual bean instance when the instance is destroyed</text>
+ </assertion>
+
+ <assertion id="baa">
+ <text>The container must destroy all dependent objects of a non-contextual instance of a bean or instance of other Java EE component class when the instance is destroyed.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The container must destroy all |@Dependent| scoped contextual instances created during an EL expression evaluation when the evaluation completes</text>
+ </assertion>
+
+ <assertion id="da">
+ <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a producer method~, producer field, disposal method or observer method~ invocation when the invocation completes</text>
+ </assertion>
+
+ <assertion id="db">
+ <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a ~producer method,~ producer field~, disposal method or observer method~ invocation when the invocation completes</text>
+ </assertion>
+
+ <assertion id="dc">
+ <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a ~producer method, producer field,~ disposal method ~or observer method~ invocation when the invocation completes</text>
+ </assertion>
+
+ <assertion id="dd">
+ <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a ~producer method, producer field, disposal method or~ observer method invocation when the invocation completes</text>
+ </assertion>
+
+ <assertion id="e" testable="false">
+ <text>The container is permitted to destroy any |@Dependent| scoped contextual instance at any time if the instance is no Scopes and contexts longer referenced by the application (excluding weak, soft and phantom references)</text>
+ <note>In other words this is unspecified</note>
+ </assertion>
+ </section>
+
+ <section id="6.5" title="Contextual instances and contextual references">
+
+ </section>
+
+ <section id="6.5.1" title="The active context object for a scope">
+ <assertion id="a">
+ <text>From time to time, the container must obtain an active context object for a certain scope type. The container must search for an active instance of |Context| associated with the scope type. If no active context object exists for the scope type, the container throws a |ContextNotActiveException|.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If more than one active context object exists for the given scope type, the container must throw an |IllegalStateException|.</text>
+ </assertion>
+ </section>
+
+ <section id="6.5.2" title="Contextual instance of a bean">
+ <assertion id="a">
+ <text>From time to time, the container must obtain a contextual instance of a bean. The container must obtain the active context object for the bean scope, then obtain an instance of the bean by calling |Context.get()|, passing the |Bean| instance representing the bean and an instance of |CreationalContext|.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>From time to time, the container attempts to obtain a contextual instance of a bean that already exists, without creating a
+new contextual instance. The container must obtain the active context object for the bean scope, then obtain an instance of the bean by calling |Context.get()|, passing the |Bean| instance representing the bean without
+passing any instance of |CreationalContext|.</text>
+ </assertion>
+ </section>
+
+ <section id="6.5.3" title="Contextual reference for a bean">
+ <assertion id="a">
+ <text>If the bean has a normal scope and the given bean type cannot be proxied by the container, as defined in Section 5.3.1, "Unproxyable bean types", the container throws an |UnproxyableResolutionException|.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the bean has a normal scope, then the contextual reference for the bean is a client proxy, as defined in Section 5.3, "Client proxies", created by the container, that implements the given bean type and all bean types of the bean which are Java interfaces.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If the bean has a pseudo-scope, the container must obtain a contextual instance of the bean.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The container must ensure that every injection point of type |InjectionPoint| and binding |@Current| of any dependent object instantiated during this process receives an instance of |InjectionPoint| representing the injection point into which the dependent object will be injected, or a null value if it is not being injected into any injection point.</text>
+ </assertion>
+ </section>
+
+ <section id="6.5.4" title="Contextual 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="6.6" title="Passivation and passivating scopes">
+
+ </section>
+
+ <section id="6.6.1" title="Passivation capable beans">
+ <assertion id="a">
+ <text>As defined by the EJB specification, all stateful session beans are passivation capable. Stateless and singleton session beans are not passivation capable.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A managed bean is passivation capable if and only if the bean class is serializable.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A producer method is passivation capable if and only if it never returns a value which is not passivation capable at runtime. A producer method with a return type that implements or extends serializable is passivation capable. A producer method with a return type that is declared final and does not implement |Serializable| is not passivation capable.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A producer field is passivation capable if and only if it never refers to a value which is not passivation capable at runtime. A producer field with a type that implements or extends serializable is passivation capable. A producer field with a type that is declared |final| and does not implement serializable is not passivation capable.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>A custom implementation of Bean is passivation capable if |isPassivationCapable()| returns true.</text>
+ </assertion>
+ </section>
+
+ <section id="6.6.2" title="Passivation capable dependencies">
+ <assertion id="a">
+ <text>The container must guarantee that all session beans are passivation capable dependencies.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The container must guarantee that all beans with normal scope are passivation capable dependencies.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The container must guarantee that all passivation capable beans with scope |@Dependent| are passivation capable dependencies.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The container must guarantee that all resources and message destinations are passivation capable dependencies.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>The container must guarantee that the built-in beans of type |Instance|, |Event|, |InjectionPoint| and |BeanManager| are passivation capable dependencies.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>A custom implementation of |Bean| is a passivation capable dependency if |isPassivationCapable()| returns |true| or |getScopeType()| returns a normal scope type.</text>
+ </assertion>
+ </section>
+
+ <section id="6.6.3" title="Passivating scopes">
+
+
+ </section>
+
+ <section id="6.6.4" title="Validation of passivation capable beans and dependencies">
+ <assertion id="a">
+ <text>If a managed bean which declares a passivating scope is not passivation capable, or has a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If a stateful session bean has a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a producer method declares a passivating scope and the container is able to determine that it is not passivation capable by inspecting its return type, or has a parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If a producer field declares a passivating scope and the container is able to determine that it is not passivation capable by inspecting its type, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4,
+"Problems detected automatically by the container".</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If a producer method or field which declares a passivating scope returns an unserializable object at runtime, the container must
+throw an |IllegalProductException|.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If a producer method or field of scope |@Dependent| returns an unserializable object for injection into an injection point that requires a passivation capable dependency, the container must throw an |IllegalProductException|</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>For a custom implementation of |Bean|, the container calls |getInjectionPoints()| to determine the injection points, and
+|InjectionPoint.isTransient()| to determine whether the injected point is a transient field.</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>If a bean which declares a passivating scope type, or any stateful session bean, has a decorator which is not a passivation capable dependency, the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ </assertion>
+ </section>
+
+ <section id="6.7" title="Context management for built-in scopes">
+ <assertion id="a">
+ <text>The built-in context object is active during servlet, web service and EJB invocations, or in the case of the conversation context object, for JSF requests.</text>
+ </assertion>
+ </section>
+
+ <section id="6.7.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 and during the |doFilter()| method of any servlet filter.</text>
+ </assertion>
+
+ <assertion id="b">
+ <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="c">
+ <text>The request scope is active during any Java EE web service invocation.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The request context is destroyed after the web service invocation completes.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>The request scope is active during any asynchronous observer method notification.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>The request context is destroyed after the notification completes</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>The request scope is active during any remote method invocation of any EJB, during any asynchronous method invocation
+of any EJB, during any call to an EJB timeout method and during message delivery to any EJB message-driven bean.</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>The request context is destroyed after the remote method invocation, asynchronous method invocation, timeout or message delivery completes.</text>
+ </assertion>
+ </section>
+
+ <section id="6.7.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 and during the |doFilter()| method of any servlet filter.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The session context is shared between all servlet requests that occur in the same HTTP servlet session. The session context is destroyed when the |HTTPSession| is invalidated or times out.</text>
+ </assertion>
+ </section>
+
+ <section id="6.7.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 and during the |doFilter()| method of any servlet filter.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The application scope is active during any Java EE web service invocation.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The application scope is active during any asynchronous observer method notification.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The application scope is also active during any remote method invocation of any EJB, during any asynchronous method invocation of any EJB, during any call to an EJB timeout method and during message delivery to any EJB message-driven bean.</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>The application context is shared between all servlet requests, asynchronous observer method notifications, web service invocations, EJB remote method invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to message driven beans that execute within the same application.</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>The application context is destroyed when the application
+is undeployed.</text>
+ </assertion>
+ </section>
+
+ <section id="6.7.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="ha">
+ <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="hb">
+ <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="iaa">
+ <text>The container provides a built-in bean with bean type |Conversation|~, scope |@RequestScoped|, deployment type |@Standard| and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
+ </assertion>
+
+ <assertion id="ib">
+ <text>The container provides a built-in bean with ~bean type |Conversation|~, scope |@RequestScoped|~, deployment type |@Standard| and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
+ </assertion>
+
+ <assertion id="ic">
+ <text>The container provides a built-in bean with~ bean type |Conversation|, scope |@RequestScoped|,~ deployment type |@Standard|~ and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
+ </assertion>
+
+ <assertion id="id">
+ <text>The container provides a built-in bean with bean type ~|Conversation|, scope |@RequestScoped|, deployment type |@Standard| and~ binding |@Current|~, named |javax.enterprise.context.conversation|~</text>
+ </assertion>
+
+ <assertion id="ie">
+ <text>The container provides a built-in bean with bean type ~|Conversation|, scope |@RequestScoped|, deployment type |@Standard| and binding |@Current|,~ named |javax.enterprise.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 results in a JSF redirect (via a navigation rule) is automatically propagated to the resulting non-faces request, and to any other subsequent request to the same URL. This is accomplished via use of a GET request parameter named cid containing the unique identifier of the conversation</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" testable="false">
+ <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>
+ <note>In other words, this is unspecified</note>
+ </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" testable="false">
+ <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>
+ <note>Not required</note>
+ </assertion>
+
+ <assertion id="u" testable="false">
+ <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>
+ <note>Cannot test as their as what happens is not well defined</note>
+ </assertion>
+ </section>
+
+
+
+
+
<section id="6" title="Bean lifecycle">
<assertion id="a">
@@ -2585,7 +3151,6 @@
<assertion id="d">
<text>The |Contextual.create()| method injects any dependencies</text>
</assertion>
-
<assertion id="f">
<text>The |Contextual.create()| method calls the |@PostConstruct| method, if necessary</text>
@@ -3551,137 +4116,7 @@
</section>
- <section id="8.1" title="The Context interface">
-
- <assertion id="a">
- <text>The |get()| method of the |Context| object may return an existing instance of the given contextual type</text>
- </assertion>
-
- <assertion id="b">
- <text>The |get()| method of the |Context| object may return a null value if no |CreationalContext| is given</text>
- </assertion>
-
- <assertion id="c">
- <text>The |get()| method of the |Context| object may create a new instance of the given contextual type by calling |Contextual.create()| and return the new instance, if a |CreationalContext| is given</text>
- </assertion>
-
- <assertion id="d">
- <text>The |get()| method of a |Context| object may not return a null value unless no |CreationalContext| is given, or |Contextual.create()| returns a null value</text>
- </assertion>
-
- <assertion id="e">
- <text>The |get()| method of a |Context| object may not create a new instance of the given contextual type unless a |CreationalContext| is given</text>
- </assertion>
-
- <assertion id="f">
- <text>The |Context| implementation is responsible for destroying any contextual instance it creates by passing the instance to the |destroy()| method of the |Contextual| object representing the contextual type</text>
- </assertion>
-
- <assertion id="g">
- <text>A destroyed instance must not subsequently be returned by a |Context| object's |get()| method</text>
- </assertion>
-
- <assertion id="h">
- <text>When a scope is inactive, any invocation of the |get()| from the current thread upon the |Context| object for that scope results in a |ContextNotActiveException|</text>
- </assertion>
-
- <assertion id="i">
- <text>The |isActive()| method returns false when the scope of the context object is inactive, and true when it is active</text>
- </assertion>
-
- </section>
-
- <section id="8.2" title="Normal scopes and pseudo-scopes">
- <assertion id="a" testable="false">
- <text>There may be no more than one mapped instance of a context object per contextual type per thread</text>
- <note>Not testable through API</note>
- </assertion>
-
- <assertion id="b" testable="false">
- <text>A context may be associated with one or more threads</text>
- <note>A statement of intent</note>
- </assertion>
-
- <assertion id="c">
- <text>The |get()| operation of the |Context| object for an active normal scope returns the current instance of the given contextual type</text>
- </assertion>
-
- <assertion id="d">
- <text>When a context is destroyed, all mapped instances of contextual types with that scope are destroyed by passing them to the |Contextual.destroy()| method</text>
- </assertion>
-
- <assertion id="e">
- <text>Contexts with normal scopes must obey the following rule: Suppose beans A, B and Z all have normal scopes. Suppose A has an injection point x, and B has an injection point y. Suppose further that both x and y resolve to bean Z according to the typesafe resolution algorithm. If a is the current instance of A, and b is the current instance of B, then both a.x and b.y refer to the same instance of Z. This instance is the current instance of Z.</text>
- </assertion>
-
- <assertion id="f" testable="false">
- <text>All pseudo-scopes must be explicitly declared |@ScopeType(normal=false)|, to indicate to the container that no client proxy is required</text>
- <note>A statement of intent</note>
- </assertion>
-
- <assertion id="g" testable="false">
- <text>All scopes defined by this specification, except for the |@Dependent| pseudo-scope, are normal scopes</text>
- <note>A statement of intent</note>
- </assertion>
- </section>
-
- <section id="8.3" title="Dependent pseudo-scope">
-
- <assertion id="a">
- <text>When a bean is declared to have |@Dependent| scope, no injected instance of the bean is ever shared between multiple injection points</text>
- </assertion>
-
- <assertion id="b">
- <text>When a bean is declared to have |@Dependent| scope, any injected instance of the bean is bound to the lifecycle of the bean, servlet or EJB into which it is injected</text>
- </assertion>
-
- <assertion id="c">
- <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that is used to evaluate a Unified EL expression exists to service that evaluation only</text>
- </assertion>
-
- <assertion id="d">
- <text>When a bean is declared to have |@Dependent| scope, any instance of the bean that receives a producer method, producer field, disposal method or observer method invocation exists to service that invocation only</text>
- </assertion>
-
- <assertion id="e">
- <text>Every invocation of the |get()| operation of the |Context| object for the |@Dependent| scope with a |CreationalContext| returns a new instance of the given bean</text>
- </assertion>
-
- <assertion id="f">
- <text>Every invocation of the |get()| operation of the |Context| object for the |@Dependent| scope with no |CreationalContext| returns a null value</text>
- </assertion>
-
- <assertion id="g">
- <text>The |@Dependent| scope is inactive except when an instance of a bean with scope |@Dependent| is created by the container to receive a producer method, producer field, disposal method or observer method invocation</text>
- <note>Assertions g through k are all related and should be treated as "or" conditions</note>
- </assertion>
-
- <assertion id="h">
- <text>The |@Dependent| scope is inactive except while a Unified EL expression is evaluated</text>
- </assertion>
-
- <assertion id="i">
- <text>The |@Dependent| scope is inactive except while an observer method is invoked</text>
- </assertion>
-
- <assertion id="j">
- <text>The |@Dependent| scope is inactive except when the container is creating or destroying a contextual instance of a bean or injecting its dependencies</text>
- </assertion>
-
- <assertion id="k">
- <text>The |@Dependent| scope is inactive except when the container is injecting dependencies of an EJB</text>
- </assertion>
-
- <assertion id="l">
- <text>The |@Dependent| scope is inactive except when a |@PostConstruct| or |@PreDestroy| callback is invoked by the EJB container</text>
- </assertion>
-
- <assertion id="m">
- <text>The |@Dependent| scope is inactive except when the container is injecting dependencies of a servlet</text>
- </assertion>
-
- </section>
-
+
<section id="8.3.1" title="Dependent objects">
<assertion id="a" testable="false">
<text>A bean, EJB or servlet may obtain an instance of a bean with scope |@Dependent| via dependency injection or by calling |Manager.getInstance()|, |Manager.getInstanceByType()| or |Instance.get()| when the |@Dependent| scope is active</text>
@@ -3690,46 +4125,6 @@
</section>
- <section id="8.3.2" title="Dependent object destruction">
-
- <assertion id="a">
- <text>The container must destroy all dependent objects of a contextual bean instance when the instance is destroyed</text>
- </assertion>
-
- <assertion id="ba">
- <text>The container must destroy all dependent objects of an EJB ~or servlet~ when the EJB ~or servlet~ is destroyed</text>
- </assertion>
-
- <assertion id="bb">
- <text>The container must destroy all dependent objects of a~n EJB or~ servlet when the ~EJB or~ servlet is destroyed</text>
- </assertion>
-
- <assertion id="c">
- <text>The container must destroy all |@Dependent| scoped contextual instances created during an EL expression evaluation when the evaluation completes</text>
- </assertion>
-
- <assertion id="da">
- <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a producer method~, producer field, disposal method or observer method~ invocation when the invocation completes</text>
- </assertion>
-
- <assertion id="db">
- <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a ~producer method,~ producer field~, disposal method or observer method~ invocation when the invocation completes</text>
- </assertion>
-
- <assertion id="dc">
- <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a ~producer method, producer field,~ disposal method ~or observer method~ invocation when the invocation completes</text>
- </assertion>
-
- <assertion id="dd">
- <text>The container must destroy any |@Dependent| scoped contextual instance created to receive a ~producer method, producer field, disposal method or~ observer method invocation when the invocation completes</text>
- </assertion>
-
- <assertion id="e" testable="false">
- <text>The container is permitted to destroy any |@Dependent| scoped contextual instance at any time if the instance is no Scopes and contexts longer referenced by the application (excluding weak, soft and phantom references)</text>
- <note>In other words this is unspecified</note>
- </assertion>
- </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>
@@ -3990,118 +4385,8 @@
<assertion id="n">
<text>The application context is destroyed when the application is undeployed</text>
</assertion>
- </section>
+ </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="ha">
- <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="hb">
- <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="ia">
- <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="ib">
- <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="ic">
- <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="id">
- <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="ie">
- <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 results in a JSF redirect (via a navigation rule) is automatically propagated to the resulting non-faces request, and to any other subsequent request to the same URL. This is accomplished via use of a GET request parameter named cid containing the unique identifier of the conversation</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" testable="false">
- <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>
- <note>In other words, this is unspecified</note>
- </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" testable="false">
- <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>
- <note>Not required</note>
- </assertion>
-
- <assertion id="u" testable="false">
- <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>
- <note>Cannot test as their as what happens is not well defined</note>
- </assertion>
- </section>
-
<section id="8.6" title="Context management for custom scopes">
<assertion id="a">
More information about the weld-commits
mailing list