code: public void destroy() {
          try {
              super.destroy();
          } finally {
              closeQuietly(connection);
              closeQuietly(messageProducer);
              closeQuietly(producerSession);
              closeQuietly(messageConsumer);
              closeQuietly(consumerSession);
              if (connectionFactory != null && myOwnConnectionFactory) {
                  connectionFactory = null;
              }
          }
      }
docs: Destroy method.