Annotation Type Dependent


  • @Scope
    @Target({METHOD,TYPE,FIELD})
    @Retention(RUNTIME)
    @Inherited
    @Documented
    public @interface Dependent

    An @#064;Dependent scoped Contextual instance shares it's lifecycle with the Contextual Instance it got injected to. @Dependent scoped Contextual Instances also do not get a normalscoping-proxy (Contextual Reference). They only get a proxy if they are either intercepted or decorated.

    As of CDI-1.0 this is the default scope for any class if no other scope is explicitly annotated. Since CDI-1.1 this is only the case if the beans.xml has a bean-discovery-mode="all"οœ‚οœ‚

    Every CDI instance has an associated dependent context. Each dependent context is destroyed with its parent webbeans component instance.

    Please see 8.3 Dependent pseudo-scope of the specification for further information.