3 Replies Latest reply on Nov 21, 2006 12:55 AM by mark_dingyuan

    how seam solve duplicate form submission

    mark_dingyuan

      i have seen the issue from jira
      http://jira.jboss.org/jira/browse/JBSEAM-183

      and it says that
      "We need to put some proper thought into handling of concurrent requests in a conversation, and also duplicate form submission (second is probably not an issue, 'cos conversations mainly solve the problem). At least we should catch the standard exception that EJB3 throws from concurrent access to an SFSB."

      i am not clear about how and why conversations solve the duplicate form submission. could gavin introduce how seam framework solve it ? beg a description of it , thank you ..

        • 1. Re: how seam solve duplicate form submission
          mark_dingyuan

          here let me hold a example

          there are 3 pages ..
          post.jsp list.jsp success.jsp

          when a peson post some infos from post.jsp and then it will forward to success.jsp .. and then press the refresh button on the explorer ...
          struts provide token to solve the problem ...

          and how seam solved it ?

          • 2. Re: how seam solve duplicate form submission
            gavin.king

            (1) Seam serializes concurrent requests in the same conversation context.

            (2) After the initial submission, the conversation has ended, and the dupe submit is detected, since it cannot restore a conversation.

            • 3. Re: how seam solve duplicate form submission
              mark_dingyuan

              cool... thank you ...

              and after i read the seam reference more times ...i can get the concept of conversation context..

              indeed, state is very important

              but the reference not discribe the conversation particularly enough ...
              hope in future it can describe the case that without conversation context , how we did, and within conversation context, how we fix the problem and simpified the coding