7 Replies Latest reply on Jul 18, 2008 6:04 PM by Clebert Suconic

    How the Java client connects to JNDI of JBM 2.0 alpha remote

    Lijun Yan Newbie

      Hello,

      I am checking out the JBM 2.0 alpha. Everything looks cool. I could run the example when the broker is localhost. However, how to connect the JNDI store using IP address instead of just localhost. For example, in the jndi.properties I have:

      java.naming.provider.url=jnp://ipaddress:1099


      Then I ran the same example program. I got

      queueExample:
       [java] javax.naming.CommunicationException: Could not obtain connection to any of these urls: 172.16.1.218:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server 172.16.1.218:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 172.16.1.218:1099 [Root exception is java.net.ConnectException: Connection refused]]]
       [java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1601)
       [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:636)
       [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
       [java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
       [java] at org.jboss.jms.example.QueueExample.main(QueueExample.java:53)
       [java] Caused by: javax.naming.CommunicationException: Failed to connect to server 172.16.1.218:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 172.16.1.218:1099 [Root exception is java.net.ConnectException: Connection refused]]
       [java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:276)
       [java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1572)
       [java] ... 4 more


      Please advise. Thank you.