1 Reply Latest reply on Jul 23, 2013 3:50 PM by Stan Silvert

    @postcontruct not called with MyFaces on EAP 6.1

    Christina Lin Newbie

      @postcontruct in @managebean with MyFaces 2.1.5 (also tried 2.2.0) was not executed.

      I have wrote a sample application, attached in the attachment.


      What I did was writing a simple hellobean, and system.out  a "Do Post Construct!" String.




                public void init(){

                          System.out.println("Do Post Construct! ");





      The Program with @postcontruct works in EAP 6.0.0 and EAP 6.0.1 but not EAP 6.1


      Tried Installation Method:


      Scenario One

      Tried install Myfaces into moulds with this method.



      Scenario Two (I don't think it make much difference, but I tried AnyWAY)

      Tried disable JSF subsystem and put myfaces jars in WAR/WEB-INF/lib



      From the log, it shows the TomcatAnnotationLifecycleProvider did create the bean, but didn't execute the postcontruct..



      [0m[0m12:59:24,106 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on

      [0m[0m12:59:24,106 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) started in 6972ms - Started 832 of 902 services (62 services are passive or on-demand)

      [0m[0m12:59:33,835 INFO  [org.apache.myfaces.util.ExternalSpecifications] (http-localhost/ MyFaces Unified EL support enabled

      [0m[0m12:59:33,873 INFO  [org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider] (http-localhost/ Creating instance of com.redhat.bean.HelloBean


      Does anyone ever come arcoss this problem? Is there a way to workaround it.. ?