3 Replies Latest reply on Jun 24, 2008 12:34 AM by Stefano Travelli

    DatabaseInitialization after Component creation

    Michael Imari Newbie

      Hello,


      I want to do a database initialization after the creation of an Application-Scoped component.


      @Name("service.Application")
      @Scope(ScopeType.APPLICATION)
      public class Application {
      
       @In
       DAO dao;
      
       @create
       public void initDatabase(){
         dao.initDatabase();
       }
      }
      



      I found the @create or @PostConstruct annotation but the annotated method is called to early because the dao is not set in initDatabase.


      How can I solve the problem?


      Regards,


      Mika