-->
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: SessionFactoryFactory - save startup time
PostPosted: Thu Aug 24, 2006 8:15 am 
Newbie

Joined: Mon Jun 19, 2006 5:35 am
Posts: 14
I'm using Hibernate 3.1.2+annotations. The application is using the same Hibernate Configuration to access two or more schemas (e.g. three different data sources) at a time. The schemas are different databases on the same MySQL database server.

Currently I'm creating n Configurations (n=number of data sources used) and n Session Factories. This works fine but esentially multiplies the startup time by a factor of n.

Most time building the configuration/session factory is spent doing some parsing/reflection/cglib stuff. I'd imagine the gathered data could be cached/reused in other session factories (in the same VM) without much harm. Remember that my session factories are all the same except the data source.

Would that make sense ? That would actually end up as some sort of "SessionFactoryFactory"...


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.