Skip to content

How can getReference() legally be invoked during AfterDeploymentValidation event if contexts have not been created yet? #454

@ljnelson

Description

@ljnelson

Section 11.5.4 says:

The container must fire an event after it has validated that there are no deployment problems and before creating contexts or processing requests [emphasis mine].

Section 11.3 indicates that it is legal to call BeanManager#getReference(Bean, Type, CreationalContext) in an AfterDeploymentValidation observer method.

In order to get contextual references, such as those returned by getReference(), you need a context.

Is this a bug in the specification? Does section 11.5.4 need to be amended in some way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions