2 Replies Latest reply on Nov 30, 2005 8:10 AM by Kapil Gambhir

    Idempotency and other issues in JBoss 4.x

    Kapil Gambhir Newbie

      I am using the JBoss 4.1 version to test the clusteing my EJB components. I am pleasently surprised to see most of the things working out of the box(Infact at times i doubt whether i am seeing the right thing).

      My concern is whether JBoss supports the concept of idempotency. Currently, i have clustered a stateful session bean and the moment i crash one instance (say CTRL-C) the other instance picks up the invocation, start from scratch and completes the invocation (without returning a RemoteException to the client). Now the issue is if the CTRL-C was done just after the bean had completed its operation (including the DB activity) and before it was replying back to the client the other instance re-executes the invocation which would mean redoing the activity twice.
      My expectation was that it will re-execute if it is marked as idempotent only. Is JBoss marking all the methods as idempotent by default. If yes then how to configure it otherwise.

      The second issue is that i have a stateful session bean. Now the failover for this bean is executing without me specifying the state replication mechanism in the jboss.xml (regarding the /HASessionState/Default). Additionally, i was trying to check the failover when the call is inside a method (for which i have induced SLEEP within the method). To test the same i disconnected the network cable (to simulate network failure) from the instance where the call was being serviced and the client endlessly waited for something to happen, can someone tell me how to specify the SFSB timeout for the client so that it doesn't wait endlessly.

        • 1. Re: Idempotency and other issues in JBoss 4.x
          Ben Wang Master

          Are you referring to JBoss4.0.3 release? I don't think we have 4.1 yet. :-)

          We don't have the idempotent feature that you describe. However, conceptually you can use another clusteringinterceptor to perform this. It is one thing that we like to do but have not found high enough priority.

          If you think this is important, you can open up a Jira and vote for it.

          -Ben

          • 2. Re: Idempotency and other issues in JBoss 4.x
            Kapil Gambhir Newbie

            First of all thanks for the response.
            U r right, it was a typo. I am referring to 4.0.3 release.
            I was interested in this feature as i see other major app server supporting it. Although i don't feel it is really an important stuff.

            Kindly throw some light on whether the state replication (of SFSB) happens by default without the configuration setting of /HASessionState/Default in jboss.xml. As the documentation specified it to be there.

            Also, what is the mechanism to make the first point of contact (which is the web server) not a single point of failure. I mean even if the mod_jk component is implemented with Apache to load balance the web container, their is still a single web server serving the application, how to introduce redundancy at this level.

            Response will be highly appreciated.