2 Replies Latest reply on Mar 21, 2014 7:58 AM by David Hileman

    JPA, Hibernate, How to specify database engine for MySQL datasource?

    David Hileman Newbie

      Hello all,

       

      I have a JPA project, using a Wildfly 8 configured JTA MySQL Cluster datasource.  The problem I am having is, when my entity tables are created, they are only being created on one data node in my 2-node DB cluster. 

       

      Is there a way to specify the DB engine for JPA to use to create the tables?  If I log in to the MySQL server and enter the statement directly, while specifying the engine, the table is created on both DB nodes correctly:

       

      CREATE TABLE Person ENGINE=NDBCLUSTER;
      

       

      Is there any known hibernate property that goes in persistence.xml to specify engine? Or in the Wildfly datasource?

       

      Is there a special sql dialect for using NDBCLUSTER.  I have only seen the following dialects documented for MySQL:

       

      MySQL5Dialect

      MySQL5InnoDBDialect

      MySQLDialect

      MySQLInnoDBDialect

      MySQLMyISAMDialect

       

      Thanks