@Override public void unsubscribe(String name) throws JMSException { delegate.unsubscribe(name); }
@Override public void unsubscribe(String name) { checkSession(); try { session.unsubscribe(name); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
private void unsubscribe(final String url, final String username, final String password, final String subscriptionId, final String jmsProvider, final int timeoutMillis) throws JMSException { final Connection connection; if (username == null && password == null) { connection = JmsFactory.createConnectionFactory(url, timeoutMillis, jmsProvider).createConnection(); } else { connection = JmsFactory.createConnectionFactory(url, timeoutMillis, jmsProvider).createConnection(username, password); } Session session = null; try { connection.setClientID(subscriptionId); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); session.unsubscribe(subscriptionId); getLogger().info("Successfully unsubscribed from {}, Subscription Identifier {}", new Object[]{url, subscriptionId}); } finally { if (session != null) { try { session.close(); } catch (final Exception e1) { getLogger().warn("Unable to close session with JMS Server due to {}; resources may not be cleaned up appropriately", new Object[]{e1}); } } try { connection.close(); } catch (final Exception e1) { getLogger().warn("Unable to close connection to JMS Server due to {}; resources may not be cleaned up appropriately", new Object[]{e1}); } } }
@Override public void unsubscribe(final String name) throws JMSException { session.unsubscribe(name); }
@Override public void unsubscribe(String name) throws JMSException { nonXaSession.unsubscribe(name); }
@Override public void unsubscribe( String name ) throws JMSException { session.unsubscribe(name); }
@Override public void unsubscribe(String name) throws JMSException { getSession().unsubscribe(name); } }
@Override public void unsubscribe(String name) throws JMSException { getSession().unsubscribe(name); } }
@Override public void unsubscribe(String s) throws JMSException { getInternalSession().unsubscribe(s); }
@Override public void unsubscribe(String name) throws JMSException { getSession().unsubscribe(name); }
@Override public void unsubscribe(String name) { checkSession(); try { session.unsubscribe(name); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public void unsubscribe(String name) { checkSession(); try { session.unsubscribe(name); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public void unsubscribe(String name) { checkSession(); try { session.unsubscribe(name); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public void unsubscribe(String name) { checkSession(); try { session.unsubscribe(name); } catch (JMSException e) { throw JmsExceptionUtils.convertToRuntimeException(e); } }
@Override public void unsubscribe(final String name) { try { session().unsubscribe(name); } catch (final JMSException e) { throw toRuntimeException(e); } } }
/** * */ public void unsubscribe(String name) throws JMSException { TraceJms.logger.log(BasicLevel.DEBUG, ""); getMOMSession().unsubscribe(name); }
/** * Delegates the call to the wrapped JMS session. */ public void unsubscribe(String name) throws JMSException { if (logger.isLoggable(BasicLevel.DEBUG)) logger.log(BasicLevel.DEBUG, this + " unsubscribe(" + name + ")"); checkValidity(); sess.unsubscribe(name); }
/** * Delegates the call to the wrapped JMS session. */ public void unsubscribe(String name) throws JMSException { if (AdapterTracing.dbgAdapter.isLoggable(BasicLevel.DEBUG)) AdapterTracing.dbgAdapter.log(BasicLevel.DEBUG, this + " unsubscribe(" + name + ")"); checkValidity(); sess.unsubscribe(name); }
@Override public void unsubscribe(String id, Map<UnsubscribeOption, Object> options) throws Exception { final Options<UnsubscribeOption> opts = new Options<>(options); try (JMSSpecificContext context = (JMSSpecificContext)context(id, opts.get(UnsubscribeOption.CONTEXT))) { context.jmsSession().unsubscribe(id); } }
@Test public void testDurableSubscriptionWithPeriodsInName() throws Exception { Connection conn = createConnection(); conn.setClientID(".client.id.with.periods."); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); TopicSubscriber subscriber = s.createDurableSubscriber(ActiveMQServerTestCase.topic1, ".subscription.name.with.periods."); s.createProducer(ActiveMQServerTestCase.topic1).send(s.createTextMessage("Subscription test")); conn.start(); Message m = subscriber.receive(1000L); ProxyAssertSupport.assertNotNull(m); ProxyAssertSupport.assertTrue(m instanceof TextMessage); subscriber.close(); s.unsubscribe(".subscription.name.with.periods."); }