3 Replies Latest reply on Dec 13, 2007 2:10 PM by Ivan B

    @Startup and hbm2ddl

    Ivan B Novice

      Hi,

      I've run into the following problem. I need to progammatically populate entity tables whenever upon the startup of the application. I thought that an application-scoped component, annotated with the @Startup would be the ideal place for placing those em-related statements.

      However, apparently there is a conflict with the hbm2ddl, that is still running (or not yet finished exporting DB schema) by the time the application-scoped component is created and initialised. The log shows that Seam context is initialised even before the hbm2ddl is run, i.e. before the tables are created in my case, which makes my initial assumption incorrect.

      Where can I put my custom DB init statements so that they run after hbm2ddl has done its job?

      Thanks,