3 Replies Latest reply on Jun 29, 2005 2:30 AM by mo sa

    multiple hosts for JNDI providers

    mo sa Newbie

      Folks,

      Am in a position where our jms client (when instantiating the message broker) NEEDS to connect to one host (where the JBOSS mq queue is listening) and if that does not respond try and connect to another host where a similar JBOSS mq queue is listening.

      Here is our properties file:
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://localhost:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

      Currently, we try and connect to JMS on the localhost. This needs to change to accomodate for multiple hosts (two at the moment).

      Do i just add the host to the "java.naming.provider.url" property like the example below:

      "java.naming.provider.url=jnp://host1:1099 jnp://host2:1099"

      Any ideas ...

      Appreciate it much ...

      Mo.