It seems that it is not necessary to set this "hibernate.dialect" property. The
correct dialect is chosen by the framework at run-time. For example, if I have a
mysql-ds.xml file with the following contents:
| <datasources>
| <local-tx-datasource>
| <jndi-name>MyDS</jndi-name>
|
<connection-url>jdbc:mysql://localhost:3306/mydb</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| ...
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
|
... then I receive the following output in the console:
| [ConnectionProviderFactory] Initializing connection provider:
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
| [InjectedDataSourceConnectionProvider] Using provided datasource
| [SettingsFactory] RDBMS: MySQL, version: 5.0.51b-community-nt
| [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version:
mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} )
| [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
|
Note that, if you don't include the database driver in deploy/lib, JBoss will throw an
exception reporting that the hibernate dialect must be set. We made this mistake and the
exception lead us to believe that we had to set the "hibernate.dialect"
property.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173337#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...