code: @Override
      public void close() throws IllegalStateRuntimeException, JMSRuntimeException {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "close");
  
          try {
  
              jmsSession.close();// close the session
              if (jmsConnection.getSessionCount() == 0)// if its a last JMSContext, close the connection itself
                  jmsConnection.close();
          } catch (IllegalStateException ise) {
              throw (IllegalStateRuntimeException) JmsErrorUtils.getJMS2Exception(ise, IllegalStateRuntimeException.class);
          } catch (JMSException jmse) {
              throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
          } finally {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(this, tc, "close");
          }
      }
docs: /*
  Users can create multiple JMSContext using {@link JmsJMSContextImpl#createContext(int)},
  and close the context using {@link JmsJMSContextImpl#close()}.
  The last call to {@link JmsJMSContextImpl#close()} will ensure that the jmsConnection is closed
  
  @see javax.jms.JMSContext#close()