Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-11956

@PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method

    Details

    • Steps to Reproduce:
      Hide

      See the attached playground.zip reproducer project...

      Show
      See the attached playground.zip reproducer project...

      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 twice before the @PostConstruct is getting executed.

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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ron_sigal Ronald Sigal
                  Reporter:
                  jbaesner Joerg Baesner
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  13 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: