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: IStatelessSession usage
PostPosted: Thu Feb 05, 2009 4:18 am 
Newbie

Joined: Thu Feb 05, 2009 3:58 am
Posts: 1
Hi all,

We just upgraded to the latest version of NHibernate and noticed the new IStatelessSession. We are wondering if it would be wise to use this IStatelessSession everywhere instead of a normal session. Would there be a performance gain?

We always use detached objects. For example if I would change the name of a person in the database I would call a GetPersonById method. In this method a new session is created the person is fetched and the session is closed. Then I put a new name in the name property of the person object. To save the person I pass the person object to a save method which will create a new session and performs a update.

Thanks!


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.