Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL NDB Cluster + Hibernate

Does anyone know if you can use mySQL Cluster with Hibernate?

like image 847
DD. Avatar asked Dec 13 '22 21:12

DD.


1 Answers

First of all, an important part of the question is the JDBC driver support and it appears that you can use JDBC (Connector/J) with MySQL Cluster (see this blog post) so one can imagine declaring such a JDBC URL in Hibernate's configuration.

Then, my understanding of the MySQL Cluster Overview is that data nodes are seen as a whole (from the documentation, if one application updates the salary of an employee, all other MySQL servers that query this data can see this change immediately) so Hibernate should be happy with that.

However, if you want to have Hibernate create tables using the NDB engine, you'll need a special dialect (see HHH-1496). Nothing complicated though.

So in theory, everything seems ok. In practice, I don't have any experience with such a setup.

like image 146
Pascal Thivent Avatar answered Dec 15 '22 11:12

Pascal Thivent