4 Replies Latest reply on Nov 15, 2007 11:57 AM by Brian Stansberry

    SFSB failover not working as expected

    Chris Meadows Newbie

      Hi there,

      I'm testing two JBoss 4.2.2 GA nodes in a cluster using the 'all' config. The nodes cluster together fine. I then run a multithreaded client to start up 200 or so SFSBs that cycle through a number of states. The client requests are are load balanced in the cluster as expected.
      However, when I test failover by killing one of the nodes mid test, I get various exceptions such as

      javax.ejb.NoSuchEJBException, Could not find stateful bean: 4ss55r-gaev0q-f901ig99-1-f901ok6j-5w (bean was marked as removed)


      javax.naming.NamingException, Could not dereference object

      If I catch the exceptions and retry the client requests, then the SFSB state is sorted out and the results are as they should be

      I might have missed something here, but I was expecting the client side interceptors to reroute client requests automatically on cluster member failure, i.e. I shouldn't have to programmatically catch the exceptions and retry.

      I'm using HA-JNDI as follows

      jndiProps.put("java.naming.provider.url", "jnp://foo.zub.com:1100,jnp://bar.zub.com:1100");
      jndiProps.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      jndiProps.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");

      and I've added retry interceptors as per section of the JBoss 4 manual.

      Did I miss something? Or have I misunderstood how JBoss failover is dealt with from the client?

      Any insight/clarification gratefully received,