synchronized void unregisterToNotifications() throws JMSException {
  if (eventSession == null) {
    return;
  }
  if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE,toString2() + "GSMessageConsumerImpl.unregisterToNotifications(): unregistering from notifications");
  }
  try {
    eventSession.close();
  }
 catch (  IOException e) {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,toString2() + "GSMessageConsumerImpl.stopAsynchronous(): IOException while closing event session" + e);
    }
    JMSException e1=new JMSException("Failed to close event session.");
    e1.setLinkedException(e);
    throw e1;
  }
catch (  UnknownLeaseException e) {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,toString2() + "GSMessageConsumerImpl.stopAsynchronous(): UnknownLeaseException while closing event session" + e);
    }
    JMSException e1=new JMSException("Failed to close event session.");
    e1.setLinkedException(e);
    throw e1;
  }
catch (  Exception e) {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,toString2() + "GSMessageConsumerImpl.stopAsynchronous(): UnknownLeaseException while closing event session" + e);
    }
    JMSException e1=new JMSException("Failed to close event session.");
    e1.setLinkedException(e);
    throw e1;
  }
 finally {
    eventSession=null;
  }
}

synchronized void unregisterToNotifications ( ) throws JMSException { if ( eventSession == null ) { return ; } if ( _logger . isLoggable ( Level . FINE ) ) { _logger . log ( Level . FINE , toString2 ( ) + "GSMessageConsumerImpl.unregisterToNotifications(): unregistering from notifications" ) ; } try { eventSession . close ( ) ; } catch ( IOException e ) { if ( _logger . isLoggable ( Level . FINE ) ) { _logger . log ( Level . FINE , toString2 ( ) + "GSMessageConsumerImpl.stopAsynchronous(): IOException while closing event session" + e ) ; } JMSException e1 = new JMSException ( "Failed to close event session." ) ; e1 . setLinkedException ( e ) ; throw e1 ; } catch ( UnknownLeaseException e ) { if ( _logger . isLoggable ( Level . FINE ) ) { _logger . log ( Level . FINE , toString2 ( ) + "GSMessageConsumerImpl.stopAsynchronous(): UnknownLeaseException while closing event session" + e ) ; } JMSException e1 = new JMSException ( "Failed to close event session." ) ; e1 . setLinkedException ( e ) ; throw e1 ; } catch ( Exception e ) { if ( _logger . isLoggable ( Level . FINE ) ) { _logger . log ( Level . FINE , toString2 ( ) + "GSMessageConsumerImpl.stopAsynchronous(): UnknownLeaseException while closing event session" + e ) ; } JMSException e1 = new JMSException ( "Failed to close event session." ) ; e1 . setLinkedException ( e ) ; throw e1 ; } finally { eventSession = null ; } }
closes the notifydelegator so no more notifications will arrive .
