-->
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.  [ 5 posts ] 
Author Message
 Post subject: Session disconecting
PostPosted: Sat Aug 05, 2006 4:21 am 
Newbie

Joined: Tue Mar 21, 2006 4:19 am
Posts: 15
Hi all! I have the following code
Code:
session.disconnect();
System.out.println("is connected: " + session.isConnected());


Ant the following code printes "is connected: true" in the console. Where is the problem?


Top
 Profile  
 
 Post subject: Re: Session disconecting
PostPosted: Sat Aug 05, 2006 4:58 am 
Beginner
Beginner

Joined: Thu Jul 20, 2006 12:08 pm
Posts: 21
Location: Germany
adr wrote:
Hi all! I have the following code
Code:
session.disconnect();
System.out.println("is connected: " + session.isConnected());


Ant the following code printes "is connected: true" in the console. Where is the problem?


Hi adr,

try the statement session.close()
IMHO it is a better way to disconnect and clean up !

greetz

marlon

_________________
marlon
---
don't hesitate to rate.


Top
 Profile  
 
 Post subject: Re: Session disconecting
PostPosted: Sat Aug 05, 2006 7:14 am 
Newbie

Joined: Tue Mar 21, 2006 4:19 am
Posts: 15
I don`t want to clear the cache, but to disconnect the connection in order to free it in the pool.


Top
 Profile  
 
 Post subject: Re: Session disconecting
PostPosted: Sat Aug 05, 2006 9:03 am 
Beginner
Beginner

Joined: Thu Jul 20, 2006 12:08 pm
Posts: 21
Location: Germany
adr wrote:
I don`t want to clear the cache, but to disconnect the connection in order to free it in the pool.


which "org.hibernate.ConnectionReleaseMode" do you use ?

_________________
marlon
---
don't hesitate to rate.


Top
 Profile  
 
 Post subject: Re: Session disconecting
PostPosted: Sat Aug 05, 2006 9:36 am 
Newbie

Joined: Tue Mar 21, 2006 4:19 am
Posts: 15
I don't use any.. maybe the default one?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.