Tenancy with Spring Data JPA+Hibernate

I want to implement DISCRIMINATOR based Multi-Tenancy solution for Shared Schema Based Multi-Tenancy Model -common database schema for all tenants.

Technology stack

  • Hibernate 3 Global filter (I can't use EclipseLink)
  • Spring Data JPA - I want this because we are already using this one and we cant change it.
  • My questions are

  • How to achieve this : Spring Data JPA has no any support for GLOBAL filter so I need to add customize Spring Data JPA repository which can in-turn apply global filter for DISCRIMINATOR based solution?
  • At all, Is it possible to implement my requirement with Spring Data JPA+Hibernate 3?

  • Using hibernate filters you can achieve below items in our application,

  • Multi-tenancy,
  • Authorisation
  • Authentication
  • Row level authorisation
  • In our application we applied this and got great results and applied the same stuff to other web based products as well. For your reference go through the below link and you will get some idea on the above stuffs. http://www.jroller.com/RickHigh/entry/using_spring_aop_and_hibernate

    链接地址: http://www.djcxy.com/p/44088.html

    上一篇: Spring Data JPA:使用规范实现自定义存储库行为

    下一篇: Spring数据JPA + Hibernate的租赁