-->
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: How long are sessions supposed to live?
PostPosted: Tue Nov 04, 2003 8:29 am 
Newbie

Joined: Tue Nov 04, 2003 7:44 am
Posts: 4
Location: London
Hello,

According to the documentation, Hibernate guarantees id consistency within the same session (one id in the database corresponds to one and only java object - for a particular class).

I am building a fat client (swing gui etc), that will talk to a MySQL database through Hibernate, and it seems like a good idea to use a single session with multiple transactions for the duration of the runtime of the client. This would have the advantage that hibernate would keep track of what's loaded and what's not, instead of me implementing it.

Are sessions meant to be used like that? Does the fact that I will have a single session has any resource implications given that multiple clients will be connected at the same time? Should I be reconnecting/disconnecting the session before/after each of the transactions?

Thanks,

_________________
Stathis Sideris


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2003 8:31 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
http://forum.hibernate.org/viewtopic.php?t=924565

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.