Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EMS creating connection factory

 
rakesh verma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For some reason, I couldn't use initial context factory to create connection factory to connect to a topic. Below is the code snippet.



Its failing with below exception:

Caused by: javax.naming.NameNotFoundException: Name not found: 'TopicConnectionFactory'
at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:713)
at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:489)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.ubs.mrisk.jms.TopicListener.getTopicConnectionFactory(TopicListener.java:95)


Can you please check why the above code is not working. However, if I use Tibco classes as below, its working without issues. We need to use above initialcontext style code as it allows to have a generic code. Please help
 
Greg Charles
Sheriff
Posts: 3010
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never worked with the Tibco message queue before, but in general, there are a lot of reasons why a JNDI lookup could fail. On line 3, are you putting in the real location (and port) of your EMS server, or literally "tcp://url"? (I'm guessing it's not really deployed on a machine called "url".) I would think that would fail with fail with a connection error, rather than NameNotFoundException, but that's the only obvious thing I see. Meanwhile, I'm going to move this into our JavaEE forum, so that the experts can weigh in.
 
rakesh verma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Charles for moving this to right forum.

Yes. I have the full URL with port number in the actual deployment.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!