-->
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: Session-per-conversion or Session-per-request?
PostPosted: Mon Jan 02, 2006 3:43 pm 
Newbie

Joined: Sun Jan 01, 2006 9:38 pm
Posts: 5
Which approach do you prefer for implementing long application transactions?

I have used Session-per-request with detached objects extensively, and find it a natural and easy way to work.

However, I notice that Hibernate in Action seems to be in favour of Session-per-conversation (page 329; "we're inclined to think that it isn't [per-request] the best approach for servlet-only-applications")

Unfortunately, as far as I can see, the book doesn't actually explain the reasons why.

Anyone any thoughts on this?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 4:37 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Of course its explained: Because session-per-conversation doesn't require a detached state, doesn't expose you (at least not as easily) to identity scope issues, and does not require manual reattachment.


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.