-->
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.  [ 3 posts ] 
Author Message
 Post subject: Entitymanager confusion
PostPosted: Sun Apr 11, 2010 6:44 am 
Newbie

Joined: Sun Apr 11, 2010 6:28 am
Posts: 2
Hi!
I am having some troubles understanding the current "way to go" for hibernate. I've always used hibernate session (sometimes with spring templates) so far. But now hibernate-entitymanager seems to be a lot more appealing (JPA 2.0).

From my understanding the hibernate entitymanager somehow wraps arround the basic (session) core, is that correct? So it seems a little bit strange for me to use the entitymanager if it just wraps arround the core which i could use myself. I can't see a point in doing that (except that i whould have no direct dependency on hibernate then) maybe you could help me understand?

Could you please summarize for me the pros/cons of using hibernate session against using entitymanager?


Top
 Profile  
 
 Post subject: Re: Entitymanager confusion
PostPosted: Tue Apr 13, 2010 12:52 am 
Newbie

Joined: Sun Apr 11, 2010 6:28 am
Posts: 2
sry for pushing this up again but even after reading a lot of documentation i still dont know what the recommended way of using hibernate is today.

should is use entitymanager or is there a disadvantage in doing so?


Top
 Profile  
 
 Post subject: Re: Entitymanager confusion
PostPosted: Tue Apr 13, 2010 3:19 am 
Newbie

Joined: Tue Mar 23, 2010 9:04 am
Posts: 6
You use the javax.persistence.EntityManager interface to hide the fact that the underlying implementation is Hibernate etc. If you never use any vendor specific implementations (only JPA API) then it would be easy to exchange the persistence provider.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.