-->
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: Question re: Long session with automatic versioning
PostPosted: Fri Oct 10, 2003 4:29 pm 
Beginner
Beginner

Joined: Tue Aug 26, 2003 4:19 pm
Posts: 42
I have a wizard-type screen flow and am thinking of using the Long session with automatic versioning pattern. I expect to have a fair number of abandoned sessions and I want to know what the consequences of this are. Will hibernate automatically expire the disconnected sessions? Can I just stick them in httpsessions and let the container expire them? Would the disconnected sessions consume a lot of system resources (assuming they've got a cache of objects in them)?

Any tips appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 10, 2003 9:31 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
It would be best to disconnect() the session and place it into session scope between the requests. Then during the subsequent requests, you can simply reconnect() the session.

This serves two purposes. One, because of the disconnect, the underlying jdbc connection can be released for better resource management by the server. Secondly the hibernate session would be destroyed on session timeout by it being in session scope.

HTH


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.