Announcement Announcement Module
Collapse
No announcement yet.
Web transaction token functionality Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Web transaction token functionality

    How about adding a utility class (bean) to Spring offering functionality similar to the TokenProcessor class Struts has (http://svn.apache.org/viewcvs.cgi/st...89&view=markup)?

    Or is there another simple, general way to prevent double submits in Spring?

    Erwin

  • #2
    ...general way to prevent double submits in Spring?
    See http://forum.springframework.org/showthread.php?t=10393

    functionality similar to the TokenProcessor class Struts
    If your interested serializing parallel invocations from the same client, see:
    setSynchronizeOnSession method of org.springframework.web.servlet.support.WebContent Generator.
    Last edited by robyn; May 14th, 2006, 12:29 PM.

    Comment


    • #3
      Given this "synchronizeOnSession" functionality, I guess Spring is suffering from Struts bug #19223 (http://issues.apache.org/bugzilla/show_bug.cgi?id=19223)?

      Erwin

      Comment


      • #4
        The Servlet 2.3 spec. says
        J2EE.7.7.1 Threading Issues
        Multiple servlets executing request threads may have active access to a single
        session object at the same time. The Developer has the responsibility for
        synchronizing access to session resources as appropriate.
        I know it doesn't help you, but this suggests that the bug is in the container.

        Comment


        • #5
          I solved a similar issue with code like this:

          synchronized(session.getId().intern()) {

          }

          This will not work in a clustered environment where one user can be sent back to different VMs (but no synchronization in the JVM will).

          Michael

          Comment

          Working...
          X