Details

      Description

      We are getting a crossover Exception in websphere.

      We are experiencing under high load a race condition and the values defined and injected from the EL are not the same as those retrieved inside of the method implementation.

      See below example

      <action-state id="checkOptout">
      <evaluate expression="loginService.checkOptout(requestParameters.UserName, flowRequestContext)"/>
      <transition on="1" to="redirect"/>
      <transition on="2" to="validate"/>
      </action-state>

      Implementation:
      public String checkOptout(String profile, RequestContext context) throws Exception {
      try {
      final ServletExternalContext externalContext = (ServletExternalContext) context.getExternalContext();

      final HttpServletRequest request = (HttpServletRequest) externalContext.getNativeRequest();

      final String userName = request.getParameter("UserName");

      if (!userName.equals(profile))

      { System.out.println("Error!"); }

      ....etc....
      }

      We are running this test with 20 concurrent users and we are experiencing the described errors.

      Please advice

      Thanks

        Issue Links

          Activity

          Hide
          Musikolo added a comment -

          Exactly, I'm having the same problem. The flow is passing in a parameter to the invoked method coming from the request. Once inside the method, we read again the same parameter also coming from request and compare them. Under high workload, they are sometimes different. We've been able to find out the right value is the one read from the request inside the method. This clearly evidences there is a concurrency problem in the expression evaluation within the flow.

          We have currently Spring 3.1.4 + Spring Web Flow 2.2.0. After upgrading SWF to 2.3.1 and later to 2.3.2, the problem persists.

          Is there any solution for this in the short term?
          Is there any workaround we can apply?

          Best regards.

          Show
          Musikolo added a comment - Exactly, I'm having the same problem. The flow is passing in a parameter to the invoked method coming from the request. Once inside the method, we read again the same parameter also coming from request and compare them. Under high workload, they are sometimes different. We've been able to find out the right value is the one read from the request inside the method. This clearly evidences there is a concurrency problem in the expression evaluation within the flow. We have currently Spring 3.1.4 + Spring Web Flow 2.2.0. After upgrading SWF to 2.3.1 and later to 2.3.2, the problem persists. Is there any solution for this in the short term? Is there any workaround we can apply? Best regards.
          Hide
          Musikolo added a comment -

          Hi guys,

          Good news, we have found the root cause. When we upgraded to SWF 2.3.1, we didn't do it in all our modules, doing the upgrade ineffective. Now hat we have upgraded to SWF 2.3.1 all our modules, the problem has vanished and everything works good.

          Best regards.

          Show
          Musikolo added a comment - Hi guys, Good news, we have found the root cause. When we upgraded to SWF 2.3.1, we didn't do it in all our modules, doing the upgrade ineffective. Now hat we have upgraded to SWF 2.3.1 all our modules, the problem has vanished and everything works good. Best regards.
          Hide
          Francisco Fernandez added a comment -

          Yes, please close this issue

          Show
          Francisco Fernandez added a comment - Yes, please close this issue
          Hide
          Erwin Vervaet added a comment -

          Closed on request of the reporter.

          Show
          Erwin Vervaet added a comment - Closed on request of the reporter.

            People

            • Assignee:
              Rossen Stoyanchev
              Reporter:
              Francisco Fernandez
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development