@Override public void run() { try { jmsMgr.listen("fedora.apim.update", this); } catch (MessagingException e) { fail(e.getMessage()); } finally { listeningSignal.countDown(); } }
@Override public void interrupt() { try { jmsMgr.close(); } catch (MessagingException e) { fail(e.getMessage()); } finally { super.interrupt(); } }
/** * 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; } }
logger.error("MessagingException encountered attempting to start " + "Messaging Client: " + m_clientId + ". Exception message: " + me.getMessage(), me); throw me;
@Override public void shutdownModule() throws ModuleShutdownException { if(enabled()) { try { close(); } catch (MessagingException e) { throw new ModuleShutdownException(e.getMessage(), getRole(), e); } } }
@Override public void shutdownModule() throws ModuleShutdownException { if(enabled()) { try { close(); } catch (MessagingException e) { throw new ModuleShutdownException(e.getMessage(), getRole(), e); } } }
"should throw an exception"); } catch(MessagingException expected) { assertTrue(expected.getMessage().contains("properties")); "should throw an exception"); } catch(MessagingException expected) { assertTrue(expected.getMessage().contains(Context.INITIAL_CONTEXT_FACTORY)); "property should throw an exception"); } catch(MessagingException expected) { assertTrue(expected.getMessage().contains(Context.PROVIDER_URL)); "property should throw an exception"); } catch(MessagingException expected) { assertTrue(expected.getMessage().contains(Context.INITIAL_CONTEXT_FACTORY));