public void testUserProvidedConnection() throws Exception { ConnectionProvider dcp = new DriverManagerConnectionProvider(); dcp.configure( Environment.getProperties() ); Session s = getSessions().openSession( dcp.getConnection() ); Transaction tx = s.beginTransaction(); s.find("from Fo"); tx.commit(); Connection c = s.disconnect(); assertTrue( c!=null ); s.reconnect(c); tx = s.beginTransaction(); s.find("from Fo"); tx.commit(); assertTrue( s.close()==c ); c.close(); }