-->
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.  [ 2 posts ] 
Author Message
 Post subject: SessionFactory management
PostPosted: Tue Mar 01, 2005 10:54 am 
Beginner
Beginner

Joined: Wed Feb 23, 2005 9:24 am
Posts: 28
hi all,

I'm starting a new application upon an existing database with 100 tables.
I'm using spring IOC to configure hibernate dao's SessionFactories.

I'm facing to the choice of SessionFactory strategy.
I would like to know if it's a good approach to have a single SessionFactory for the all DAO.
Or it's a better approach to bind related dao's to a Sessionfactory.

I've read the Chapter 8(Writting Hibernate Application) of Hibernate in Action but there is no answer to my dilemma.

Can someone tells me if there is performance impact beetween the two possibilities.

thanks in advance.

Meissa


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 12:50 pm 
Regular
Regular

Joined: Thu Dec 18, 2003 2:14 am
Posts: 103
Location: Brooklyn, NY
You need one SessionFactory for each database, not for each DAO. The DAOs should get injected with a Session from the SessionFactory, if you wire Spring up properly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.