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

[GSS](7.2.z) @PostConstruct on @ApplicationScoped bean called too late in case @Valid is annotated on a business method

XMLWordPrintable

      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...

              spyrkob Bartosz Spyrko-Smietanko
              rhn-support-jbaesner Joerg Baesner
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: