-->
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.  [ 2 posts ] 
Author Message
 Post subject: 20 over datasource. is it problem?
PostPosted: Thu Nov 13, 2008 3:22 am 
Beginner
Beginner

Joined: Tue Jul 03, 2007 11:36 am
Posts: 24
I have 20 over schema in the db with the same table name and structure. Is there a problem if i create 20 over datasource? The datasource is base on user login. Got any other way to do it better?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 13, 2008 5:57 am 
Regular
Regular

Joined: Mon Aug 20, 2007 6:47 am
Posts: 74
Location: UK
It's fine to do that but you with need to configure 20 session factories, one for each db, and write some code of your own to make sure that te right one is used for each user session.

I've done this myself before for 8 databases. It worked ok but the problem comes when you want to start using a second level cache. I'm not sure they are set up to work out of the box in the scenario you describe. The main problem is with primary keys where your keys are unique in each schema but probably not unique across all 20 schemas.

I would recommend merging all schema's into one if possible, otherwise either don't use a second level cache (not recommended!) or tread carefully.


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

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.