Annotation Type TransientReference


  • @Target(PARAMETER)
    @Retention(RUNTIME)
    @Documented
    public @interface TransientReference
    Marks an injected parameter to be destroyed after invocation. When a constructor or a method is annotated with Inject, its parameters may be annotated with \@TransientReference. If a parameter is annotated with \@TransientReference and the injected bean is Dependent-scoped, it may be destroyed by the container right after the invocation of the constructor or method. Technically spoken, the parameter will not be added to the CreationalContext of the bean of the constructor or method, but will be created with a separate CreationalContext that will be destroyed after the invocation.