I had a similar use case 8 years ago and also had to resolve to using a custom Hibernate with SessionFactoryImpl (among other Impl classes) marked non-final. The interceptors would do the trick. I am now facing another situation where these interceptors would solve the problem. Again, we need to implement a form of shared schema multitenancy. In our situation, the interceptors would be more valuable than the proposed discriminator multitenancy feature, because that would obstruct controlled sharing between tenants, and shared reference data. |