0 Replies Latest reply on Jun 22, 2004 7:08 PM by surajit

    JBoss BUG ? : isModified() can't stop SFSB Replication 100%

    surajit Newbie

      Using JBoss 3.2.3, I have set up a 2 node cluster with a SFSB farmed across them. I want to avoid state replication across the nodes, and have implemented the isModified() method in the bean to always return false. On executing, I notice the following:

      a. As part of invoking homeRef.create() on a remote client, setSessionContext() and ejbCreateXXX() get invoked on node N1 followed by ejbPassivate() and ejbActivate() on the same node N1.

      b. After this, a remoteRef.businessMethod() invocation results in the following method sequence on the OTHER node N2:
      setSessionContext()
      ejbActivate()
      businessMethod()
      isModified()

      Interestingly, my businessMethod() goes through fine. I expected that it would fail since it needs state information that I populate in ejbCreateXXX() and since there is no replication, this state should not be available locally on N2.

      What I notice is that there is an implicit state replication that happens before JBoss invokes businessMethod(). So, although I have specified that I do not want replication, replication happens at least once and that is before the invocation of the first business method.

      Other important findings:
      ------------------------------
      a. All subsequent business method invocations on the remote interface stick to the same node. Which is good.

      b. The splitting of ejbCreate() and businessMethod() invocations across N1 and N2 happens from time to time. Sometimes, all invocations go to one node only and no splitting happens.

      c. Removing isModified() DOES NOT affect any of the above behavior.

      WHY THIS IS A PROBLEM:
      --------------------------------
      The state held in my SFSB cannot travel on the wire. This is some legacy I am working with and can't be changed at this point. So, the implicit one-time replication of state, that too once in a while, is not acceptable to my application.

      Moreover, isModified() being bypassed after ejbCreateXXX() invocations seems like a hack to me, thereby mandating the implicit replication step, even if it is one-time.

      My deadline is very very close and any help in this regard is deeply appreciated!!

      Best Regards,
      Surajit