Hi. Now I have java code which starts tibco jms subscription with several steps:
Properties props = new Properties();
props.put("java.naming.provider.url", namingProvider);
props.put("java.naming.factory.initial", namingFactory);
props.put("java.naming.referral", namingReferral);
props.put("java.naming.security.credentials", securityCredentials);
props.put("java.naming.security.principal", securityPrincipal);
context = new InitialContext(props);
TopicConnectionFactory tfactory = (TopicConnectionFactory) context
.lookup(url + topic + ":tcf");
topicConnection = tfactory.createTopicConnection(user, password);
topicConnection.setExceptionListener(exceptionListener);
topicSession = topicConnection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
subscriber = topicSession.createSubscriber(
(Topic) context.lookup(url + topic + ":topic"),
SELECTOR, true);
subscriber.setMessageListener(messageListener);
topicConnection.start();
I want to use Spring for initialization, but I can't find how to configure jms in spring using initial context. Can you help me with it? Thanks!