use of org.apache.activemq.artemis.jms.client.ActiveMQTopic in project pentaho-kettle by pentaho.
the class ActiveMQProvider method getDestination.
@Override
public Destination getDestination(JmsDelegate delegate, VariableSpace variableSpace) {
checkNotNull(delegate.destinationName, getString(JmsConstants.PKG, "JmsWebsphereMQ.DestinationNameRequired"));
String destName = variableSpace.environmentSubstitute(delegate.destinationName);
return isQueue(delegate, variableSpace) ? new ActiveMQQueue(destName) : new ActiveMQTopic(destName);
}
use of org.apache.activemq.artemis.jms.client.ActiveMQTopic in project activemq-artemis by apache.
the class StringRefAddrReferenceTest method testActiveMQTopicFromPropertiesJNDI.
@Test(timeout = 10000)
public void testActiveMQTopicFromPropertiesJNDI() throws Exception {
Properties properties = new Properties();
properties.setProperty(TYPE, ActiveMQTopic.class.getName());
properties.setProperty(FACTORY, JNDIReferenceFactory.class.getName());
String address = "foo.bar.topic";
properties.setProperty("address", address);
Reference reference = from(properties);
ActiveMQTopic object = getObject(reference, ActiveMQTopic.class);
assertEquals(address, object.getAddress());
}
use of org.apache.activemq.artemis.jms.client.ActiveMQTopic in project activemq-artemis by apache.
the class ReferenceableTest method testReferenceTopic.
@Test
public void testReferenceTopic() throws Exception {
Reference topicRef = ((Referenceable) ActiveMQServerTestCase.topic1).getReference();
String factoryName = topicRef.getFactoryClassName();
Class factoryClass = Class.forName(factoryName);
ObjectFactory factory = (ObjectFactory) factoryClass.newInstance();
Object instance = factory.getObjectInstance(topicRef, null, null, null);
ProxyAssertSupport.assertTrue(instance instanceof ActiveMQDestination);
ActiveMQTopic topic2 = (ActiveMQTopic) instance;
ProxyAssertSupport.assertEquals(ActiveMQServerTestCase.topic1.getTopicName(), topic2.getTopicName());
simpleSendReceive(cf, topic2);
}
Aggregations