| Author |
mysql replication and hibernate
|
Girish Vasmatkar
Ranch Hand
Joined: Apr 24, 2008
Posts: 199
|
|
Hi all,
Has anyone done the mysql replication and used hibernate in the application? I am working on a fairly large web site that requires us to use mysql replication. I was wondering how hibernate handles mysql replication.
Do I have to change the code accordingly and specify some configuration information to hibernate to use mysql replication? I am also using spring in the application.
I have searched a lot regarding this subject and could not find any concrete information.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Hibernate doesn't do anything to support this. It will use whatever connections you configure it to use. If your database supports clustering its down to the driver to provide a mechanism to failover to another node. A quick glance at the MySQL docs suggests the ReplicationDriver is what you need.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Girish Vasmatkar
Ranch Hand
Joined: Apr 24, 2008
Posts: 199
|
|
Hi Paul, thanks for the quick reply!!
A quick glance at the MySQL docs suggests the ReplicationDriver is what you need
So, does that mean simply specifying the ReplicationDriver will do the job? And all the replication configuration will be done at mysql end only?
Thanks again!!
|
 |
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Joined: Aug 26, 2006
Posts: 4967
|
|
Paul's right. You'll use Hibernate for your object relational mapping within your application, but replication is really a job that's best done by the database itself. That type of functionality is built into the database for you.
-Cameron McKenzie
|
Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
|
 |
 |
|
|
subject: mysql replication and hibernate
|
|
|