title: @PostConstruct not called during page load of JSF page
body: <p>I've got an xhtml page which uses a backing bean to get it's information. In this backing bean I've got a method defined with a <code>@PostConstruct</code> annotation. However this method is never called and I can't figure out why. The log doesn't show any errors.</p>
  
  <p>I am using Java EE 7 and Payara 5.181.</p>
  
  <p>I have tried the following things:</p>
  
  <ul>
  <li>Removed all the generated data &amp; cache in the server.</li>
  <li>Removed the inject of the ModeratorService.</li>
  <li>Checked the <a href="https://docs.oracle.com/javaee/7/api/javax/annotation/PostConstruct.html" rel="nofollow noreferrer">documentation of PostConstruct</a> to see if everything is setup as it should.</li>
  </ul>
  
  <p>Here is my code:</p>
  
  <p><strong>moderator.xhtml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html   xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:p="http://primefaces.org/ui"
          &gt;
  
      &lt;h:head&gt;
          &lt;title&gt;Moderator Pagina&lt;/title&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"/&gt;
          &lt;link rel="stylesheet" type="text/css" href="style.css"/&gt;
      &lt;/h:head&gt;
      &lt;h:body&gt;
          &lt;p:dataTable var="user" value="#{moderatorManager.twitterUsers}"&gt;
              &lt;p:column headerText="Username"&gt;
                  &lt;h:outputText value="#{user.username}" /&gt;
              &lt;/p:column&gt;
          &lt;/p:dataTable&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>ModeratorManager.java</strong></p>
  
  <pre><code>package com.guido.web;
  
  import com.guido.models.TwitterUser;
  import com.guido.services.ModeratorService;
  import java.io.Serializable;
  import java.util.Set;
  import javax.annotation.PostConstruct;
  import javax.enterprise.context.SessionScoped;
  import javax.inject.Inject;
  import javax.inject.Named;
  
  @Named
  @SessionScoped
  public class ModeratorManager implements Serializable {
  
      @Inject
      ModeratorService moderatorService;
  
      private Set&lt;TwitterUser&gt; twitterUsers;
  
      @PostConstruct
      public void init() {
          System.out.println("Postconstruct method is called!"); // &lt;-- This does not show up in the server log.
          twitterUsers = moderatorService.getUsersWithRole();
          System.out.println("Initialized moderatorManager: " + twitterUsers.toString()); // &lt;-- This does not show up in the server log.
      }
  
      public Set&lt;TwitterUser&gt; getTwitterUsers() {
          return twitterUsers;
      }
  
      public void setTwitterUsers(Set&lt;TwitterUser&gt; twitterUsers) {
          this.twitterUsers = twitterUsers;
      }
  }
  </code></pre>