-->
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: WARNUNG: finalizing unclosed session with closed connection
PostPosted: Tue Sep 14, 2004 6:39 am 
Beginner
Beginner

Joined: Sun Apr 04, 2004 8:45 am
Posts: 20
What does it mean? Because, my code is as follow:

Code:
Session session = null;
Transaction tx = null;

try
{
session=DbHandler.getInstance.getSession(); // returns back a session
tx = session.beginTransaction();

// get objects from database ...
// change objects ...
// update objects ...

tx.commit();
}
catch(Exception e)
{
    // exception handling
}
finally
{
    session.close();
}

What have I to do to close connection before finalizing session? I thought, wen I close the session, the connection will be closed too. It's actually only a warning, but I'm neverthless confused!

Tanks for any help.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 14, 2004 6:34 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
Would be very helpfull if you could provide a stacktrace and possibly a log of Hibernate at debug level.


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.