-->
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: About Session.isOpen() and Session.isConnected()
PostPosted: Fri Apr 23, 2004 6:53 am 
Beginner
Beginner

Joined: Thu Dec 04, 2003 3:47 am
Posts: 31
Location: Hong Kong
I have 2 questions about the Hibernate API

1. what is the difference between Session.isOpen() and Session.isConnected()?

2. Suppose I''m using JDBCConnection for Hibernate, when the connection is closed (by timeout, server shut down, or killed by others etc.), what should Session.isOpen() and Session.isConnected() return? I have an experience that if the connection is closed not through Hibernate, both two methods still return true, and I expect it shall return false.


I'm using Hibernate 2.1.2
Thank!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 23, 2004 7:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
1. exactly the difference between session.close() and session.disconnect()
2. validating connections and things is the job of the pool not of hibernate. If your connections get randomly closed during your buisness logic, you will have more problems than with hibernate.


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.