[jboss-user] [JBoss Seam] - Re: @Startup and hbm2ddl

matt.drees do-not-reply at jboss.com
Thu Dec 13 13:34:23 EST 2007


If you're using an EntityManagerFactory component (i.e., you're not using the app server's EMF), then the hbm2ddl is run by entityManagerFactory's @Create method.  So your @Startup component depends on the database, then you can denote the dependency in the annotation: 

  | @Startup(depends={"yourEntityManagerFactoryNameHere"})
  | 
 and your component's @Create method will be run afterwards.


However, instead of using an application-scope/@Startup component, I'd recommend using an observer of the org.jboss.seam.postInitialization event.  It's a bit cleaner, IMO.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112676#4112676

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112676



More information about the jboss-user mailing list