-->
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: Hibernate 4 + Spring 3 best practices to reach scalability
PostPosted: Mon Jan 20, 2014 4:41 pm 
Newbie

Joined: Mon Jan 20, 2014 4:39 pm
Posts: 1
Hi All, I am little confuse with hibernate and spring configuration, if I am using hibernate 4 and spring 3, the best way is using LocalContainerEntityManagerFactoryBean and HibernateJpaVendorAdapter, but my doubt is what about session factory? how JPA ara been managed?is this more perfomant than using SessionFactory?

The other question is, in my DAOs, should I inject an @PersistenceContext EntityManager?

Another question is, how connections are opened and closed? for example if I have:

entityManager.createQuery("Select model from person model where personid = ersonid").getSingleResult();

is this statement opening a closing a connection? then the JPA entity is store into the hiberante session??

I will be more than grateful if you help me with that.

Thanks in advance.


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.