Search

12.3.4. Specify Database Dialect for Java Persistence API

download PDF
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 alternative 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 2005: org.hibernate.dialect.SQLServerDialect
  • 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
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.