-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: OpensessionInViewInterceptor handle multipl SessionFactories
PostPosted: Mon Dec 12, 2011 8:00 am 
Newbie

Joined: Mon Dec 12, 2011 7:18 am
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.