Skip to content

kaddiya/hibernate-multi-host-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proof of Concept: Hibernate with MySQL Multi-Host

The MySQL driver has built-in support for master-slave replication. However, how does this work with Hibernate? The PoC needs to demonstrate the following things, preferably through automated tests.

  1. There are two MySQL servers, one of which is routed to master/read-write by the driver, and one of which is routed to as slave/read-only by the driver.
  2. There can be a single Hibernate session which uses a single DB connection, but which can use the master/read-write or the slave/read-only when configured by some kind of setReadOnly(true) call.
  3. We can persist entities through that Hibernate session, and we can retrieve entities through that Hibernate session.
  4. Caching of entities works within that single Hibernate session.

Releases

No releases published

Packages

No packages published

Languages