concept Hibernate archive in category jboss

This is an excerpt from Manning's book JBoss in Action: Configuring the JBoss Application Server.
The example references the data source
created in the previous section. Therefore, a Hibernate archive isn’t a replacement for a *-ds.xml file; it builds on it. Because that data source uses the MySQL database, we identify it as such in the dialect property
. The Hibernate documentation lists the various dialects that are available; there’s one for almost every available relational database.
The create-drop setting for Hbm2ddlAuto
indicates that Hibernate automatically creates the tables described by the mapping files and drops any tables found in the database that aren’t in one of the mapping files. This is a feature that would be used in a development environment, but not with a production database. The Hibernate archive deployer automatically scans the Hibernate archive looking for mapping files, *.hbm.xml; you don’t have to explicitly identify those files. The Hibernate documentation describes the various other settings for the Hbm2ddlAuto attribute.
The application.xml file is a standard Java EE descriptor, and because Hibernate archives aren’t part of standard Java EE, they can’t be referenced in that file. Instead, you use a META-INF/jboss-app.xml file to reference the Hibernate archive, as follows:
created in the previous section. Therefore, a Hibernate archive isn’t a replacement for a *-ds.xml file; it builds on it. Because that data source uses the MySQL database, we identify it as such in the dialect property
. The Hibernate documentation lists the various dialects that are available; there’s one for almost every available relational database.
indicates that Hibernate automatically creates the tables described by the mapping files and drops any tables found in the database that aren’t in one of the mapping files. This is a feature that would be used in a development environment, but not with a production database. The Hibernate archive deployer automatically scans the Hibernate archive looking for mapping files, *.hbm.xml; you don’t have to explicitly identify those files. The Hibernate documentation describes the various other settings for the Hbm2ddlAuto attribute.