JBoss Community

Re: Jboss 4.2 and Hibernate: How do I autogenerate tables in database

created by Devinder Singh in Beginner's Corner - View the full discussion

In JBoss 6, you can add persistence.xml with below settings. This file is in META-INF dir of EJB.

<persistence-unit name="<some name>" transaction-type="JTA">

                      <jta-data-source>java:DefaultDS</jta-data-source>

                           <properties>

                                          <property name="hibernate.hbm2ddl.auto" value="update" />

     </properties>

</persistence-unit>

 

Not sure if this will work with Jboss 4. But I think similar settings will go into hibernate.cfg.xml file to autogenerate tables.

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community