Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-69

Clustered SFSB: load balancing works, failover does not

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • Preview 5
    • None
    • None
    • None

    Description

      Ref: http://jboss.com/index.html?module=bb&op=viewtopic&t=60214

      Consider this simple example:
      [code]
      @Stateful
      @org.jboss.ejb3.remoting.Clustered
      public class SFSBClusterBean implements SFSBCluster, Serializable {

      transient String state = null;
      String dto = null;
      transient boolean modified = false;

      public String getState()

      { System.out.println("getState"); return state; }

      public void updateState(String newState)

      { System.out.println("updateState"); state = newState; modified = true; }

      @PrePassivate public void passivate()

      { System.out.println("passivate"); dto = state; state = null; modified = false; }

      @PostActivate public void activate()

      { System.out.println("activate"); state = dto; dto = null; modified = false; }

      public boolean isModified()

      { System.out.println("isModified"); return modified; }

      }
      [/code]

      I have setup a cluster with 2 nodes... When I run multiple clients, it load balances well... However, when I shutdown one of the nodes, the clients accessing that node also die...

      I built a similar example in EJB 2.1 and it load balances as well as fails over correctly.

      One difference I noted was that while the EJB 2.1 bean's isModified() was called (and subsequently, ejbPassivate() if the bean was modified) after every client method call, the isModified() method is never called for EJB3 (and so by extension neither is the passivate() method called).

      Attachments

        Activity

          People

            kkhan1@redhat.com Kabir Khan
            keyurva_jira Keyur Shah (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: