Hibernate shards and JPA
I'm evaluating Hibernate Shards for a project that uses hibernate-jpa.
I was wondering how mature is shards when it comes to JPA? The docum开发者_高级运维entation mostly covers the SessionFactory modifications.
Any other recommendations for horizontal partitioning with JPA ?
Thanks.
It would seem that Hibernate Shards isn't developed very actively and have never gone beyond the first beta. See https://hibernate.onjira.com/browse/HSHARDS
There is a forked version on https://github.com/karbo/hibernate-shards/tree/hibernate-3.3 which has been upgraded to a newer version of Hibernate.
Spring has some support for this which is outlined here Multi tenancy in Hibernate
Hibernate 4 (JPA) does seem to have multi tenant included: Spring + Hibernate + JPA + multiple databases
精彩评论