Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2264

Validation and @PostConstruct, Part II

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 4.0.0.Final, 3.7.0.Final
    • None
    • None

    Description

      RESTEASY-2227 specifically called for observing the presence of @PostConstruct annotated methods in the context of CDI being enabled. However, the javadoc for @PostConstruct says, "This annotation must be supported on all classes that support dependency injection." Since JAX-RS implementations supprt injection by @Context regardless of the presence of CDI, it seems that field/property/class validation should occur after the execution of a @PostConstruct annotated method regardless of the presence of CDI.

      Moreover, in the case of an EJB @PostConstruct lifecycle interceptor bound to an EJB serving as a JAX-RS resource or provider, validation should occur after the execution of the interceptor.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rsigal@redhat.com Ronald Sigal
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: