title: ConversationScoped bean's PostConstruct method called in every request
body: <p>Well, i'm using a ConversationScoped and i hope the PostConstruct is called just one time in begin of conversation, see:</p>
  
  <pre><code>@Named("disciplinaDetalheMB")
  @ConversationScoped
  public class DisciplinaDetalheMBImpl {
  
      private static final long serialVersionUID = 1L;
  
      @Inject
          private Conversation conversation;
  
      @Inject
      @AnBasicBO
      private BasicBO boPadrao;
  
  @PostConstruct
      public void postConstruct() {
      logger.debug("Iniciando PostConstruct...");
      init();
      beginConversation();
      }
  
  public String salvarAndRedirecionar() {
      salvar();
      if (!FacesContext.getCurrentInstance().isValidationFailed()) {
          return goToLastPage() + "?faces-redirect=true";
      } else {
          return "";
      }
      }
  
  
  private void beginConversation() {
      if (!conversation.isTransient()) {
          endConversation();
      }
      conversation.begin();
      if (conversation.isTransient()) {
          throw new RuntimeException("A conversão não foi iniciada corretamente");
      }
      SessionContext.getInstance().setAttribute("cid", conversation.getId());
  
      }
  
      public BasicBO getBoPadrao() {
          return boPadrao;
      }
  
      public void setBoPadrao(BasicBO boPadrao) {
          this.boPadrao = boPadrao;
      }
  
  }
  </code></pre>
  
  <p>So, when my backing bean is created, the conversation is initialized and CID is stored in session to be used after. I have a commandButton "save" in my XHTML and when this button is called the PostConstruct is called again i don't know why:</p>
  
  <pre><code>&lt;h:commandLink
              action="#{managedBeanName.salvarAndRedirecionar()}"
              styleClass="btn btn-info pull-right" value="Salvar"&gt;
              &lt;f:ajax execute="@form" /&gt;
          &lt;/h:commandLink&gt;
  </code></pre>
  
  <p>I noted the generated HTML is: </p>
  
  <pre><code>&lt;a id="formManterDisciplina:j_idt44:j_idt46" href="#" onclick="mojarra.ab(this,event,'action','@form',0);return false" class="btn btn-info pull-right" name="formManterDisciplina:j_idt44:j_idt46"&gt;Salvar&lt;/a&gt;
  </code></pre>
  
  <p>So, I understand the "href=#" avoid the onlick to be executed. I think this is the problem but i dont't know how to fix. Remenber: The salvarAndRedirecionar() method is never called because postConstruct is always called before.</p>
  
  <p>2) I have another question: If i start a conversation and don't end, there is some problem ? Sometimes i don't want to end conversation manually because i just have ONE PAGE, i just start.</p>