7 Replies Latest reply on Jan 22, 2009 9:05 PM by nbelaevski

    a4j:status

    ronanker

      We have a very strange bug in our app. Not easy to reproduce. But very annoying for our end user.
      We are using RC 3.2.1RC3 (not tested yet with 3.3.0)

      Most of ajax request uses a4j:status to display and hide a "in progress" message.
      When there is a lot of ajax request sent (several clicks on several check boxes):
      Sometimes, the message don't appear even if the request is sent.
      Sometimes, the message stays on the page even if the request has ended.

      We were able to reproduce the first problem and while debugging the page with firebug, we saw that the javascript variable A4J.AJAX._requestsCounts hold "-1" for our a4j:status id.

      We guess that, as the request count is wrong, the "A4J.AJAX.status" method, instead of calling "onstart" at the beginning and "onstop" at the end of the request, is calling "onstop" twice (at the beginning and at the end)

      Now, we don't know how the wrong value (-1) has come. We are using eventQueue" (but not the new 3.3.0 feature of course).

      Can anyone give us a clue on what going on. Perhaps there is known workaround ?

      Thanks for the help.

        • 1. Re: a4j:status
          nbelaevski

          Hi Ronan,

          I remember there was an issue you are describing in former versions, however I cannot find it nor I cannot remind exact version. As a suggestion you can check related issues: http://fisheye.jboss.org/browse/RichFaces/trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js, maybe something will apply to the described case?

          • 2. Re: a4j:status
            nbelaevski

            BTW, https://jira.jboss.org/jira/browse/RF-1990, but that should have been fixed in 3.2.0

            • 3. Re: a4j:status
              ronanker

              Hi nbelaevski,

              Once again thanks for your speed to answer.

              Yes it seems that my bug looks like the given jira but it happen only when there is a lot of (parallel ?) ajax request sent (and even then juste time to time)
              We are using "ignoreDupResponse".
              Could it be possible that a race condition occurs between the abort() method and the finishRequest() method ? (we have no timeout)

              We will have a try without "ignoreDupResponse" and also with RC 3.3.0

              • 4. Re: a4j:status
                nbelaevski

                Ronan,

                That can be an effect of simple coding error in AJAX script. What browsers is the issue reproducible in? And maybe some server errors happened and logged?

                • 5. Re: a4j:status
                  ilya_shaikovsky

                  And b.t.w. one more bug except one Nick's points you was fixed after 3.2.2. The bug was causes the status never ends. So please try our latest GA.

                  • 6. Re: a4j:status
                    ronanker

                    Thanks to both of you. We will have a try with RC3.3.0.

                    To answer to nbelaevski, it happen with both IE and firefox but more often with IE (which is very slower). We have no client or server side error. and the fact that the problem is not reproductible at will let us think about a race condition (and also the fact that it happens more often on slow browser (eg IE) and/or with slow connection.

                    • 7. Re: a4j:status
                      nbelaevski

                      Ronan,

                      Looks like we've caught it: https://jira.jboss.org/jira/browse/RF-5849. This is about never starting status. Never ending status is usually a sign of exception happened in request processing, is there something in a4j:log about that (you can set set warning logging level to minify output)?