geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r576653 - /geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/MessageResponseInspector.java
Date Tue, 18 Sep 2007 01:55:51 GMT
Author: jdillon
Date: Mon Sep 17 18:55:51 2007
New Revision: 576653

URL: http://svn.apache.org/viewvc?rev=576653&view=rev
Log:
Syncrhonize the set not the inspector methods

Modified:
    geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/MessageResponseInspector.java

Modified: geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/MessageResponseInspector.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/MessageResponseInspector.java?rev=576653&r1=576652&r2=576653&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/MessageResponseInspector.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/MessageResponseInspector.java
Mon Sep 17 18:55:51 2007
@@ -19,6 +19,7 @@
 
 package org.apache.geronimo.gshell.remote.message;
 
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.UUID;
@@ -39,9 +40,9 @@
 {
     private Logger log = LoggerFactory.getLogger(getClass());
 
-    private Set<UUID> registeredIds = new HashSet<UUID>();
+    private Set<UUID> registeredIds = Collections.synchronizedSet(new HashSet<UUID>());
 
-    public synchronized void register(final Request req) {
+    public void register(final Request req) {
         assert req != null;
 
         UUID id = (UUID) req.getId();
@@ -56,7 +57,7 @@
         }
     }
 
-    public synchronized void deregister(final Request req) {
+    public void deregister(final Request req) {
         assert req != null;
 
         UUID id = (UUID) req.getId();
@@ -73,7 +74,7 @@
     // ResponseInspector
     //
     
-    public synchronized Object getRequestId(final Object message) {
+    public Object getRequestId(final Object message) {
         if (message instanceof Message) {
             UUID id = ((Message)message).getCorrelationId();
 



Mime
View raw message