-->
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: Clone a Hibernate SessionFactory with just different dbname?
PostPosted: Tue Jun 18, 2013 12:30 pm 
Newbie

Joined: Tue Jun 18, 2013 12:18 pm
Posts: 1
Hallo,

In our project we use many session factories to connect to different data sources but they all contain exactly the same schema. Unfortunately on 32 bit machines it can take up to 30 seconds to initialize and load a SessionFactory which is unacceptable and we are trying methods to improve this.

Would it be possible to simply clone a hibernate session factory with exactly the same schema information so that we can then simply change the properties like database name and host? Or this is not supported at all?

Unfortunatelly after the invocation of buildSessionFactory even if we can clone the session factory there are not methods like setHost and setDatabaseName or even setJdbcURL? Are there any other alternatives to speed up session factory loading apart from caching XML descriptor files (we already tried that).

Thank you for support.


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.