コード例 #1
0
 @Override
 @After
 public void tearDown() throws Exception {
   if (jmsMgr != null) {
     jmsMgr.close();
   }
 }
コード例 #2
0
 /**
  * Stops the MessagingClient, shuts down connections. If the unsubscribe parameter is set to true,
  * all durable subscriptions will be removed.
  *
  * @param unsubscribe
  */
 public void stop(boolean unsubscribe) throws MessagingException {
   try {
     if (unsubscribe) {
       m_jmsManager.unsubscribeAllDurable();
     }
     m_jmsManager.close();
     m_jmsManager = null;
     m_connected = false;
   } catch (MessagingException me) {
     logger.error(
         "Messaging Exception encountered attempting to stop "
             + "Messaging Client: "
             + m_clientId
             + ". Exception message: "
             + me.getMessage(),
         me);
     throw me;
   }
 }