public static void closeSession() throws HibernateException {
  Session session=(Session)threadLocal.get();
  threadLocal.set(null);
  if (session != null) {
    session.close();
  }
}

public static void closeSession ( ) throws HibernateException { Session session = ( Session ) threadLocal . get ( ) ; threadLocal . set ( null ) ; if ( session != null ) { session . close ( ) ; } }
close the single hibernate session instance .
