1 Reply Latest reply on Sep 28, 2007 9:57 PM by Elias Ross

    HA-JNDI and HA-JMS problem

    i gain Newbie

      Hi All,

      I have 2 jboss nodes configured in cluster which is for QA environment.

      When my application try to lookup the Queue destination on HA-JNDI port which is 1100 i get following exception on one node but at the same time it picks the Queue from other node

      2007-09-21 11:17:42,293 DEBUG [org.jnp.interfaces.NamingContext] Failed to connect to null:1100
      javax.naming.CommunicationException: Failed to connect to server null:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server null:1100 [Root exception is java.net.UnknownHostException: null]]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)

      Is this behaviour is correct or not ?

      And lookup code is like this

      Properties p = new Properties();
      p.put(Context.URL_PKG_PREFIXES, IConstants.URL_PKG_PREFIXES);
      //Host is coming from jboss.bind.address property
      String host = System.getProperty(IConstants.SYSTEM_HOST_PROP);
      // HA-JNDI url.
      p.put(Context.PROVIDER_URL, host + ":" + IConstants.PROVIDER_URL_PORT);
      InitialContext ctx = new InitialContext(p);
      //looking for jms queue destination

      Another problem is i tried to put localhost instead of host variable, however in that case it was ont wokring on both the nodes so i did change it to jboss bind address to ensure it picks from the node hwre code is getting executed.

      Any help would be appreciated.