no need to sync here, the poller will dispatch for handling anyway
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 30 May 2007 08:44:40 +0000 (08:44 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 30 May 2007 08:44:40 +0000 (08:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@542779 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/connector/CometEventImpl.java

index 257181d..b0b68df 100644 (file)
@@ -150,37 +150,31 @@ public class CometEventImpl implements CometEvent {
     public void configure(CometEvent.CometConfiguration... options)
         throws IOException, IllegalStateException {
         checkWorkerThread();
-        synchronized (cometConfigurations) {
-            cometConfigurations.clear();
-            for (CometEvent.CometConfiguration cc : options) {
-                cometConfigurations.add(cc);
-            }
-            request.action(ActionCode.ACTION_COMET_CONFIGURE,options);
+        cometConfigurations.clear();
+        for (CometEvent.CometConfiguration cc : options) {
+            cometConfigurations.add(cc);
         }
+        request.action(ActionCode.ACTION_COMET_CONFIGURE,options);
     }
 
     public void register(CometEvent.CometOperation... operations)
         throws IOException, IllegalStateException {
-        synchronized (cometOperations) {
-            //add it to the registered set
-            for (CometEvent.CometOperation co : operations) {
-                if (!cometOperations.contains(co)) {
-                    cometOperations.add(co);
-                    request.action(ActionCode.ACTION_COMET_REGISTER, translate(co));
-                }
+        //add it to the registered set
+        for (CometEvent.CometOperation co : operations) {
+            if (!cometOperations.contains(co)) {
+                cometOperations.add(co);
+                request.action(ActionCode.ACTION_COMET_REGISTER, translate(co));
             }
         }
     }
 
     public void unregister(CometOperation... operations)
         throws IOException, IllegalStateException {
-        synchronized (cometOperations) {
-            //remove from the registered set
-            for (CometEvent.CometOperation co : operations) {
-                if (cometOperations.contains(co)) {
-                    cometOperations.remove(co);
-                    request.action(ActionCode.ACTION_COMET_UNREGISTER, translate(co));
-                }
+        //remove from the registered set
+        for (CometEvent.CometOperation co : operations) {
+            if (cometOperations.contains(co)) {
+                cometOperations.remove(co);
+                request.action(ActionCode.ACTION_COMET_UNREGISTER, translate(co));
             }
         }
     }