Hi,
We are developing a Multi-tenant application with having Separate Schema per tenant.
We are using one SessionFactory per each Schema which is working fine without using OpenSessionInViewFilter.
As we want to use Spring TransactionManager we need to configure OpenSessionInViewFilter/OpenSessionInViewInterceptor
We could find some references to customize OpenSessionInViewFilter to handle multiple SessionFactories (by overriding lookupSessionFactory method), but it is not working for us as we need to reference this Filter from our DAOs.
So we planned to go for OpenSessionInViewInterceptor which can be accessible from other beans (DAOs), but not finding a way to customize it to lookup for SessionFactory based on TenantId.
We are using Hibernate 3.2.5 and Spring-2.5.6
thanks in advance.
Uma
|