Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-16939

[GSS](7.2.z) [EAP] Validation of @ApplicationScoped bean's business method performed before @PostConstruct callback

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.2.3.CR1, 7.2.3.GA
    • 7.2.0.GA
    • REST
    • None

    Description

      Having a bean class with @ApplicationScoped, which has a @PostConstruct and is implementing the following Interface:

      @Path("/validated")
      public interface ValidatedJaxRsInterface {
          
          @GET
          @Valid
          @Produces(MediaType.APPLICATION_JSON)
          GreetingModel getHelloGreeting();
      }
      

      will result in calling the getHelloGreeting method of the implementation class before the @PostConstruct is getting executed.

      This can be reproduced with the attached reproducer application...

      NOTE: There is a side-issue that the getHelloGreeting is called twice. As per discussion on WFLY-11987 this is not in scope of this fix.

      Attachments

        Issue Links

          Activity

            People

              spyrkob Bartosz Spyrko-Smietanko
              spyrkob Bartosz Spyrko-Smietanko
              Daniel Cihak Daniel Cihak
              Daniel Cihak Daniel Cihak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: