-->
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.  [ 1 post ] 
Author Message
 Post subject: On session.disconnect(), session.isConnected() still true
PostPosted: Mon Jul 30, 2012 5:44 am 
Newbie

Joined: Mon Jul 30, 2012 5:39 am
Posts: 1
Hello,

i checked the forum and various docs, but i did not find any hint. When using this code:

Code:
Session session1 = factory.openSession();
session1.setFlushMode(FlushMode.NEVER);
session1.beginTransaction();
   
list<Janitor2> result = (list<Janitor2>) session1.createQuery("from hiberJanitor.Janitor2 jan left join fetch jan.properties order by jan.id asc").list();
   
log DEBUG : "STOP size=" + result.size
session1.getTransaction().commit();
   
Connection conn = session1.disconnect();
log DEBUG : "disconnected session: connected? " + session1.isConnected() + " open? " + session1.isOpen() + " active? " + session1.getTransaction().isActive()


isConnected() is still true... isOpen is still true but isActive() is false (what is right). I noticed, that the return conn from session1.disconnect is null.

Is there something wrong with my configuration. Why does hibernate not close the underlying connection?

Best Dan.

Ps. I m working with long session explained in "hibernate in action" p. 325ff


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.