3 Replies Latest reply on Jul 3, 2007 9:59 AM by Brian Stansberry

    Cluster Restart/Failover with EJB3 Stateless

    Reinhard Brandstaedter Newbie

      Hello,

      We are using a clustered JBoss environment with an EJB3 based application. The client application connects to multiple beans (one for every panel) and thus has multiple proxy interceptors.
      Now we have tested failover with the following scenario:
      3 JBoss Nodes forming one partition, from those 3 nodes we fail one or two (see steps below). On the Client Application we are only using two panels each using a different bean (resulting in two client proxy interceptors), and try to access the application server.

      These are the steps taken in our test case:

      R.......JBoss Node is running and member of the partition
      S.......JBoss Node is stopped and not member of the partition
      P1,P2...Panels in the application (different client proxies)
      (#).....Number of connect try/request from the panel
      nr......requests weren't routed to that node (though they should I guess))
      if a column is blank no tries were made from that panel
      
       | JBoss 1 | JBoss 2 | JBoss 3 | Proxy Knowledge of Nodes
       | R | R | R |
      P1| OK (1) | OK (2) | OK (3) | 1,2,3
      P2| OK (1) | | | 1,2,3
      ---------------------------------
       | S | R | R |
      P1| - | OK (1,2)| - | 2,3 (updated with request)
      P2| | | | 1,2,3 (no update)
      ---------------------------------
       | R | R | R |
      P1| nr | OK (1,3)| OK (2,4)| 1,2,3 (updated with request)
      P2| | | | 1,2,3 (no update)
      ---------------------------------
       | R | S | R |
      P1| OK (1,2)| - | OK (3) | 1,3 (updated with request)
      P2| OK (1) | - | OK (2) | 1,3 (updated with request)
      ---------------------------------
       | R | R | R |
      P1| | OK (1) | | 1,2,3 (updated with request)
      P2| | | | 1,3 (no update)
      ---------------------------------
       | S | R | S |
      P1| | OK (1) | | 2 (updated with request)
      P2| | FAILED! | | 1,3 (no update possible!)
      


      My conclusion is, as stated in the JBoss Cluster manual, that the panel 2 proxy (P2) doesn't get an cluster state update between only 1 and 3 running and only 2 running. Thus it still tries to contact 1 and 3 and fails. For this panel it looks like the whole cluster has been restarted and it can't recover from that.

      Now the simple question is: Is there a similar technique to handle a cluster restart in EJB3 (as described here http://docs.jboss.com/jbossas/guides/clusteringguide/r2/en/html/cluster.chapt.html#clustering-session-slsb21-retry for EJB2)?

      Tanks,
      Reinhard