Top Description Inners Methods
javax.enterprise.context

public @Interface ApplicationScoped

extends Annotation
Known Direct Implementers
javax.enterprise.context.ApplicationScoped.Literal
Annotations
@Target:TYPE, METHOD, FIELD
@Retention:RUNTIME
@Documented
@NormalScope
@Inherited
Static Imports
java.lang.annotation.ElementType.FIELD, .ElementType.METHOD, .ElementType.TYPE, .RetentionPolicy.RUNTIME

Specifies that a bean is application scoped.

While ApplicationScoped must be associated with the built-in application context required by the specification, third-party extensions are allowed to also associate it with their own context. Behavior described below is only related to the built-in application context.

The application scope is active:

The application context is shared between all servlet requests, web service invocations, EJB remote method invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to message-driven beans that execute within the same application.

The application context is destroyed when the application is shut down.

An event with qualifier @Initialized(ApplicationScoped.class) is fired when the application context is initialized and an event with qualifier @Destroyed(ApplicationScoped.class) when the application context is destroyed. The event payload is:

Authors
Gavin King, Pete Muir, Antoine Sabot-Durand

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ApplicationScoped.Literal

Supports inline instantiation of the ApplicationScoped annotation.

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString
javax.enterprise.context back to summary

public final Class ApplicationScoped.Literal

extends AnnotationLiteral<ApplicationScoped>
implements ApplicationScoped
Class Inheritance
All Implemented Interfaces
javax.enterprise.context.ApplicationScoped, java.lang.annotation.Annotation

Supports inline instantiation of the ApplicationScoped annotation.
Author
Martin Kouba
Since
2.0

Field Summary

Modifier and TypeField and Description
public static final ApplicationScoped.Literal
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from javax.enterprise.util.AnnotationLiteral:
annotationTypeequalshashCodetoString

Field Detail

INSTANCEback to summary
public static final ApplicationScoped.Literal INSTANCE
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.enterprise.util.AnnotationLiteral.serialVersionUID.

Constructor Detail

Literalback to summary
public Literal()