1 Reply Latest reply on Aug 24, 2006 3:37 PM by Gustavo Mendes

    Problem with @PostConstruct annotation

    Gustavo Mendes Newbie

      Hello all.

      I am developing an application using ejb 3.0 with JBoss 4.0.4.GA. I have tested my application using JBoss Embedded, and the @PostConstruct inside a Stateless Bean works well. But when I deploy in the JBoss AS, the method annotated with @PostConstruct is not called back. Anyone can help me?

      Thank you very much,

      Gustavo

        • 1. Re: Problem with @PostConstruct annotation
          Gustavo Mendes Newbie

          Hello all.

          I have solved the problem. In the embedded, the implemented version of EJB 3.0 is the RC6, and the JBoss AS implemented version RC7. One of the diferences between these two implementations is the package of @PostConstruct annotation. In the embedded, the code is:

          import javax.ejb.PostConstruct;

          ...

          In the JBoss AS, the code is:

          import javax.annotation.PostConstruct;

          ...

          []s,

          Gustavo Wagner