2 Replies Latest reply on Dec 12, 2002 10:43 AM by slaboure

    Balancing and Fail Over?

    grnwood

      Hello,
      I have purchased and read the entire Clustering doc and I am trying to do a proof of concept for a project.

      Setup:

      2 separate JBoss 3.0.4 instances on two separate machines (XP and NT4.0/SP6). Clustering is enabled on both machines via the DefaultPartitian and both have a HA-JNDI set up.

      Both Nodes see each other as the JavaGroups messages inform me when I bring one or the other up and down. Also, the DefaultPartition from the jmx-console shows me that they have each other regsitered.


      Node 1: Scheduler MBean hit() method sends a PTP JMS message to a queue, MDB listening on the queue consumes the message and does a lookup to SLSB echo() method.
      This node has the MBean scheduled, the MDB, and the SLSB on it, so in this case the MDB is the client to the SLSB and it is in the jboss server JVM.

      Node 2: Deployed on this node is only the SLSB.

      The SLSB bean is deployed with True and a round robin balancing.

      The method in the MDB does a lookup like so:

      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");
      InitialContext ctx = new InitialContext(p);

      I have tried doing the lookup EVERY time, and also caching and running the echo() method off of the same stub.

      End result: No load balancing, all echo() SLSB calls are performed on Node 1. Better yet, if I undeploy the bean from node 1 there is no fail-over to Node 2.

      And Node 1 gives me a 'ejb not bound' message.

      If a am correct, since the client code is looking at the HA-JNDI, HA-JNDI should carry over to Node 2, look up the EJB locally and return it? Why doesn't this happen here?

      At any rate, maybe I'm missing something.... but I've been looking at this a long time now!