Skip to main content

[JIRA] Created: (SIPSERVLET_SPEC-30) SipSession and SipApplicationSession need proper happensBefore concurrency guarantees for attributes

  • From: "tomrstrickland (JIRA)" < >
  • To:
  • Subject: [JIRA] Created: (SIPSERVLET_SPEC-30) SipSession and SipApplicationSession need proper happensBefore concurrency guarantees for attributes
  • Date: Thu, 17 Jan 2013 21:07:53 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated

SipSession and SipApplicationSession need proper happensBefore concurrency 
guarantees for attributes
----------------------------------------------------------------------------------------------------

                 Key: SIPSERVLET_SPEC-30
                 URL: http://java.net/jira/browse/SIPSERVLET_SPEC-30
             Project: sipservlet-spec
          Issue Type: Improvement
            Reporter: tomrstrickland


Given the code:
Thread A:
session.setAttribute("foo", myClassInstance);

Thread B:
session.getAttribute("Foo");

If the call to setAttribute happens-before the call to getAttribute, the 
result of the get shouild return the value passed in to the set. This is not 
currently guaranteed by the SipServlet API. Put differently, as an app 
developer, I would like the getting, setting and removal of attributes in 
sessions to behave like a ConcurrentHashMap in terms of memory visibility.

I know that we are addressing threading issues in other proposals (the work 
on Executors), but that work is mostly about scheduling of triggers with 
respect to a context (for example a SipApplicationSession) and is not 
strictly about memory visibility. This feels like something that is missing 
from the spec that is counter-intuitive to the average developer.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[JIRA] Created: (SIPSERVLET_SPEC-30) SipSession and SipApplicationSession need proper happensBefore concurrency guarantees for attributes

tomrstrickland (JIRA) 01/17/2013
 
 
Close
loading
Please Confirm
Close