@Override protected void doClose() throws Exception { helper.close(); super.doClose(); }
/** * Close the cursor and hibernate session. */ @Override protected void doClose() throws Exception { if(initialized) { if (cursor != null) { cursor.close(); } helper.close(); } initialized = false; } }
@Test public void testSessionReset() throws Exception { StatelessSession session = mock(StatelessSession.class); when(sessionFactory.openStatelessSession()).thenReturn(session); helper.setSessionFactory(sessionFactory); helper.createQuery(); assertNotNull(ReflectionTestUtils.getField(helper, "statelessSession")); helper.close(); assertNull(ReflectionTestUtils.getField(helper, "statelessSession")); }
@Override protected void doClose() throws Exception { helper.close(); super.doClose(); }
/** * Close the cursor and hibernate session. */ @Override protected void doClose() throws Exception { if(initialized) { if (cursor != null) { cursor.close(); } helper.close(); } initialized = false; } }