|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={METHOD,TYPE,FIELD}) @Retention(value=RUNTIME) @Documented @Scope @Inherited public @interface Dependent
Specifies that a bean belongs to the dependent pseudo-scope.
Beans declared with scope @Dependent behave differently to beans with other built-in scope types. When a bean is declared to have scope @Dependent:
Every invocation of the
Context.get(Contextual, CreationalContext)
operation of the context object for the @Dependent scope
returns a new instance of the given bean.
Every invocation of the
Context.get(Contextual)
operation of the context object for the @Dependent scope
returns a null value.
The @Dependent scope is always active.
Many instances of beans with scope @Dependent belong to some other bean or Java EE component class instance and are called dependent objects.
Instance
is
a dependent object of the instance of
Instance
.When the container destroys an instance of a bean or of any Java EE component class supporting injection, the container destroys all its dependent objects, after the @PreDestroy callback completes and after the servlet destroy() method is called.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41