Ensure request counter is atomically incremented
------------------------------------------------

                 Key: SLING-2370
                 URL: https://issues.apache.org/jira/browse/SLING-2370
             Project: Sling
          Issue Type: Improvement
          Components: Engine
    Affects Versions: Engine 2.2.4
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: Engine 2.2.6


The SlingHttpServletResponseImpl contains the request counter, which is a 
static value incremented on each request. In case of heave concurrency, this 
counter may yield the same value for two different requests.

Using an AtomicLong (instead of int) we can ensure atomicity of update and 
retrieval and at the same time increase the number of unique request ids (int 
was probably wrong anyway in this respect and it should have been long from the 
start).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to