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: single hibernate mapping for multiple databases
PostPosted: Thu Oct 08, 2009 5:38 am 
Newbie

Joined: Thu Oct 08, 2009 5:19 am
Posts: 1
Hello,
I'm developing a tool using Hibernate and postgresql DBMS which will allow users to create project (very large set of information). To optimize performance, we opted to build a single database per user connection to back up only the data are proposed. Summarizing, One USER = One Database.
However, the services layer for data accessing remains the same. It is therefore, when a User login that,
(1) i create a database for its data (its workspace), and
(2) i redirect Hibernate to the correct user database.
An unlikely solution would be to modify hibernate.cfg.xml at application's startup and update classpath. But that does not interest me.
Someone told me that I could use the hibernate datasources component to claim my problem. would Someone give me a piece of sample code using hibernate datasources component?

Any other solution approach to solve this problem interesst me.

Regards.


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.