public static ActiveMQTemporaryTopic createTemporaryTopic(String address) { return createTemporaryTopic(address, null); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session, final String prefix) { String address = prefix + UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session) { String address = UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
@Override public TemporaryTopic createTemporaryTopic() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { throw new IllegalStateException("Cannot create a temporary topic on a QueueSession"); } try { final ActiveMQTemporaryTopic topic; if (enable1xPrefixes) { topic = ActiveMQDestination.createTemporaryTopic(this, PacketImpl.OLD_TEMP_TOPIC_PREFIX.toString()); } else { topic = ActiveMQDestination.createTemporaryTopic(this); } SimpleString simpleAddress = topic.getSimpleAddress(); // We create a dummy subscription on the topic, that never receives messages - this is so we can perform JMS // checks when routing messages to a topic that // does not exist - otherwise we would not be able to distinguish from a non existent topic and one with no // subscriptions - core has no notion of a topic session.createTemporaryQueue(simpleAddress, simpleAddress, ActiveMQSession.REJECTING_FILTER); connection.addTemporaryQueue(simpleAddress); return topic; } catch (ActiveMQException e) { throw JMSExceptionHelper.convertFromActiveMQException(e); } }
private ActiveMQTopic lookupTopic(final String topicName, final boolean isTemporary) throws ActiveMQException { String topicNameToUse = topicName; if (enable1xPrefixes) { topicNameToUse = (isTemporary ? PacketImpl.OLD_TEMP_TOPIC_PREFIX.toString() : PacketImpl.OLD_TOPIC_PREFIX.toString()) + topicName; } ActiveMQTopic topic; if (isTemporary) { topic = ActiveMQDestination.createTemporaryTopic(topicNameToUse); } else { topic = ActiveMQDestination.createTopic(topicNameToUse); } AddressQuery query = session.addressQuery(topic.getSimpleAddress()); if (!query.isExists() && !query.isAutoCreateAddresses()) { return null; } else { return topic; } }
public static ActiveMQTemporaryTopic createTemporaryTopic(String address) { return createTemporaryTopic(address, null); }
public static ActiveMQTemporaryTopic createTemporaryTopic(String address) { return createTemporaryTopic(address, null); }
public static ActiveMQTemporaryTopic createTemporaryTopic(String address) { return createTemporaryTopic(address, null); }
public static ActiveMQTemporaryTopic createTemporaryTopic(String address) { return createTemporaryTopic(address, null); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session) { String address = UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session, final String prefix) { String address = prefix + UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session, final String prefix) { String address = prefix + UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session) { String address = UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session, final String prefix) { String address = prefix + UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session) { String address = UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session, final String prefix) { String address = prefix + UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
public static ActiveMQTemporaryTopic createTemporaryTopic(final ActiveMQSession session) { String address = UUID.randomUUID().toString(); return createTemporaryTopic(address, session); }
private ActiveMQTopic lookupTopic(final String topicName, final boolean isTemporary) throws ActiveMQException { String topicNameToUse = topicName; if (enable1xPrefixes) { topicNameToUse = (isTemporary ? PacketImpl.OLD_TEMP_TOPIC_PREFIX.toString() : PacketImpl.OLD_TOPIC_PREFIX.toString()) + topicName; } ActiveMQTopic topic; if (isTemporary) { topic = ActiveMQDestination.createTemporaryTopic(topicNameToUse); } else { topic = ActiveMQDestination.createTopic(topicNameToUse); } AddressQuery query = session.addressQuery(topic.getSimpleAddress()); if (!query.isExists() && !query.isAutoCreateAddresses()) { return null; } else { return topic; } }
private ActiveMQTopic lookupTopic(final String topicName, final boolean isTemporary) throws ActiveMQException { String topicNameToUse = topicName; if (enable1xPrefixes) { topicNameToUse = (isTemporary ? PacketImpl.OLD_TEMP_TOPIC_PREFIX.toString() : PacketImpl.OLD_TOPIC_PREFIX.toString()) + topicName; } ActiveMQTopic topic; if (isTemporary) { topic = ActiveMQDestination.createTemporaryTopic(topicNameToUse); } else { topic = ActiveMQDestination.createTopic(topicNameToUse); } AddressQuery query = session.addressQuery(topic.getSimpleAddress()); if (!query.isExists() && !query.isAutoCreateAddresses()) { return null; } else { return topic; } }
private ActiveMQTopic lookupTopic(final String topicName, final boolean isTemporary) throws ActiveMQException { String topicNameToUse = topicName; if (enable1xPrefixes) { topicNameToUse = (isTemporary ? PacketImpl.OLD_TEMP_TOPIC_PREFIX.toString() : PacketImpl.OLD_TOPIC_PREFIX.toString()) + topicName; } ActiveMQTopic topic; if (isTemporary) { topic = ActiveMQDestination.createTemporaryTopic(topicNameToUse); } else { topic = ActiveMQDestination.createTopic(topicNameToUse); } AddressQuery query = session.addressQuery(topic.getSimpleAddress()); if (!query.isExists() && !query.isAutoCreateAddresses()) { return null; } else { return topic; } }