Show Table of Contents
16.4.4. Specify Database Dialect for Java Persistence API
The Java Persistence API (JPA) entity manager can save EJB3 entity beans to any backend database. Hibernate provides the JPA implementation in JBoss Enterprise Application Platform. Hibernate has a dialect auto-detection mechanism that works for most databases including the dialects for databases referenced in this appendix which are listed below. If a specific dialect is needed for production databases, you can configure the database dialect in the
<JBOSS_HOME>/server/<PROFILE>/deployers/ejb3.deployer/META-INF/jpa-deployers-jboss-beans.xml file. To configure this file you need to uncomment the set of tags related to the map entry hibernate.dialect and change the values to the following based on the database you setup.
- Oracle 10g:
org.hibernate.dialect.Oracle10gDialect - Oracle 11g:
org.hibernate.dialect.Oracle10gDialect - Microsoft SQL Server 2008:
org.hibernate.dialect.SQLServerDialect - PostgresSQL 8.2.3:
org.hibernate.dialect.PostgreSQLDialect - PostgresSQL 8.3.7:
org.hibernate.dialect.PostgreSQLDialect - MySQL 5.0:
org.hibernate.dialect.MySQL5InnoDBDialect - MySQL 5.1:
org.hibernate.dialect.MySQL5InnoDBDialect - DB2 9.1:
org.hibernate.dialect.DB2Dialect - Sybase ASE 15:
org.hibernate.dialect.SybaseASE15Dialect

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.