1 Reply Latest reply on Mar 12, 2003 5:43 PM by joelvogt

    JMS Client problem

    aleke

      Hi folks,
      I am having a little problem.
      When i try to connect to jndi at remote server:
      ---
      javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
      java.net.ConnectException: Connection refused: connect]
      ---
      piece of code using jndi.properties:
      jndiContext = new InitialContext();
      topicConnectionFactory = (TopicConnectionFactory) jndiContext.lookup("ConnectionFactory");
      the jndi.properties file is at classpath
      ---
      jndi.properties
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=172.20.100.67:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

      piece of code using hashtable:
      java.util.Hashtable env = new java.util.Hashtable();
      env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      env.put("java.naming.provider.url", server);
      env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      jndiContext = new InitialContext(env);
      topicConnectionFactory = (TopicConnectionFactory) jndiContext.lookup("ConnectionFactory");

      Can anyone help me ??

      I´d apreciate that!!

      tks,

      Aleke