3 Replies Latest reply on Aug 23, 2002 12:19 PM by Dragos Haiduc

    Problems getting a ConnectionFactory in JBoss 3.0

    matt egyhazy Newbie

      Hi guys,

      I am running the tomcat 4 + jboss 3 package and I am having problems getting a ConnectionFactory. For some reason the program just sort of hangs when it gets to the line where the context gets the ConnectionFactory.

      Here is a snippit of the client code (it is a command line program running on the same box as the jboss instance):

      props.put(Context.PROVIDER_URL, "localhost:1099");//1099

      System.out.println("Getting the InitialContext");
      // Get the initial context with given properties
      context = new InitialContext(props);

      System.out.println("Getting ConnectionFactory!");
      //gets stuck here...
      factory = (TopicConnectionFactory) context.lookup("ConnectionFactory");
      //never gets here....

      I looked in the jndiView mbean and it says this:
      Global JNDI Namespace

      +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
      +- jmx:d-128-178-231.bootp.Virginia.EDU:rmi (class: org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl)
      +- UserTransactionSessionFactory (class: org.jboss.tm.usertx.server.UserTransactionSessionFactoryImpl)
      +- RMIXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
      +- topic (class: org.jnp.interfaces.NamingContext)
      | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
      | +- testTopic (class: org.jboss.mq.SpyTopic)
      | +- securedTopic (class: org.jboss.mq.SpyTopic)
      +- queue (class: org.jnp.interfaces.NamingContext)
      | +- A (class: org.jboss.mq.SpyQueue)
      | +- testQueue (class: org.jboss.mq.SpyQueue)
      | +- ex (class: org.jboss.mq.SpyQueue)
      | +- DLQ (class: org.jboss.mq.SpyQueue)
      | +- D (class: org.jboss.mq.SpyQueue)
      | +- C (class: org.jboss.mq.SpyQueue)
      | +- B (class: org.jboss.mq.SpyQueue)
      +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
      So, it has ConnectionFactory and the topic I want to use...("topic/testTopic")

      I also ran tcpdump on port 1099 and it did not show any data passing through. The service is running though...netstat -ln shows it up.

      Any help would be appreciated!