-->
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: Multiple SessionFactories with same schema
PostPosted: Sun May 08, 2005 6:14 am 
Regular
Regular

Joined: Mon Apr 25, 2005 9:22 am
Posts: 62
Location: Bucharest/Romania
Hibernate version: 3.0.2

This subject seems to be asked/answered many times on the forum, but with no final verdict (or is just me not seeing it).

I have the following scenario (non-arguable ;-)):
1/ one DB that contains in one of the tables runtime updatable information about N DB
2/ the N dbs are using exactly the same schema (about 180 tables + views, all mapped)

Starting from the afirmation that "obtaining a new SessionFactory is a time consuming operation" I would like to find out if the following scenario may help on speeding up (at least a little bit):

1/ create a Configuration containing the mapping files
2/ for every new SessionFactory, set in the Configuration the Properties of the connection and call buildSessionFactory().

Imo it seems that the time consumption in creating the SessionFactory may come from:
1/ loading all mapping files (about 180)
2/ buildSessionFactory() operation (rescan mappings, obtaining the JDBC connection)

The above scenario seems to remove the 1st time consumption operation.

I would like to know if this is the best I can do or there are more tricks that can be involved in order to speed up.

greatfully,


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.