1 Reply Latest reply on Jan 31, 2009 11:11 AM by Bernd Eckenfels

    ConnectionFactory not bound

    i gain Newbie

      Hi,

      I am using jboss-4.2.0.GA version in a clustered environment.
      We have 2 nodes in cluster.

      In our JMS client code (i.e. reside in application server itself) when we are try to post some message to queue we often receive "NaminException:ConnectionFactory not bound".

      I know that Jboss MQ run in singleton mode means on one of the node in cluster.

      It works perfactly if request goes to the node which is having ConnectionFactory bound in its JNDI tree's java: name space, but when request goes to other node it fails to lookup same JNDI name even though it is in cluster.

      following is the code snippet that we are using, we are using JVM-IL based connection factory, since our client and MDB reside in same JVM

       Properties p = new Properties();
       p.put(Context.INITIAL_CONTEXT_FACTORY,
       "org.jnp.interfaces.NamingContextFactory");
       p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
       p.put(Context.PROVIDER_URL, "localhost:1100"); // HA-JNDI port.
       ctx = InitialContext(p);
       ctx.lookup("java:/ConnectionFactory");
      


      Please suggest what is wrong here in code ?

        • 1. Re: ConnectionFactory not bound
          Bernd Eckenfels Novice

          In HA mode I think only one of the nodes is in the same VM as the JMS PRovider therefore you cannot use the JVMIL.

          I thin you can eighter use the Cluster aware RA, which is deployed in all nodes (not in the singleten) or you might be able to use the LinkRefPairService named QueueConnectionFactory. This will use the JVM-RA locally and UIL2 remotely.