code: void checkClosed() throws JMSException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "checkClosed");
  
          synchronized (closedLock) {
              if (closed) {
                  throw (JMSException) JmsErrorUtils.newThrowable(javax.jms.IllegalStateException.class,
                                                                  "CONSUMER_CLOSED_CWSIA0081",
                                                                  null,
                                                                  tc);
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "checkClosed");
      }
docs: This method is called at the beginning of every method that should not
  work if the consumer has been closed. It prevents further execution by
  throwing a JMSException with a suitable "I'm closed" message.