4 Replies Latest reply on Aug 8, 2002 11:57 AM by slaboure

    HA JNDI doesn't seem to replicate

    derek

      Hi

      Maybe the answer to my problem is obvious, but here goes anyway.

      Firstly, I am using an out-of-the-box 3.0.0RC3 version of JBoss under Win2000.

      I have a few machines running in a cluster. As each machine starts, I can see that new members are reported in JBoss. The idea is that the first server to start, connects to the HA JNDI binds a specific context into it. As each subsequent server starts it checks for that context and if it's not there, creates it. The initial context being used is retrieved as described in the Clustering doc.:

      Properties p = new Properties();
      p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NAmingContextFactory");
      p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      p.put(Context.PROVIDER_URL, "localhost:1100");
      return new InitialContext(p);

      The problem is that as the machines start, none of them can see the context bound into the HA JNDI by the other, and binds it to the JNDI.

      The question is, what additional configuration needs to be done, and secondly, is there a facility such as JndiView to view what's in the HA JNDI?

      Your help would be greatly appreciated.

      Regards,

      Derek.


        • 1. Re: HA JNDI doesn't seem to replicate
          derek

          OK, after a bit more debugging, here's an update of the situation.

          I upgraded to the v3.0.0 release, not that I think it made any difference to this specific problem.

          The first machine in the cluster that comes up correctly does not find the required context/object in the HA JNDI and binds it there. After a while the second machine in the cluster comes up and DOESN'T find the object bound by the first machine and binds it there. From that point on, everything is happy, and the second object bound is available to all machines.

          The problem seems to be that the HA JNDI is not replicated out to new machines at startup, but changes to the HA JNDI are replicated out to all machines in the cluster.

          Regards,

          Derek.



          • 2. Re: HA JNDI doesn't seem to replicate
            slaboure

            can you provide us with a small test code (a simple client that bind on one and then lookup on the other one for example)

            • 3. Re: HA JNDI doesn't seem to replicate
              derek

              Hi Sacha

              We solved the problem. As I mentioned in my later posting, the order of lookups in the source does not match the order in the clustering docs. We made a fix in the HAJNDI.java file to correct this and now everything seems to be working. I included the modified file in the posting.

              Regards,

              Derek.

              • 4. Re: HA JNDI doesn't seem to replicate
                slaboure

                Have you looked at my answer for your other post: I don't think there is a bug (and hence that your patch is needed)