So here is my problem!
I have a Tibco EMS theme with authentication
I have a standalone application that I would like to publish and use in this post
And I would like to do this through Springs JMSTemplate, Listener, etc.
Listener Ex:
public class ExampleListener implements MessageListener {
public void onMessage(Message message) {
if (message instanceof TextMessage) {
try {
System.out.println(((TextMessage) message).getText());
} catch (JMSException e) {
throw new RuntimeException(e);
}
} else {
throw new IllegalArgumentException(
"Message must be of type TestMessage");
}
}
}
Publisher example:
import org.springframework.jms.core.JmsTemplate;
public class ExampleProducer {
private JMSTemplate jmsTemplate;
public ExampleProducer(JmsTemplate jmsTemplate) {
this.jmsTemplate = jmsTemplate;
}
public void sendMessage() {
jmsTemplate.convertAndSend("Example Message");
}
}
and here some of the properties:
jms.jndi.initialContextFactory = com.tibco.tibjms.naming.TibjmsInitialContextFactory jms.jndi.urlPkgs = com.tibco.tibjms.naming
jms.jndi.providerUrl = tibjmsnaming: / **** .net: ***
Is it possible?
thank
Mick source
share