• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS code stalling when creating connection

 
Z Sugiarto
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a noob in JMS / JNDI - this is a code that works in one server but not the other. So the problem IMP must be coming from the configuration/environment setup. But I'm not quite sure as to where this might be:

SITUATION:

Context jndiContext;
TopicConnectionFactory factory;
//setup environment
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,com.tibco.tibjms.naming.TibjmsInitialContextFactory);
env.put(Context.PROVIDER_URL, PROVIDER_URL);
jndiContext = new InitialContext(env);
factory = (TopicConnectionFactory) jndiContext.lookup("TopicConnectionFactory");

topicConnection = factory.createTopicConnection(); //app hangs at this point
TopicSession session = topicConnection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);

DEBUG
--
upon debug, the factory obtained is:
com.tibco.tibjms.naming.TibjmsFederatedTopicConnectionFactory


QUESTION
---
Anyone knew what might make it hangs/stalls at that point? Or any factor that might contribute to it hanging ? Me and my mate have been brainstorming this for... 3 hrish (and more). I'm hoping there's a rancher that might be able to point me to some direction wrt this
 
Z Sugiarto
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
found what the problem was. The EMS server that the app is talking to returned an incomplete host name on lookup, that is not understood by the box in which the app is deployed on.

it was a config issue, afterall.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!