-->
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: Switching between databases
PostPosted: Tue Feb 01, 2005 12:41 pm 
Regular
Regular

Joined: Fri Mar 26, 2004 11:45 am
Posts: 75
Greetings.

I have several databases with identical schemas. According to the Hibernate FAQ I need to configure a SessionFactory for each of these databases. However, loading mapping files is quite a lenthy process, so the approach that my colleague was using was to alter hibernate.connection.url at run-time. He was replacing the current database name with new one he needed to use next.

However, database urls are different from vendor to vendor, so URL string manipulation is not the best way to accopmplish switching to another database.

What is the right (and efficient) way to switch to another database with the identical to the current database schema?

Thanks.

Alec


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.