You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2007/10/04 22:56:49 UTC

svn commit: r582010 - /myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationContext.java

Author: skitching
Date: Thu Oct  4 13:56:48 2007
New Revision: 582010

URL: http://svn.apache.org/viewvc?rev=582010&view=rev
Log:
Reduce lock contention.

Modified:
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationContext.java

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationContext.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationContext.java?rev=582010&r1=582009&r2=582010&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationContext.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationContext.java Thu Oct  4 13:56:48 2007
@@ -279,9 +279,9 @@
 	 */
 	public void setAttribute(String name, Object attribute)
 	{
-		synchronized(this)
+		synchronized(attributes)
 		{
-			removeAttribute(name);
+			attributes.remove(name);
 			attributes.put(name, attribute);
 		}
 	}
@@ -291,7 +291,7 @@
 	 */
 	public boolean hasAttribute(String name)
 	{
-		synchronized(this)
+		synchronized(attributes)
 		{
 			return attributes.containsKey(name);
 		}
@@ -302,7 +302,7 @@
 	 */
 	public Object getAttribute(String name)
 	{
-		synchronized(this)
+		synchronized(attributes)
 		{
 			return attributes.get(name);
 		}
@@ -313,7 +313,7 @@
 	 */
 	public Object removeAttribute(String name)
 	{
-		synchronized(this)
+		synchronized(attributes)
 		{
 			return attributes.remove(name);
 		}