1 Reply Latest reply on Sep 4, 2004 10:48 AM by komone

    auto-create tables using hibernate as JCA

    komone

      Hi,

      After reading the draft EJB 3.0 I should learn a lot more about it hibernate!

      It's been pretty easy to get going, and seems a lot faster at higher loads than EJB 2.0 entities :), but there's a level of automation in development that I sorely miss.

      I'm using JBoss 3.2.x and up to now was using CMP/CMR. What was very useful with JBoss CMP was to be able to exclusively use XDoclet, and completely ignore the schema during early development, and just let JBoss CMP create/drop the tables.

      Since I've got Hibernate 2 configured for JCA, I can't figure out how to set the hbm2ddl.auto property to create-drop (I am guessing it really does do the same job) since that's not a supported attribute of the hibernate JMX service.

      The basic structure of the app deployment is:

      myapp.ear
       meta-inf
       application.xml
       jboss-app.xml
       hibernate.sar
       */*.hbm.xml
       meta-inf
       jboss-service.xml
       session-ejb-*.jar
       pojo-hbm-*.jar
       webapp-*.war


      I tried dropping a hibernate.cfg.xml in both hibernate.sar and hibernate.sar/meta-inf to specify the additional hibernate.hbm2ddl.auto property I think I need, but with no success.

      Any pointers would be most welcome.

      Thank you
      /k1