-->
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: Impl - Differenc between EntityManager vs SessionFactory?
PostPosted: Fri Feb 16, 2007 11:55 am 
Newbie

Joined: Fri Feb 09, 2007 2:43 pm
Posts: 4
Hi,

I'm pretty new at working with Hibernate so please bear with me. Could someone point me to some useful links or please explain though the difference between these two implementation approaches?

While working with Struts 1.X and using Hibernate I started to become familiar with the whole idea of hibernate mapping files and creating appropriate DAO classes for all my services. I find it really good since I can completely decouple the dB layer from the business logic layer and just hibernate mapping files for configuration.

Fast forward - now I have been working with the beta builds of Struts 2.0 following examples of the make use of Hibernate and the new JPA. This introduces Hibernate Annotations and the Hibernate EntityManager. The introduction of the EntityManager and Annotations eliminates the requirement of using hibernate mapping files ( at least from examples i've looked at.)

So my question is really what is the difference between the two approaches? pros and cons? or could someone explain or point me toward material that could clear up my confusion?

In the second approach now I simply can pass my service implementations objects as constructors to my action classes and the entitymanager can take care of the rest (kind of.)

Thanks in advance to anyone who can offer some insight!

Regards,
Paul


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.