Chapter | Assertions | Testable | Total Tested | Tested (unimplemented) | Tested (implemented) | Coverage % |
---|---|---|---|---|---|---|
2 Bean definition | 124 | 106 | 95 | 1 | 94 | 88.68% |
3 Bean Implementation | 273 | 266 | 175 | 37 | 138 | 51.88% |
4 Inheritance, specialization and realization | 81 | 70 | 60 | 0 | 60 | 85.71% |
5 Lookup, dependency injection and EL resolution | 141 | 132 | 86 | 4 | 82 | 62.12% |
6 Bean lifecycle | 103 | 88 | 61 | 3 | 58 | 65.91% |
7 Events | 130 | 125 | 123 | 19 | 104 | 83.20% |
8 Scopes and contexts | 129 | 117 | 108 | 16 | 92 | 78.63% |
9 XML based metadata | 49 | 49 | 49 | 0 | 49 | 100.00% |
11 Packaging and Deployment | 55 | 53 | 18 | 0 | 18 | 33.96% |
Total | 1085 | 1006 | 775 | 80 | 695 | 69.09% |
Colour Key |
---|
Assertion is covered |
Assertion is not covered |
Assertion test is unimplemented |
Assertion is untestable |
For the purposes of the typesafe resolution algorithm defined in Section 5.9, "Typesafe resolution algorithm", parameterized bean types are considered identical by the container only if both the type and the type parameters (if any) are identical
Bean types may not declare a type variable. If the type of an injection point is a parameterized type with a type variable, a DefinitionException is thrown by the container at deployment time.
Bean types may not declare a wildcard. If the type of an injection point is a parameterized type with a wildcard, a DefinitionException is thrown by the container at deployment time.
A bean type may be an array type. Two array types are considered identical only if the element type is identical
All beans have the bean type java.lang.Object
Coverage
If a bean does not explicitly declare a binding, the bean has exactly one binding, of type @javax.inject.Current
Coverage
A binding type is a Java annotation defined as @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME).
A binding type is a Java annotation defined as @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME).
The @BindingType meta-annotation may be omitted, and the binding type may be declared in beans.xml
Coverage
No tests exist for this assertion
A binding type may define annotation members
Binding types may be applied to injected fields (see Section 3.8, "Injected fields") to determine the bean that is injected, according to the typesafe resolution algorithm defined in Section 5.9, "Typesafe resolution algorithm".
Binding types may be applied to parameters of producer methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container
Binding types may be applied to parameters of initializer methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container
Coverage
No tests exist for this assertion
Binding types may be applied to parameters of disposal methods (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container
Coverage
No tests exist for this assertion
Binding types may be applied to parameters of bean constructors (see Chapter 3, Bean implementation) to determine the bean instance that is passed when the method is called by the container
A scope type is represented by an annotation type.
The @RequestScoped, @ApplicationScoped and @SessionScoped annotations defined in Section 8.5, "Context management for built-in scopes" represent the standard scopes defined by the Java Servlets specification
The @ConversationScoped annotation represents the conversation scope defined in Section 8.5.4, "Conversation context lifecycle".
The @Dependent pseudo-scope is for dependent objects, as defined in Section 8.3, "Dependent pseudo-scope"
A scope type is a Java annotation defined as @Target({TYPE, METHOD, FIELD}) and @Retention(RUNTIME)
A bean class or producer method or field may specify at most one scope type annotation. If a bean class or producer method or field specifies multiple scope type annotations, a DefinitionException is thrown by the container at deployment time
If all stereotypes declared by the bean that have some declared default scope have the same default scope, then that scope is the default scope for the bean
If there are two different stereotypes declared by the bean that declare different default scopes, then there is no default scope and the bean must explicitly declare a scope. If it does not explicitly declare a scope, a DefinitionException is thrown by the container at deployment time
The set of deployment types is extensible
Application beans may be defined using the @Production deployment type
A deployment type is a Java annotation defined with @Retention(RUNTIME)
An bean class may specify at most one deployment type. If multiple deployment type annotations are specified, a DefinitionException is thrown by the container at deployment time.
A producer method may specify at most one deployment type. If multiple deployment type annotations are specified, a DefinitionException is thrown by the container at deployment time.
A field may specify at most one deployment type. If multiple deployment type annotations are specified, a DefinitionException is thrown by the container at deployment time.
By default, if no deployment type annotation is explicitly specified, a producer method inherits the deployment type of the bean in which it is defined.
By default, if no deployment type annotation is explicitly specified, a producer field inherits the deployment type of the bean in which it is defined.
The default deployment type for a bean which does not explicitly declare a deployment type depends upon its declared stereotypes - if a bean does not declare any stereotype with a declared default deployment type, then the default deployment type is @Production
Beans declared with a deployment type that is not enabled are not available to the resolution algorithms defined in Chapter 5, Lookup, dependency injection and EL resolution.
If the @Named annotation does not specify the value member, the default name is assumed
Coverage
A default name must be assigned by the container when a producer method of a bean defined using annotations declares a @Named annotation and no name is explicitly specified by the value member
A default name must be assigned by the container when a producer field of a bean defined using annotations declares a @Named annotation and no name is explicitly specified by the value member
A default name must be assigned by the container when a bean declares a stereotype that declares an empty @Named annotation, and the bean does not explicitly specify a name.
If neither <Named> nor @Named is specified, by the bean or its stereotypes, a bean has no name
A bean may declare zero stereotypes
A beans stereotype is a Java annotation defined as @Target({TYPE, METHOD, FIELD}), @Target(TYPE), @Target(METHOD), @Target(FIELD) or @Target({METHOD, FIELD}) and @Retention(RUNTIME)
A beans stereotype is a Java annotation defined as @Target({TYPE, METHOD, FIELD}), @Target(TYPE), @Target(METHOD), @Target(FIELD) or @Target({METHOD, FIELD}) and @Retention(RUNTIME)
A beans stereotype is a Java annotation defined as @Target({TYPE, METHOD, FIELD}), @Target(TYPE), @Target(METHOD), @Target(FIELD) or @Target({METHOD, FIELD}) and @Retention(RUNTIME)
A beans stereotype is a Java annotation defined as @Target({TYPE, METHOD, FIELD}), @Target(TYPE), @Target(METHOD), @Target(FIELD) or @Target({METHOD, FIELD}) and @Retention(RUNTIME)
A beans stereotype is a Java annotation defined as @Target({TYPE, METHOD, FIELD}), @Target(TYPE), @Target(METHOD), @Target(FIELD) or @Target({METHOD, FIELD}) and @Retention(RUNTIME)
The @Stereotype meta-annotation may be omitted, and the stereotype may be declared in beans.xml
Coverage
No tests exist for this assertion
A stereotype may not declare any binding annotation. If a stereotype declares a binding annotation, a DefinitionException is thrown by the container at deployment time
A stereotype may declare at most one scope. If a stereotype declares more than one scope, a DefinitionException is thrown by the container at deployment time
Coverage
A stereotype may declare at most one deployment type. If a stereotype declares more than one deployment type, a DefinitionException is thrown by the container at deployment time
A stereotype may declare an empty @Named annotation. If a stereotype declares a non-empty @Named annotation, a DefinitionException is thrown by the container at deployment time
Bean types may be restricted using a stereotype
Scope and type restrictions may not be specified when a stereotype is declared in XML
Coverage
No tests exist for this assertion
A stereotype may declare other stereotypes
Coverage
No tests exist for this assertion
Stereotype declarations are transitive - a stereotype declared by a second stereotype is inherited by all beans and other stereotypes that declare the second stereotype
Coverage
No tests exist for this assertion
Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target({TYPE, METHOD, FIELD})
Coverage
No tests exist for this assertion
Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target(METHOD)
Coverage
No tests exist for this assertion
Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target(FIELD)
Coverage
No tests exist for this assertion
Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target({METHOD, FIELD})
Coverage
No tests exist for this assertion
Stereotype annotations may be applied to a producer method
Coverage
Multiple stereotypes may be applied to the same bean
Coverage
If a stereotype declares a requiredType, and the bean types do not include the type, a DefinitionException is thrown by the container at deployment time
If a stereotype explicitly declares a set of scope types using supportedScopes, and the bean scope is not in that set, a DefinitionException is thrown by the container at deployment time
Coverage
If a bean declares multiple stereotypes, it must satisfy every restriction declared by every declared stereotype
Coverage
The built-in @Model stereotype is intended for use with beans that define the model layer of an MVC web application architecture such as JSF
If the application calls a producer method directly, instead of letting the container call it, the returned object is not a contextual instance and the capabilities listed in Section 2.1, "Functionality provided by the container to the bean" will not be available to the returned object.
If a simple bean with a public field declares any scope other than @Dependent, a DefinitionException is thrown by the container at deployment time.
A top-level Java class is not a simple bean if it is annotated with any of the EJB component-defining annotations
A top-level Java class is not a simple bean if it is declared as a JPA entity in orm.xml
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has the same bean class.
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has the same bean constructor defined by annotations.
Coverage
No tests exist for this assertion
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has the same bean initializer methods defined by annotations.
Coverage
No tests exist for this assertion
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has the same injected fields defined by annotations.
Coverage
No tests exist for this assertion
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has scope @Dependent.
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has deployment type @Standard.
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has @javax.inject.New as the only binding.
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has no bean name.
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has no stereotypes.
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has no observer methods.
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has no producer methods.
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has no producer fields.
Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such simple bean, a second simple bean exists which has no disposal methods.
The bean constructor may be identified by annotating the constructor @Initializer
If a simple bean defined using annotations does not explicitly declare a constructor using @Initializer, the constructor that accepts no parameters is the bean constructor
If a simple bean defined using annotations has more than one constructor annotated @Initializer, a DefinitionException is thrown by the container at deployment time
If a bean constructor has a parameter annotated @Disposes, a DefinitionException is thrown by the container at deployment time
If a bean constructor has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time
If the bean constructor has parameters, the container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each parameter and calls the constructor with those parameter values.
If a bean class of a simple bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another simple bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.
Coverage
If the bean class of X does not directly extend the bean class of another simple bean, a DefinitionException is thrown by the container at deployment time.
Coverage
No tests exist for this assertion
A session bean is a bean that is implemented by an EJB 3-style session bean
A singleton bean must belong to either the @ApplicationScoped scope or to the @Dependent pseudo-scope
If a session bean specifies an illegal scope, a DefinitionException is thrown by the container at deployment time
Coverage
If a session bean is a stateful session bean, and the scope is @Dependent, the application may call any EJB remove method of an instance of the session bean.
If a session bean is a stateful session bean, and the scope is not @Dependent, the application may not directly call any EJB remove method of any instance of the session bean
If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and declares any scope other than @Dependent, an UnsupportedOperationException is thrown
If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and has scope @Dependent then no parameters are passed to the method by the container.
If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and has scope @Dependent then the container ignores the instance instead of destroying it when Bean.destroy() is called, as defined in Section 6.5, "Lifecycle of stateful session beans"
All session beans exposing an EJB 3.x client view and declared via an EJB component defining annotation on the EJB bean class are beans, and thus no special declaration is required. Additional beans for these EJBs may be defined using XML, by specifying the bean class in beans.xml
All session beans exposing an EJB 3.x client view and declared in ejb-jar.xml are also beans. Additional beans for these EJBs may be defined using XML, by specifying the bean class and EJB name in beans.xml
The set of bean types for a session bean contains all local interfaces of the bean that do not have wildcard type parameters or type variables and their superinterfaces.
If the EJB has a bean class local view and the bean class is not a parameterized type, the set of bean types contains the bean class and all superclasses.
A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings
Coverage
No tests exist for this assertion
A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings
Coverage
No tests exist for this assertion
A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings
Coverage
No tests exist for this assertion
A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings
Coverage
No tests exist for this assertion
A bean class may also specify a scope, name, deployment type, stereotypes and/or bindings~
Coverage
No tests exist for this assertion
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has the same bean class
Coverage
No tests exist for this assertion
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has the initializer methods and injected fields defined by annotations
Coverage
No tests exist for this assertion
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has scope @Dependent.
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has deployment type @Standard.
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has @javax.inject.New as the only binding
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no bean name
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no stereotypes
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no observer methods
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no producer methods
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no producer fields
Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no disposal methods
If a bean class of a session bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y. Also, X must support all local interfaces supported by Y, and if Y supports a bean-class local view, X must also support a bean-class local view. Otherwise, a DefinitionException is thrown by the container at deployment time.
We say that X directly specializes Y, and we can be certain that Y will never be called by the container if X is enabled
Coverage
No tests exist for this assertion
If the bean class of X does not directly extend the bean class of another session bean, a DefinitionException is thrown by the container at deployment time
Coverage
The default name for a session bean is the unqualified class name of the bean class, after converting the first character to lower case
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.
Coverage
No tests exist for this assertion
All session bean proxies must be serializable
Coverage
No tests exist for this assertion
A producer method must be a method of a simple bean class or session bean class
Coverage
No tests exist for this assertion
A producer method may be non-static
Coverage
No tests exist for this assertion
If the bean is a session bean, the producer method must be either a business method of the EJB or a static method of the bean class
If a producer method sometimes returns a null value, then the producer method must have scope @Dependent
Coverage
No tests exist for this assertion
If a producer method returns a null value at runtime, and the producer method declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies".
Coverage
No tests exist for this assertion
If a producer method return type contains a wildcard type parameter, a DefinitionException is thrown by the container at deployment time
If a producer method return type contains a type variable, a DefinitionException is thrown by the container at deployment time
Coverage
The application may call producer methods directly. However, if the application calls a producer method directly, no parameters will be passed to the producer method by the container; the returned object is not bound to any context; and its lifecycle is not managed by the container
A bean may declare multiple producer methods
Coverage
No tests exist for this assertion
If the return type of a producer method is an interface, the set of bean types contains the return type, all interfaces it extends directly or indirectly and java.lang.Object
If a return type of a producer method is primitive or is a Java array type, the set of bean types contains exactly two types: the method return type and java.lang.Object
If the return type of a producer method is a class, the set of bean types contains the return type, every superclass and all interfaces it implements directly or indirectly
A producer method may be declared by annotating a method with the @javax.inject.Produces annotation
Coverage
No tests exist for this assertion
A producer method may specify a deployment type
Coverage
If a producer method has a parameter annotated @Disposes, a DefinitionException is thrown by the container at deployment time
If a producer method has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time
If a non-static method of a session bean class is annotated @Produces, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time
If the producer method has parameters, the container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each parameter and calls the producer method with those parameter values
Coverage
No tests exist for this assertion
If a producer method X is annotated @Specializes, then it must be non-static and directly override another producer method Y. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y.
If the method does not directly override another producer method, a DefinitionException is thrown by the container at deployment time
If the bean is a session bean, the disposal method must be a business method of the EJB or a static method of the bean class
Coverage
No tests exist for this assertion
Each disposal method must have exactly one disposed parameter, of the same type as the corresponding producer method return type
Coverage
When searching for disposal methods for a producer method, the container considers the type and bindings of the disposed parameter. If a disposed parameter resolves to a producer method according to the typesafe resolution algorithm, the container must call this method when destroying an instance returned by that producer method
If the disposed parameter does not resolve to any producer method according to the typesafe resolution algorithm, an UnsatisfiedDependencyException is thrown by the container at deployment time
If a disposed parameter resolves to a producer method according to the typesafe resolution algorithm, the container must call this method when destroying an instance returned by that producer method
A disposal method may be declared using annotations by annotating a parameter @javax.inject.Disposes. That parameter is the disposed parameter
Coverage
If a method has more than one parameter annotated @Disposes, a DefinitionException is thrown by the container
Coverage
If a disposal method is annotated @Produces, a DefinitionException is thrown by the container at deployment time
Coverage
If a disposal method is annotated @Initializer, a DefinitionException is thrown by the container at deployment time
Coverage
If a non-static method of a session bean class has a parameter annotated @Disposes, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time
Coverage
No tests exist for this assertion
In addition to the disposed parameter, a disposal method may declare additional parameters, which may also specify bindings. The container calls Manager.getInstanceToInject() to determine a value for each parameter of a disposal method and calls the disposal method with those parameter values
When searching for disposal methods for a producer method, the container searches for disposal methods which are declared by an enabled bean, and for which the disposed parameter must resolve to the producer method, according to the typesafe resolution algorithm
The default name for a producer method is the method name, unless the method follows the JavaBeans property getter naming convention, in which case the default name is the JavaBeans property name
A producer field must be a field of a simple bean class or session bean class
Coverage
No tests exist for this assertion
If a producer method contains a null value at runtime, and the producer field declares any other scope, an IllegalProductException is thrown by the container. This restriction allows the container to use a client proxy, as defined in Section 5.4, "Client proxies"
If a producer field return type contains a wildcard type parameter, a DefinitionException is thrown by the container at deployment time
If a producer field return type contains a type variable, a DefinitionException is thrown by the container at deployment time
Coverage
No tests exist for this assertion
The application may access producer fields directly. However, if the application accesses a producer field directly, the returned object is not bound to any context; and its lifecycle is not managed by the container
The bean types of a producer field depend upon the field type. If the field type is an interface, the set of bean types contains the field type, all interfaces it extends directly or indirectly and java.lang.Object
The bean types of a producer field depend upon the field type. If a field type is primitive or is a Java array type, the set of bean types contains exactly two types: the field type and java.lang.Object
The bean types of a producer field depend upon the field type. If the field type is a class, the set of bean types contains the field type, every superclass and all interfaces it implements directly or indirectly
Resources may be declared in beans.xml, allowing direct injection of a web service reference
Coverage
No tests exist for this assertion
The lifecycle of an injected reference is identical to the semantics of Java EE injection using @WebServiceRef
Coverage
No tests exist for this assertion
A resource always has scope @Dependent
Coverage
No tests exist for this assertion
A resource may not declare a bean name
Coverage
No tests exist for this assertion
Resources are always declared using XML
A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a Java EE resource, the EE resource type must be specified - for example javax.sql.Datasource for a JDBC datasource. The bean type of the resource is this specified type
A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a persistence context, javax.persistence.EntityManager must be specified. The bean type of the resource is this specified type
A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a persistence unit, javax.persistence.EntityManagerFactory must be specified. The bean type of the resource is this specified type
A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a remote EJB, an EJB remote interface type must be specified. The bean type of the resource is this specified type
A resource may be declared in beans.xml using an element that represents the Java type of the resource. For a web service, a web service type must be specified. The bean type of the resource is this specified type
Coverage
No tests exist for this assertion
Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or <WebServiceRef> element. For a Java EE resource, a JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <Resource> element
Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or <WebServiceRef> element. For a persistence context, a persistence unit name must be specified using the <unitName> child element of the <PersistenceContext> element
Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or <WebServiceRef> element. For a persistence unit, a persistence unit name must be specified using the <unitName> child element of the <PersistenceUnit> element
Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or <WebServiceRef> element. For a remote EJB, a JNDI name, mapped name or EJB link must be specified using the <name>, <mappedName> or <ejbLink> child elements of the <EJB> element
Each resource declaration must contain a child <Resource>, <PersistenceContext>, <PersistenceUnit>, <EJB> or <WebServiceRef> element. For a web service, a JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <WebServiceRef> element. Optionally, a URL pointing to a WSDL document may be specified using the <wsdlLocation> child element
Coverage
No tests exist for this assertion
The JNDI name specified by the <name> element must be a name in the global java:global or application java:app naming context
Coverage
No tests exist for this assertion
Optionally, one or more bindings may be specified for resources in XML. If no binding is explicitly specified, the default binding @Current is assumed.
Coverage
No tests exist for this assertion
JMS resources may be declared in beans.xml
Coverage
No tests exist for this assertion
A JMS TopicSession resource always has scope @Dependent
Coverage
No tests exist for this assertion
A JMS TopicSubscriber resource always has scope @Dependent
Coverage
No tests exist for this assertion
A JMS TopicPublisher resource always has scope @Dependent
Coverage
No tests exist for this assertion
A JMS Queue resource may not declare a bean name
Coverage
No tests exist for this assertion
A JMS QueueConnection resource may not declare a bean name
Coverage
No tests exist for this assertion
A JMS QueueSession resource may not declare a bean name
Coverage
No tests exist for this assertion
A JMS QueueReceiver resource may not declare a bean name
Coverage
No tests exist for this assertion
A JMS QueueSender resource may not declare a bean name
Coverage
No tests exist for this assertion
A JMS Topic resource may not declare a bean name
Coverage
No tests exist for this assertion
A JMS TopicConnection resource may not declare a bean name
Coverage
No tests exist for this assertion
A JMS TopicSession resource may not declare a bean name
Coverage
No tests exist for this assertion
A JMS TopicSubscriber resource may not declare a bean name
Coverage
No tests exist for this assertion
A JMS TopicPublisher resource may not declare a bean name
Coverage
No tests exist for this assertion
JMS resources are always declared using XML
Coverage
No tests exist for this assertion
JMS queue resources must allow the direct injection of the Queue
Coverage
No tests exist for this assertion
JMS queue resources must allow the direct injection of the QueueConnection
Coverage
No tests exist for this assertion
JMS queue resources must allow the direct injection of the QueueSession
Coverage
No tests exist for this assertion
JMS queue resources must allow the direct injection of the QueueReceiver
Coverage
No tests exist for this assertion
JMS queue resources must allow the direct injection of the QueueSender
Coverage
No tests exist for this assertion
JMS topic resources must allow the direct injection of the Topic
Coverage
No tests exist for this assertion
JMS topic resources must allow the direct injection of the TopicConnection
Coverage
No tests exist for this assertion
JMS topic resources must allow the direct injection of the TopicSession
Coverage
No tests exist for this assertion
JMS topic resources must allow the direct injection of the TopicSubscriber
Coverage
No tests exist for this assertion
JMS topic resources must allow the direct injection of the TopicPublisher
Coverage
No tests exist for this assertion
If the application calls close() on an instance of a QueueConnection, an UnsupportedOperationException is thrown by the container.
Coverage
No tests exist for this assertion
If the application calls close() on an instance of a QueueSession, an UnsupportedOperationException is thrown by the container.
Coverage
No tests exist for this assertion
If the application calls close() on an instance of a QueueReceiver, an UnsupportedOperationException is thrown by the container.
Coverage
No tests exist for this assertion
If the application calls close() on an instance of a QueueSender, an UnsupportedOperationException is thrown by the container.
Coverage
No tests exist for this assertion
If the application calls close() on an instance of a TopicConnection, an UnsupportedOperationException is thrown by the container.
Coverage
No tests exist for this assertion
If the application calls close() on an instance of a TopicSession, an UnsupportedOperationException is thrown by the container.
Coverage
No tests exist for this assertion
If the application calls close() on an instance of a TopicSubscriber, an UnsupportedOperationException is thrown by the container.
Coverage
No tests exist for this assertion
If the application calls close() on an instance of a TopicPublisher, an UnsupportedOperationException is thrown by the container.
Coverage
No tests exist for this assertion
A JMS Queue resource always has scope @Dependent
Coverage
No tests exist for this assertion
A JMS QueueConnection resource always has scope @Dependent
Coverage
No tests exist for this assertion
A JMS QueueSession resource always has scope @Dependent
Coverage
No tests exist for this assertion
A JMS QueueReceiver resource always has scope @Dependent
Coverage
No tests exist for this assertion
A JMS QueueSender resource always has scope @Dependent
Coverage
No tests exist for this assertion
A JMS Topic resource always has scope @Dependent
Coverage
No tests exist for this assertion
A JMS TopicConnection resource always has scope @Dependent
Coverage
No tests exist for this assertion
For JMS resources that represent a queue, the bean types are Queue, QueueConnection, QueueSession and QueueSender
Coverage
No tests exist for this assertion
For JMS resources that represent a topic, the bean types are Topic, TopicConnection, TopicSession and TopicPublisher
Coverage
No tests exist for this assertion
A JMS resource may be declared using the <Topic> or <Queue> elements in beans.xml
Coverage
No tests exist for this assertion
Each JMS resource declaration must contain a child <Resource> element. A JNDI name or mapped name must be specified using the <name> or <mappedName> child elements of the <Resource> element
Coverage
No tests exist for this assertion
One or more bindings may be specified. If no binding is explicitly specified, the default binding @Current is assumed
Coverage
No tests exist for this assertion
An injected field is a non-static, non-final field of a servlet.
Coverage
No tests exist for this assertion
An injected field is a non-static, non-final field of any EJB session bean class.
Coverage
No tests exist for this assertion
An injected field is a non-static, non-final field of any message driven bean class.
Coverage
No tests exist for this assertion
Injected fields are initialized by the container immediately after instantiation and before any methods of the instance are invoked. The container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each injected field
Coverage
No tests exist for this assertion
Any EJB session bean may declare injected fields and have those fields injected by the container
Coverage
No tests exist for this assertion
Any EJB message driven bean may declare injected fields and have those fields injected by the container
Coverage
No tests exist for this assertion
If a field is a producer field, it is not an injected field
Coverage
No tests exist for this assertion
An initializer method is a non-static method of a servlet.
Coverage
No tests exist for this assertion
An initializer method is a non-static method of any EJB session bean class.
Coverage
No tests exist for this assertion
Initializer methods are called by the container immediately after injected fields have been initialized by the container and before any other methods of the instance are invoked.
Coverage
The application may call initializer methods directly, but then no parameters will be passed to the method by the container
Any EJB session bean may declare initializer methods and have the methods called by the container
Coverage
No tests exist for this assertion
Any EJB message driven bean may declare initializer methods and have the methods called by the container
Coverage
No tests exist for this assertion
If an initializer method has a parameter annotated @Disposes, a DefinitionException is thrown by the container at deployment time
If an initializer method has a parameter annotated @Observes, a DefinitionException is thrown by the container at deployment time
An initializer method may have any number of parameters. If the initializer method has parameters, the container calls Manager.getInstanceToInject() to determine a value for each parameter and calls the initializer method with those parameter values
Concrete subclasses of Bean must implement the operations defined by the Contextual interface defined in Section 6.1, "The Contextual interface".
An instance of Bean exists for every enabled bean in a deployment
Coverage
No tests exist for this assertion
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".
Coverage
No tests exist for this assertion
For class X which is extended directly by the bean class of a simple bean Y, if X is annotated with a binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not declare an annotation of type Z.
Coverage
For class X which is extended directly by the bean class of a simple bean Y, if X is annotated with a stereotype Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not declare an annotation of type Z.
Coverage
For class X which is extended directly by the bean class of a session bean Y, if X is annotated with a binding type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not declare an annotation of type Z.
For class X which is extended directly by the bean class of a session bean Y, if X is annotated with a stereotype Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not declare an annotation of type Z.
For class X which is extended indirectly by the bean class of a simple bean Y, if X is annotated with a 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.
For class X which is extended indirectly by the bean class of a simple bean Y, if X is annotated with a stereotype 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.
For class X which is extended indirectly by the bean class of a session bean Y, if X is annotated with a 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.
For class X which is extended indirectly by the bean class of a session bean Y, if X is annotated with a stereotype 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.
For class X which is extended directly by the bean class of a simple bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not declare a scope type.
For class X which is extended directly by the bean class of a 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 meta-annotation and Y does not declare a scope type.
For class X which is extended indirectly by the bean class of a simple bean Y, if X is annotated with a scope 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 scope type.
For class X which is extended indirectly by the bean class of a 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 meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.
For class X which is extended directly by the bean class of a simple 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 Y does not declare a deployment type.
For class X which is extended directly by the bean class of a 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 Y does not declare a deployment type.
For class X which is extended indirectly by the bean class of a simple 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.
For class X which is extended indirectly by the bean class of a 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.
For class X which is extended directly by the bean class of a simple bean Y, the scope types explicitly declared by and inherited from the class X take precedence over default scopes declared by stereotypes.
For class X which is extended directly by the bean class of a simple bean Y, the deployment types explicitly declared by and inherited from the class X take precedence over deployment deployment types declared by stereotypes.
For class X which is extended directly by the bean class of a session bean Y, the scope types explicitly declared by and inherited from the class X take precedence over default scopes declared by stereotypes.
For class X which is extended directly by the bean class of a session bean Y, the deployment types explicitly declared by and inherited from the class X take precedence over default deployment types declared by stereotypes.
For class X which is extended indirectly by the bean class of a simple bean Y, the scope types explicitly declared by and inherited from the class X take precedence over default scopes declared by stereotypes.
For class X which is extended indirectly by the bean class of a simple bean Y, the deployment types explicitly declared by and inherited from the class X take precedence over default deployment types declared by stereotypes.
For class X which is extended indirectly by the bean class of a session bean Y, the scope types explicitly declared by and inherited from the class X take precedence over default scopes declared by stereotypes.
For class X which is extended indirectly by the bean class of a session bean Y, the deployment types explicitly declared by and inherited from the class X take precedence over deployment types declared by stereotypes.
For annotations defined by the bean specification, all built-in scope types are declared @Inherited
For annotations defined by the bean specification, all built-in stereotypes are declared @Inherited
For annotations defined by the bean specification, no built-in binding type is declared @Inherited
For annotations defined by the bean specification, the built-in deployment type is not declared @Inherited
the @Named annotation is not declared @Inherited and bean names are not inherited unless specialization is used
For class X which is extended directly by the bean class of a simple bean Y, if X declares a @PostConstruct method x() then Y inherits x() if and only if Y does not override the method x()
For class X which is extended directly by the bean class of a session bean Y, if X declares a @PostConstruct method x() then Y inherits x() if and only if Y does not override the method x()
For class X which is extended indirectly by the bean class of a simple bean Y, if X declares a @PostConstruct 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()
For class X which is extended indirectly by the bean class of a session bean Y, if X declares a @PostConstruct 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()
For class X which is extended directly by the bean class of a simple bean Y, if X declares a @PreDestroy method x() then Y inherits x() if and only if Y does not override the method x()
For class X which is extended directly by the bean class of a session bean Y, if X declares a @PreDestroy method x() then Y inherits x() if and only if Y does not override the method x()
For class X which is extended indirectly by the bean class of a simple bean Y, if X declares a @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()
For class X which is extended indirectly by the bean class of a session bean Y, if X declares a @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()
For class X which is extended directly by the bean class of a simple bean Y, if X declares a non-static producer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
For class X which is extended directly by the bean class of a simple bean Y, if X declares a non-static disposal method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
Coverage
No tests exist for this assertion
For class X which is extended directly by the bean class of a simple bean Y, if X declares a non-static observer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
For class X which is extended directly by the bean class of a session bean Y, if X declares a non-static producer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
For class X which is extended directly by the bean class of a session bean Y, if X declares a non-static disposal method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
Coverage
No tests exist for this assertion
For class X which is extended directly by the bean class of a session bean Y, if X declares a non-static observer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
For class X which is extended indirectly by the bean class of a simple bean Y, if X declares a non-static producer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
For class X which is extended indirectly by the bean class of a simple bean Y, if X declares a non-static disposal method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
Coverage
No tests exist for this assertion
For class X which is extended indirectly by the bean class of a simple bean Y, if X declares a non-static observer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
For class X which is extended indirectly by the bean class of a session bean Y, if X declares a non-static producer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
For class X which is extended indirectly by the bean class of a session bean Y, if X declares a non-static disposal method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
Coverage
No tests exist for this assertion
For class X which is extended indirectly by the bean class of a session bean Y, if X declares a non-static observer method x() then Y does not inherit this method unless Y is explicitly declared to specialize or realize X
For class X which is extended directly by the bean class of a simple 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.
For class X which is extended directly by the bean class of a 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.
For class X which is extended indirectly by the bean class of a simple 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.
For class X which is extended indirectly by the bean class of a 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.
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.
Coverage
No tests exist for this assertion
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.
Coverage
No tests exist for this assertion
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
Coverage
No tests exist for this assertion
A bean declared using annotations may declare that it specializes a lower-priority bean using the @Specializes annotation
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.
Coverage
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.
Coverage
If a bean X specializes a lower-priority bean Y with a name, and X declares a name explicitly, a DefinitionException is thrown by the container at deployment time
Coverage
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.
Coverage
Even if the lower-priority bean defines a producer method, the method will be called upon an instance of the specializing bean
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".
The @javax.inject.Specializes annotation or <Specializes> XML element is used to indicate that one bean directly specializes another bean
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
Any non-static producer methods (see Section 3.4, "Producer 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".
Coverage
No tests exist for this assertion
Any non-static producer fields (see Section 3.5, "Producer fields") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean, as defined by Section 6.8, "Lifecycle of producer fields".
Any non-static disposal methods (see Section 3.4.6, "Disposal methods") of any bean are invoked upon an instance of the most specialized enabled bean that specializes the bean.
Coverage
No tests exist for this assertion
Any non-static 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 7.4, "Observer notification".
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
Coverage
Any bean that extends a generic class may directly extend the generic class, in the case of a bean declared using annotations and then explicitly declare that it realizes the generic class
A bean declared using annotations may declare that it realizes a generic class by annotating the bean class with the @javax.inject.Realizes annotation
If a generic class Y declares a non-static producer method with a certain combination of scope, stereotypes, bindings and interceptor bindings, then every bean X that realizes Y also has a producer method with the same scope, stereotypes and interceptor bindings. The bindings for this inherited producer method consist of all bindings declared by the producer method of Y, excluding all bindings of Y, together with the bindings declared explicitly by X. The deployment type of the inherited producer method is the deployment type of X
Coverage
If a generic class Y declares a non-static producer field with a certain combination of scope, stereotypes, bindings and interceptor bindings, then every bean X that realizes Y also has a producer field with the same scope, stereotypes and interceptor bindings. The bindings for this inherited producer field consist of all bindings declared by the producer field of Y, excluding all bindings of Y, together with the bindings declared explicitly by X. The deployment type of the inherited producer field is the deployment type of X
Coverage
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.
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.
Coverage
No tests exist for this assertion
Realization applies only to simple beans and session beans
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.
Coverage
No tests exist for this assertion
The container is required to support circularities in the bean dependency graph
Coverage
No tests exist for this assertion
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".
Coverage
No tests exist for this assertion
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
If necessary, the container performs boxing or unboxing when it injects a value to a field or parameter of primitive or wrapper type.
Coverage
No tests exist for this assertion
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
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
The container must guarantee that when any valid injected reference to a bean of normal scope is invoked, the invocation is always processed by the current instance of the injected bean.
Coverage
No tests exist for this assertion
Classes without a non-private constructor with no parameters cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, an UnproxyableDependencyException is thrown by the container at deployment time.
Classes which are declared final or have final methods cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, an UnproxyableDependencyException is thrown by the container at deployment time
Classes which are declared final or have final methods cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, an UnproxyableDependencyException is thrown by the container at deployment time
Primitive types cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, an UnproxyableDependencyException is thrown by the container at deployment time
Coverage
No tests exist for this assertion
Array types cannot be proxied by the container. If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, an UnproxyableDependencyException is thrown by the container at deployment time
Every time a method of the bean is invoked upon a client proxy, the client proxy must obtain the context object by calling Manager.getContext(), passing 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, and invoke the method upon the bean
The behavior of all methods declared by java.lang.Object, except for toString(), is undefined for a client proxy
Coverage
No tests exist for this assertion
If an injection point declares no binding, the default binding @Current is assumed
Coverage
No tests exist for this assertion
An injection point declared in XML has it's type determined according to Section 9.10, "Specifying bean types and bindings"
Coverage
No tests exist for this assertion
The javax.inject.manager.InjectionPoint.getAnnotation() method returns annotations of the parameter in the case of method parameter
Coverage
No tests exist for this assertion
The javax.inject.manager.InjectionPoint.getAnnotation() method returns annotations annotations of the parameter in the case of constructor parameter injection.
Coverage
No tests exist for this assertion
The javax.inject.manager.InjectionPoint.getAnnotations() method returns annotations of the parameter in the case of method parameter
Coverage
No tests exist for this assertion
The javax.inject.manager.InjectionPoint.getAnnotations() method returns annotations annotations of the parameter in the case of constructor parameter injection.
Coverage
No tests exist for this assertion
getAnnotation() returns a null value if no annotation of the given type exists at the field injection point
Coverage
No tests exist for this assertion
getAnnotation() returns a null value if no annotation of the given type exists at the method parameter injection point
Coverage
No tests exist for this assertion
getAnnotation() returns a null value if no annotation of the given type exists at the constructor injection point
Coverage
No tests exist for this assertion
Whenever a @Dependent scoped object is instantiated by the container for injection into a second bean, any injection point of type InjectionPoint and binding @Current receives an instance of InjectionPoint that represents the injection point of the second bean
When a @Dependent scoped object is instantiated by the container to receive a producer method, any injection point of type InjectionPoint and binding @Current receives a null value
Coverage
No tests exist for this assertion
When a @Dependent scoped object is instantiated by the container to receive a producer field, any injection point of type InjectionPoint and binding @Current receives a null value
Coverage
No tests exist for this assertion
When a @Dependent scoped object is instantiated by the container to receive an observer , any injection point of type InjectionPoint and binding @Current receives a null value
Coverage
No tests exist for this assertion
When a @Dependent scoped object is instantiated by the container to receive a disposal method invocation, any injection point of type InjectionPoint and binding @Current receives a null value
Coverage
No tests exist for this assertion
When a @Dependent scoped object is instantiated by the container during EL expression evaluation, any injection point of type InjectionPoint and binding @Current receives a null value
Coverage
No tests exist for this assertion
When a @Dependent scoped object is instantiated by the container as a result of a direct call to the Manager API, any injection point of type InjectionPoint and binding @Current receives a null value
Coverage
No tests exist for this assertion
If a bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and binding @Current, a DefinitionException is thrown by the container at deployment time
Coverage
No tests exist for this assertion
If an object that is not a bean has an injection point of type InjectionPoint and binding @Current, a DefinitionException is thrown by the container at deployment time
Coverage
No tests exist for this assertion
Implementations of Bean maintain a reference to an instance of Manager
When the Bean implementation performs dependency injection, it must obtain the contextual instances to inject by calling Manager.getInstanceToInject(), passing an instance of InjectionPoint that represents the injection point and the instance of CreationalContext that was passed to Bean.create()
Coverage
No tests exist for this assertion
The Manager.getInstanceToInject() method must Identify the bean by calling Manager.resolveByType(), passing the type and bindings of the injection point
The Manager.getInstanceToInject() method must throw an UnproxyableDependencyException if the bean has a normal scope and the type cannot be proxied by the container, as defined in Section 5.4.1, "Unproxyable bean types"
The Manager.getInstanceToInject() method must obtain an instance of the bean (or a client proxy) by calling Manager.getInstance(), passing the Bean object representing the bean, and return it. Alternatively, return an incompletely initialized instance of the bean that was registered by calling CreationalContext.push(), as defined in Section 6.1, "The Contextual interface"
Coverage
No tests exist for this assertion
If the given Bean instance represents a bean with a normal scope, as defined in Section 8.2, "Normal scopes and pseudo-scopes", Manager.getInstance() must return a client proxy
Coverage
No tests exist for this assertion
If the Bean instance represents a bean with a pseudo-scope, as defined in Section 8.2, "Normal scopes and pseudo-scopes", Manager.getInstance() must obtain the context object by calling Manager.getContext(), passing 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
Coverage
No tests exist for this assertion
The Manager.getInstanceByType() methods obtain a contextual instance of a bean
The getInstanceByType() method must identify the bean by calling Manager.resolveByType(), passing the given type and bindings
Coverage
No tests exist for this assertion
The getInstanceByType() method must obtain an instance of the bean (or a client proxy) by calling Manager.getInstance(), passing the Bean object representing the bean, and return it
Coverage
No tests exist for this assertion
Whenever the @Obtains annotation appears at an injection point, an implicit bean exists with exactly the bean type and bindings that appear at the injection point
Whenever the @Obtains annotation appears at an injection point, an implicit bean exists with deployment type @Standard
Whenever the @Obtains annotation appears at an injection point, an implicit bean exists with @Dependent scope
Whenever the @Obtains annotation appears at an injection point, an implicit bean exists with no bean name
Whenever the @Obtains annotation appears at an injection point, an implicit bean exists with an implementation provided automatically by the container
The get() method of the provided implementation of Instance must call Manager.getInstanceByType(), passing all bindings declared at the injection point, except @Obtains, and all bindings passed to Instance.get()
Coverage
No tests exist for this assertion
When the application calls Instance.get() to obtain a contextual instance dynamically, it may need to pass instances of binding annotation types
Coverage
No tests exist for this assertion
When the container is resolving a bean by type, it identifies the set of matching enabled beans which have the given bean type. For this purpose, primitive types are considered to be identical to their corresponding wrapper types in java.lang, array types are considered identical only if their element types are identical and parameterized types are considered identical only if both the type and all type parameters are identical
Coverage
No tests exist for this assertion
When the container is resolving a bean by type, it identifies the set of matching enabled beans which have the given bean type. For this purpose, primitive types are considered to be identical to their corresponding wrapper types in java.lang, array types are considered identical only if their element types are identical and parameterized types are considered identical only if both the type and all type parameters are identical
When the container is resolving a bean by type, it identifies the set of matching enabled beans which have the given bean type. For this purpose, primitive types are considered to be identical to their corresponding wrapper types in java.lang, array types are considered identical only if their element types are identical and parameterized types are considered identical only if both the type and all type parameters are identical
When the container is resolving a bean by type, it considers the given bindings. If no bindings were passed to resolveByType(), the container assumes the binding @Current. The container narrows the set of matching beans to just those where for each given binding, the bean declares a binding with (a) the same type and (b) the same annotation member value for each member which is not annotated @NonBinding (see Section 5.9.1, "Binding annotations with members")
When the container is resolving a bean by type, it considers the given bindings. If no bindings were passed to resolveByType(), the container assumes the binding @Current. The container narrows the set of matching beans to just those where for each given binding, the bean declares a binding with (a) the same type and (b) the same annotation member value for each member which is not annotated @NonBinding (see Section 5.9.1, "Binding annotations with members")
When the container is resolving a bean by type, it considers the given bindings. If no bindings were passed to resolveByType(), the container assumes the binding @Current. The container narrows the set of matching beans to just those where for each given binding, the bean declares a binding with (a) the same type and (b) the same annotation member value for each member which is not annotated @NonBinding (see Section 5.9.1, "Binding annotations with members")
When the container is resolving a bean by type, it examines the deployment types of the matching beans, as defined in Section 2.5.7, "Deployment type precedence", and returns the set of beans with the highest precedence deployment type that occurs in the set.
When the container is resolving a bean by type, it examines the deployment types of the matching beans, as defined in Section 2.5.7, "Deployment type precedence", and returns the set of beans with the highest precedence deployment type that occurs in the set. If there are no matching beans, an empty set is returned
Binding types with members are supported
Array-valued or annotation-valued members of a binding type must be annotated @NonBinding. If an array-valued or annotation-valued member of a binding type is not annotated @NonBinding, a DefinitionException is thrown by the container at deployment time
Array-valued or annotation-valued members of a binding type must be annotated @NonBinding. If an array-valued or annotation-valued member of a binding type is not annotated @NonBinding, a DefinitionException is thrown by the container at deployment time
A producer method may declare multiple bindings
Coverage
No tests exist for this assertion
A producer field may declare multiple bindings
Coverage
No tests exist for this assertion
A bean must declare all of the bindings that are specified at the injection point to be considered a candidate for injection
Coverage
No tests exist for this assertion
When this resolver is called with a null base object, it calls the method Manager.getInstanceByName() to obtain an instance of the bean named in the EL expression
Coverage
No tests exist for this assertion
The Manager.getInstanceByName() method must identify the bean by calling Manager.resolveByName(), passing the name
The Manager.getInstanceByName() method must obtain an instance of the bean by calling Manager.getInstance(), passing the Bean instance representing the bean if exactly one bean was returned by Manager.resolveByName(). For each distinct name that appears in the EL expression, getInstanceByName() must be called at most once
Even if a name appears more than once in the same expression, the container may not call getInstanceByName() multiple times with that name. This restriction ensures that there is a unique instance of each bean with scope @Dependent in any EL evaluation
Coverage
No tests exist for this assertion
The resolveByName() method of the Manager interface performs name resolution
Coverage
No tests exist for this assertion
When resolving a bean by name, the container must identify the set of matching enabled beans which have the given name
Coverage
No tests exist for this assertion
After the container identifies the set of matching beans, it examines the deployment types of the matching beans, as defined in Section 2.5.7, "Deployment type precedence", and returns the set of beans with the highest precedence deployment type that occurs in the set
If there are no matching beans, an empty set is returned
Coverage
No tests exist for this assertion
The container is required to perform dependency injection upon certain non-contextual objects
The container is required to perform dependency injection for session bean instances obtained directly from JNDI
Coverage
The container is required to perform dependency injection for session bean instances injected using @EJB
Coverage
No tests exist for this assertion
The container is required to perform dependency injection for session bean instances injected using @Resource
Coverage
No tests exist for this assertion
The container is required to perform dependency injection for session bean instances created by the container to receive remote method calls
Coverage
No tests exist for this assertion
The container is required to perform dependency injection for session bean instances created by the container to receive timeouts
Coverage
No tests exist for this assertion
For the purposes of dependency injection, the container must treat non-contextual instances of session beans as instances of the most specialized bean that specializes the bean with binding @New and deployment type @Standard defined in Section 3.3.6, "Session beans with the @New binding"
Coverage
No tests exist for this assertion
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
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
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
The implementation of Contextual is not required to call CreationalContext.push()
If the application invokes a contextual instance after it has been destroyed, the behavior is undefined
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
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
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
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().
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".
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".
When the destroy() method of a Bean object is called, the container simply discards the proxy and all underlying EJB local object references
If an object returned by a producer method is not an instance of another bean, the container will not provide injection of other beans
If an object returned by a producer method is not an instance of another bean, the container will not provide lifecycle callbacks
If an object returned by a producer method is not an instance of another bean, the container will not provide method and lifecycle interception
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
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
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
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
The return value of the producer method, after method interception completes, is the new contextual instance to be returned by Bean.create()
If the producer method returns a null value and the producer method bean has the scope @Dependent, the create() method returns a null value
If the producer method returns a null value, and the scope of the producer method is not @Dependent, the create() method throws an IllegalProductException
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
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
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
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
If the object returned by a producer field is not an instance of another bean, the container will not provide injection of other beans
If the object returned by a producer field is not an instance of another bean, the container will not provide lifecycle callbacks
If the object returned by a producer field is not an instance of another bean, the container will not provide method interception
If the object returned by a producer field is not an instance of another bean, the container will not provide lifecycle interception
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
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
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
Coverage
No tests exist for this assertion
If the producer field contains a null value, and the scope of the producer method is not @Dependent, the create() method throws an IllegalProductException
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
A resource proxy object is a dependent object of the object it is injected into
Coverage
No tests exist for this assertion
Resource proxy objects are serializable
Coverage
No tests exist for this assertion
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
Coverage
No tests exist for this assertion
The methods of this proxy object delegate to the underlying implementation, which is obtained using the metadata provided in the resource declaration
Coverage
No tests exist for this assertion
A web service is obtained using the JNDI name or mapped name specified by <WebServiceRef>
Coverage
No tests exist for this assertion
When the destroy() method is called, the container discards the proxy object
Coverage
No tests exist for this assertion
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
A JMS resource proxy object is a dependent object of the object it is injected into
Coverage
No tests exist for this assertion
JMS resource proxy objects are serializable
Coverage
No tests exist for this assertion
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
Coverage
No tests exist for this assertion
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
Coverage
No tests exist for this assertion
The Destination is obtained using the JNDI name or mapped name specified by <Resource>
Coverage
No tests exist for this assertion
The appropriate ConnectionFactory for the topic or queue is obtained automatically
Coverage
No tests exist for this assertion
The Connection is obtained by calling QueueConnectionFactory.createQueueConnection() or TopicConnectionFactory.createTopicConnection()
Coverage
No tests exist for this assertion
The container is permitted to share a connection between multiple proxy objects
The Session object is obtained by calling QueueConnection.createQueueSession() or TopicConnection.createTopicSession()
Coverage
No tests exist for this assertion
The MessageProducer object is obtained by calling QueueSession.createSender() or TopicSession.createPublisher()
Coverage
No tests exist for this assertion
The MessageConsumer object is obtained by calling QueueSession.createReceiver() or TopicSession.createSubscriber()
Coverage
No tests exist for this assertion
When the destroy() method is called, the container must ensure that all JMS objects created by the proxy object are destroyed by calling close() if necessary
Coverage
No tests exist for this assertion
The Connection is destroyed by calling Connection.close() if necessary
Coverage
No tests exist for this assertion
If the connection is being shared between multiple proxy objects, the container is not required to close the connection when the proxy is destroyed
Coverage
No tests exist for this assertion
The Session object is destroyed by calling Session.close()
Coverage
No tests exist for this assertion
The MessageProducer object is destroyed by calling MessageProducer.close()
Coverage
No tests exist for this assertion
The MessageConsumer object is destroyed by calling MessageConsumer.close()
Coverage
No tests exist for this assertion
The close() method of a JMS resource proxy object always throws an UnsupportedOperationException
Coverage
No tests exist for this assertion
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()
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()
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()
Coverage
No tests exist for this assertion
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()
Coverage
No tests exist for this assertion
When the servlet container destroys a servlet, the container destroys all dependent objects
Coverage
No tests exist for this assertion
In a Java EE 5 environment, the container is not required to support injected fields or initializer methods of servlets
An event binding type is a Java annotation defined as @Target({FIELD, PARAMETER}) or @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME)
An event consumer will be notified of an event if the observed event type it specifies is one of the event types of the event, and if all the observed event bindings it specifies are event bindings of the event
In the signature of Manager.addObserver(), the first parameter is the observer object, the second parameter is the observed event type, and the remaining parameters are optional observed event bindings
If the observed event type passed to addObserver() or removeObserver() contains type variables or wildcards, an IllegalArgumentException is thrown
If the observed event type passed to addObserver() or removeObserver() contains type variables or wildcards, an IllegalArgumentException is thrown
If two instances of the same binding type are passed to addObserver() or removeObserver(), a DuplicateBindingTypeException is thrown
If two instances of the same binding type are passed to addObserver() or removeObserver(), a DuplicateBindingTypeException is thrown
If an instance of an annotation that is not a binding type is passed to addObserver() or removeObserver(), an IllegalArgumentException is thrown
When an event is fired by the application the container must determine the observers for that event by calling Manager.resolveObservers(), passing the event object and all event bindings
When an event is fired by the application the container must, for each observer, call the notify() method of the Observer interface, passing the event object
If an observer throws an exception, the exception aborts processing of the event. No other observers of that event will be called. The fireEvent() method rethrows the exception
An observer method is an observer defined via annotations, instead of by explicitly implementing the Observer interface. Unlike regular observers, observer methods are automatically discovered and registered by the container
If the bean is a session bean, the observer method must be a business method of the EJB or a static method of the bean class
Each observer method must have exactly one event parameter, of the same type as the event type it observes. When searching for observer methods for an event, the container considers the type and bindings of the event parameter
If the type of the event parameter contains type variables or wildcards, a DefinitionException is thrown by the container at deployment time
If a non-static method of a session bean class has a parameter annotated @Observes, and the method is not a business method of the EJB, a DefinitionException is thrown by the container at deployment time
In addition to the event parameter, observer methods may declare additional parameters, which may declare bindings. The container calls the method Manager.getInstanceToInject() defined in Section 5.7.1, "Resolving dependencies" to determine a value for each parameter of an observer method and calls the observer method with those parameter values
Transactional observer methods are observer methods which receive event notifications during the before or after completion phase of the transaction in which the event was fired. If no transaction is in progress when the event is fired, they are notified at the same time as other observers
A transactional observer method may not specify more than one of the four types. If a transactional observer method specifies more than one of the four types, a DefinitionException is thrown by the container at deployment time
An asynchronous observer method may be declared by annotating the event parameter of the observer method @javax.event.Asynchronously or in XML by a child <Asynchronously> element of the <Observes> element
Coverage
No tests exist for this assertion
If an asynchronous observer method is also a transactional observer method, it may not be a before completion observer method or a conditional observer method. If an asynchronous observer method is specified as a before completion or conditional observer method, a DefinitionException is thrown by the container at deployment time
If an asynchronous observer method is also a transactional observer method, it may not be a before completion observer method or a conditional observer method. If an asynchronous observer method is specified as a before completion or conditional observer method, a DefinitionException is thrown by the container at deployment time
For every observer method of an enabled bean, the container is responsible for providing and registering an appropriate implementation of the Observer interface, that delegates event notifications to the observer method
The notify() method of the Observer implementation for an observer method either invokes the observer method immediately, or asynchronously, or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization
The notify() method of the Observer implementation for an observer method either invokes the observer method immediately, or asynchronously, or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization
The notify() method of the Observer implementation for an observer method either invokes the observer method immediately, or asynchronously, or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization
If the observer method is an asynchronous transactional observer method and there is currently a JTA transaction in progress, the observer object calls the observer method asynchronously during the after transaction completion phase
If the observer method is a transactional observer method and there is currently a JTA transaction in progress, the observer object calls the observer method during the appropriate transaction completion phase
The container is not required to guarantee delivery of asynchronous events in the case of a server shutdown or failure
To invoke an observer method, the container must pass the event object to the event parameter and the object returned by Manager.getInstanceToInject() to each of the other parameters
If the observer is a transactional or asynchronous observer method, any exception is caught and logged by the container
A test exists for this untestable assertion!If the observer isn't a transactional or asynchronous observer method, the exception is rethrown by the notify() method of the observer object
The observer object is registered by calling Manager.addObserver(), passing the event parameter type as the observed event type, and the bindings of the event parameter as the observed event bindings
If the observer method is an asynchronous observer method, it is called with no active transaction, no client security context and with a new request context that is destroyed when the observer method returns. The application context is also active
If the observer method is a @BeforeTransactionCompletion transactional observer method, it is called within the context of the transaction that is about to complete and with the same client security context and lifecycle contexts
If the observer method is any other kind of transactional observer method, it is called in an unspecified transaction context, but with the same client security context and lifecycle contexts as the transaction that just completed
If an observer method is not an asynchronous observer method, and not a @BeforeTransactionCompletion transactional method, and not any other kind of transactional observer method, then the observer method is called in the same transaction context, client security context and lifecycle contexts as the invocation of Event.fire()
The transaction and security contexts for a business method of a session bean also depend upon the transaction attribute and @RunAs descriptor, if any
Coverage
No tests exist for this assertion
The first parameter of the fire() method is the event object. The remaining parameters are event bindings
Coverage
No tests exist for this assertion
The first parameter of the observe() method is the observer object. The remaining parameters are the observed event bindings
Coverage
No tests exist for this assertion
If the type of the injection point parameter contains a type variable a DefinitionException is thrown by the container at deployment time
If the type of the injection point parameter contains a wildcard a DefinitionException is thrown by the container at deployment time
Whenever the @Fires annotation appears at an injection point, an implicit bean exists with exactly the bean type and bindings that appear at the injection point
The fire() method of the provided implementation of Event must call Manager.fireEvent(), passing the event object passed to Event.fire(), all bindings declared at the injection point (except @Fires), and all bindings passed to Event.fire()
The observe() method of the provided implementation of Event must call Manager.addObserver(), passing the observer object passed to Event.observe(), all bindings declared at the injection point (except @Fires), and all bindings passed to Event.observer()
When searching for observers for an event, the event object must be assignable to the observed event type, taking type parameters into consideration
Coverage
When searching for observers for an event, for each observed event binding, (a) an instance of the binding type must have been passed to fireEvent() and (b) any member values of the binding type must match the member values of the instance passed to fireEvent()
The container uses equals() to compare event binding type member values
All observers of mapped event types must be asynchronous observer methods. If an observer for a mapped event type is not an asynchronous observer method, a DeploymentException is thrown by the container at deployment time
When an event type is mapped to a topic, the container must listen for messages containing events of that type sent to the topic, and notify all observers of the event type whenever a message containing an event of that type is received
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
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
The isActive() method returns false when the scope of the context object is inactive, and true when it is active
Coverage
No tests exist for this assertion
There may be no more than one mapped instance of a context object per contextual type per thread
A context may be associated with one or more threads
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.
All pseudo-scopes must be explicitly declared @ScopeType(normal=false), to indicate to the container that no client proxy is required
All scopes defined by this specification, except for the @Dependent pseudo-scope, are normal scopes
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
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
Coverage
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
Coverage
The @Dependent scope is inactive except when the container is creating or destroying a contextual instance of a bean or injecting its dependencies
The @Dependent scope is inactive except when the container is injecting dependencies of a servlet
Coverage
No tests exist for this assertion
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
The container must destroy all dependent objects of a contextual bean instance when the instance is destroyed
The container must destroy all dependent objects of an EJB or servlet when the EJB or servlet is destroyed
The container must destroy all dependent objects of an EJB or servlet when the EJB or servlet is destroyed
Coverage
No tests exist for this assertion
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
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
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
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
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)
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
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
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
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
Coverage
No tests exist for this assertion
The built-in session and conversation scopes are passivating
No other built-in scope besides session and conversation scopes are passivating
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
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
EJB local objects are serializable, therefore, any reference to a session bean of scope @Dependent is serializable
If a simple bean of scope @Dependent and a nonserializable bean class is injected into a stateful session bean an UnserializableDependencyException must be thrown by the container at deployment time
Coverage
If a simple bean of scope @Dependent and a nonserializable bean class is injected into a non-transient field an UnserializableDependencyException must be thrown by the container at deployment time
If a simple bean of scope @Dependent and a nonserializable bean class is injected into a bean constructor parameter of a bean which declares a passivating scope, an UnserializableDependencyException must be thrown by the container at deployment time
If a simple bean of scope @Dependent and a nonserializable bean class is injected into an initializer method parameter of a bean which declares a passivating scope, an UnserializableDependencyException must be thrown by the container at deployment time
If a simple bean of scope @Dependent and a nonserializable bean class is injected into a parameter of a producer method which declares a passivating scope, an UnserializableDependencyException must be thrown by the container at deployment time
If a producer method or field of scope @Dependent returns a non-serializable object for injection into a stateful session bean, an IllegalProductException is thrown by the container
If a producer method or field of scope @Dependent returns a non-serializable object for injection into a non-transient field an IllegalProductException is thrown by the container
Coverage
If a producer method or field of scope @Dependent returns a non-serializable object for injection into a bean constructor parameter of a bean which declares a passivating scope, an IllegalProductException is thrown by the container
If a producer method or field of scope @Dependent returns a non-serializable object for injection into an initializer method parameter of a bean which declares a passivating scope, an IllegalProductException is thrown by the container
If a producer method or field of scope @Dependent returns a non-serializable object for injection into a parameter of a producer method which declares a passivating scope, an IllegalProductException is thrown by the container
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
For a JSF faces request, the conversation context is active from the beginning of the apply request values phase, until the response is complete
Coverage
No tests exist for this assertion
Any JSF request has exactly one associated conversation
Coverage
No tests exist for this assertion
The conversation associated with a JSF request is determined at the end of the restore view phase and does not change during the request
Coverage
No tests exist for this assertion
A transient conversation may be marked long-running by calling Conversation.begin()
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
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
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
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
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
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
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
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
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
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
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
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
The container is permitted to arbitrarily destroy any long-running conversation that is associated with no current JSF request, in order to conserve resources
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
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
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()
Coverage
No tests exist for this assertion
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
Coverage
No tests exist for this assertion
If no active context object exists for the given scope type, Manager.getContext() must throw a ContextNotActiveException
Alternatively, a namespace may represent several Java packages. Such a namespace must have a URN consisting of the prefix urn:java: followed by a period-separated list of valid Java identifiers
If there are multiple packages containing a Java type with the same name as the XML element, a DefinitionException is thrown by the container at deployment time
The Java EE namespace urn:java:ee represents the following packages: java.lang, java.util, javax.annotation, javax.inject, javax.context, javax.interceptor, javax.decorator, javax.event, javax.ejb, javax.persistence, javax.xml.ws, javax.jms, and javax.sql
Primitive types may be represented by the XML element that represents the corresponding wrapper type in java.lang, since primitive and wrapper types are considered identical for the purposes of typesafe resolution, and assignable for the purposes of injection
An XML element that appears as a direct child of the root <Beans> element is interpreted as a binding type declaration if it has a direct child <BindingType> element in the Java EE namespace, as defined in Section 2.3.2, "Defining new binding types"
An XML element that appears as a direct child of the root <Beans> element is interpreted as an interceptor binding type if it has a direct child <InterceptorBindingType> element in the Java EE namespace, as defined in Section A.3.4, "Interceptor bindings"
An XML element that appears as a direct child of the root <Beans> element is interpreted as a stereotype declaration if it has a direct child <Stereotype> element in the Java EE namespace, as defined in Section 2.7.1, "Defining new stereotypes"
The XML element is interpreted as a Java type. If no such Java type exists in the classpath, a DefinitionException is thrown by the container at deployment time. If the type is not an annotation type, a DefinitionException is thrown by the container at deployment time
Coverage
If a certain annotation type is declared more than once as a binding type, interceptor binding type or stereotype using XML, a DeploymentException is thrown by the container at deployment time
Coverage
If the annotation type is an interceptor binding type, an inherited interceptor binding was declared, as defined in Section A.3.4.1, "Interceptor binding types with additional interceptor bindings"
Each child element is interpreted as a Java annotation type. If no such Java type exists in the classpath, a DefinitionException is thrown by the container at deployment time. If the type is not a deployment type, a DefinitionException is thrown by the container at deployment time.
First, the container performs bean discovery and registers Bean and Observer objects for the discovered beans. The container detects definition errors by validating the bean classes and metadata, throwing a DeploymentException and aborting deployment of the application if any definition errors exist, as defined in Section 10.1, "Definition errors".
Next, the container raises an event of type @Initialized Manager, allowing the application or third-party frameworks to register additional Bean and Observer objects.
Coverage
No tests exist for this assertion
Next, the container detects deployment problems by validating bean dependencies and specialization, throwing a DeploymentException and aborting deployment of the application if any deployment problems exist, as defined in Section 10.2, "Deployment problems".
Coverage
No tests exist for this assertion
Next, the container raises an event of type @Deployed Manager.
Coverage
No tests exist for this assertion
Finally, the container begins directing requests to the application.
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (standalone WAR)
Coverage
No tests exist for this assertion
For each enabled bean that is not an interceptor or decorator, the container creates an instance of Bean, and registers it by calling Manager.addBean()
Coverage
No tests exist for this assertion
For each observer method of an enabled bean, the container creates an instance of Observer that implements the rules of Section 7.5.8, "Observer object for an observer method" and registers it by calling Manager.addObserver()
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (jar in WEB-INF/lib of standalone WAR)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (WAR in EAR)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (jar in WEB-INF/lib of WAR in EAR)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (ejb-jar)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any beans.xml file in any metadata directory of the application classpath (jar in EAR lib directory)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any ejb-jar.xml file in any metadata directory of the application classpath that also contains a beans.xml file
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (standalone WAR)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (jar in WEB-INF/lib of standalone WAR)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (WAR in EAR)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (jar in WEB-INF/lib of WAR in EAR)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (ejb-jar)
Coverage
No tests exist for this assertion
When bean discovery occurs, the container considers any Java class in any archive or directory in the classpath that has a beans.xml file in the metadata directory (jar in EAR lib dir)
Coverage
No tests exist for this assertion
First, the container discovers all binding types, stereotypes and interceptor binding types declared in XML, according to the rules of Section 9.4, "Stereotype, binding type and interceptor binding type declarations".
Coverage
No tests exist for this assertion
First, the container discovers all binding types, stereotypes and interceptor binding types declared in XML, according to the rules of Section 9.4, "Stereotype, binding type and interceptor binding type declarations".
Coverage
No tests exist for this assertion
First, the container discovers all binding types, stereotypes and interceptor binding types declared in XML, according to the rules of Section 9.4, "Stereotype, binding type and interceptor binding type declarations".
Coverage
No tests exist for this assertion
The container automatically discovers simple beans (according to the rules of Section 3.2.1, "Which Java classes are beans?") and session beans (according to the rules of Section 3.3.2, "Which EJBs are beans?") deployed and/or declared in these locations and searches the bean classes for producer methods, producer fields, disposal methods and observer methods declared using annotations.
Coverage
No tests exist for this assertion
The container automatically discovers simple beans (according to the rules of Section 3.2.1, "Which Java classes are beans?") and session beans (according to the rules of Section 3.3.2, "Which EJBs are beans?") deployed and/or declared in these locations and searches the bean classes for producer methods, producer fields, disposal methods and observer methods declared using annotations.
Coverage
No tests exist for this assertion
The container automatically discovers simple beans (according to the rules of Section 3.2.1, "Which Java classes are beans?") and session beans (according to the rules of Section 3.3.2, "Which EJBs are beans?") deployed and/or declared in these locations and searches the bean classes for producer methods, producer fields, disposal methods and observer methods declared using annotations.
Coverage
No tests exist for this assertion
The container automatically discovers simple beans (according to the rules of Section 3.2.1, "Which Java classes are beans?") and session beans (according to the rules of Section 3.3.2, "Which EJBs are beans?") deployed and/or declared in these locations and searches the bean classes for producer methods, producer fields, disposal methods and observer methods declared using annotations.
Coverage
No tests exist for this assertion
The container automatically discovers simple beans (according to the rules of Section 3.2.1, "Which Java classes are beans?") and session beans (according to the rules of Section 3.3.2, "Which EJBs are beans?") deployed and/or declared in these locations and searches the bean classes for producer methods, producer fields, disposal methods and observer methods declared using annotations.
Coverage
No tests exist for this assertion
The container automatically discovers simple beans (according to the rules of Section 3.2.1, "Which Java classes are beans?") and session beans (according to the rules of Section 3.3.2, "Which EJBs are beans?") deployed and/or declared in these locations and searches the bean classes for producer methods, producer fields, disposal methods and observer methods declared using annotations.
Coverage
No tests exist for this assertion
Next, the container determines which beans, interceptors and decorators are enabled, according to the rules defined in Section 2.5.6, "Enabled deployment types", Section A.3.7, "Interceptor enablement and ordering" and Section A.5.5, "Decorator enablement and ordering", taking into account any <Deploy>, <Interceptors> and <Decorators> declarations in the beans.xml files.
Coverage
No tests exist for this assertion
The method createActivity() creates a new child activity of an activity:
Every bean belonging to a parent activity also belongs to the child activity, is eligible for injection into other beans belonging to the child activity and may be obtained by dynamic lookup via the child activity
Every bean belonging to a parent activity also belongs to the child activity, is eligible for injection into other beans belonging to the child activity and may be obtained by dynamic lookup via the child activity
Every bean belonging to a parent activity also belongs to the child activity, is eligible for injection into other beans belonging to the child activity and may be obtained by dynamic lookup via the child activity
Coverage
No tests exist for this assertion
A bean registered with a child activity is not available for injection into a servlet or EJB
Coverage
No tests exist for this assertion
A bean registered with a child activity is not available for injection into a servlet or EJB
Coverage
No tests exist for this assertion
If a bean registered with a child activity has the bean type and all bindings of some injection point of some bean registered with a direct or indirect parent activity, a DeploymentException is throw by the container at deployment time.
Coverage
No tests exist for this assertion
If a bean registered with a child activity has the bean type and all bindings of some injection point of some bean registered with a direct or indirect parent activity, a DeploymentException is throw by the container at deployment time.
Coverage
No tests exist for this assertion
An activity may be associated with the current context for a normal scope by calling setCurrent(), passing the normal scope type
All EL evaluations (as defined Section 5.10, "EL name resolution"), all calls to any injected Manager object or Manager object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected Event object (as defined in Section 7.6, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup") are processed by the current activity
All EL evaluations (as defined Section 5.10, "EL name resolution"), all calls to any injected Manager object or Manager object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected Event object (as defined in Section 7.6, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup") are processed by the current activity
All EL evaluations (as defined Section 5.10, "EL name resolution"), all calls to any injected Manager object or Manager object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected Event object (as defined in Section 7.6, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup") are processed by the current activity
All EL evaluations (as defined Section 5.10, "EL name resolution"), all calls to any injected Manager object or Manager object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected Event object (as defined in Section 7.6, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup") are processed by the current activity
All EL evaluations (as defined Section 5.10, "EL name resolution"), all calls to any injected Manager object or Manager object obtained via JNDI lookup (as defined by Section 5.7, "The Manager object"), all calls to any injected Event object (as defined in Section 7.6, "The Event interface") and all calls to any injected Instance object (as defined by Section 5.8, "Dynamic lookup") are processed by the current activity
A bean registered with an activity is only available to Unified EL expressions that are evaluated when that activity or one of its children is the current activity.
Coverage
No tests exist for this assertion
The following 5 tests do not match any known assertions:
Section | Assertion | Test Class | Test Method |
---|---|---|---|
review | review | org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean.newAndOtherBindingType NewAndOtherBindingTypeTest | testNewAnnotationCannotAppearInConjunctionWithOtherBindingType() |
review | review | org.jboss.jsr299.tck.tests.implementation.enterprise.newBean NewEnterpriseBeanTest | testNewAnnotationCannotBeAppliedToNonWebBeanImplementationClass() |
review | review | org.jboss.jsr299.tck.tests.implementation.enterprise.newAndOtherBinding NewAndOtherBindingTest | testNewAnnotationCannotAppearInConjunctionWithOtherBindingType() |
review | review | org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean NewSimpleBeanTest | testNewAnnotationCannotBeExplicitlyDeclared() |
unknown | unknown | org.jboss.jsr299.tck.tests.definition.binding BindingDefinitionTest | testMethodWithBindingAnnotationsOnParametersAreInjected() |