-->
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: Identical database schemas and runtime database selection
PostPosted: Thu Sep 07, 2006 11:23 am 
Newbie

Joined: Wed Mar 08, 2006 11:29 am
Posts: 2
Hi!

I am using Hibernate 3.0 with JBoss 4.0.3 and Microsoft SQLServer.
In the sql server there are 3 different databases with identical schemas. On logging in a web application, the user should be asked to select one of the three databases and from that point on he should transact only with this database. The session factory to the sql server is created by a jboss hibernate service once, on server startup.

Is it possible that i could avoid writing the hibernate mappings and the persistence classes three times (one for each database)? Is there any way to change the name of the schema that a table belongs to just before the query is executed? Is it possible that event listeners would help? Any ideas would be appreciated.

Thanks in advance.


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.