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