Our operations group was asked by my manager to spend time puttting together a MySQL master/slave replication "cluster". Now, I'm stuck with the task of configuring our already completed system to work with the cluster, and I seem to have only roadblocks in my path.
I have tried calling session.connection().setReadOnly(true/false) at the appropriate times, but Hibernate seems to fail on write ops even when I've setReadOnly to false; it seems like it has amnesia.
I've also tried with the "hibernate.connection.failOverReadOnly" configuration property set to true. All requests in this case go to the master, and the slaves are unused.
Has anyone successfully integrated a MySQL master/slave cluster with Hibernate? If so, what changes to your code or config did you need to make? I'd like to know, and soon.
Thanks,
Tom
thomas (dot) harris (at) sourcemedia (dot) com
Hibernate version: 3.2.5GA, Annotations 3.3.0GA, Entity 3.3.1GA, Validator 3.3.0GA
Mapping documents: None, annotations.
Name and version of the database you are using: MySQL 5.0.45
|