Results 1 to 5 of 5

Thread: Web transaction token functionality

  1. #1
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    ...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 at 12:29 PM.

  3. #3
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

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

    Erwin

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    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.

  5. #5
    Join Date
    Jul 2005
    Location
    Paris, France
    Posts
    5

    Default

    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

Similar Threads

  1. Unit testing with JOTM and JtaTransactionManager
    By lalle in forum Architecture
    Replies: 1
    Last Post: Oct 15th, 2005, 09:05 AM
  2. Replies: 0
    Last Post: Jun 6th, 2005, 06:22 AM
  3. Replies: 3
    Last Post: May 16th, 2005, 07:04 AM
  4. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM
  5. Transaction pb Hibernate/MySQL
    By syluser in forum Data
    Replies: 2
    Last Post: Aug 28th, 2004, 02:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •