tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isil...@apache.org
Subject svn commit: r573062 - in /incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification: NotificationReferenceBindingInvoker.java NotificationReferenceBindingProvider.java
Date Wed, 05 Sep 2007 21:17:08 GMT
Author: isilval
Date: Wed Sep  5 14:17:07 2007
New Revision: 573062

URL: http://svn.apache.org/viewvc?rev=573062&view=rev
Log:
Move synchronization as well

Modified:
    incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingInvoker.java
    incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingProvider.java

Modified: incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingInvoker.java?rev=573062&r1=573061&r2=573062&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingInvoker.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingInvoker.java
Wed Sep  5 14:17:07 2007
@@ -75,20 +75,18 @@
         }
 
         try {
-            synchronized(this) {
-                for (SubscriberInfo subscriber : notificationReferenceBindingProvider.getSubscribers())
{
-                    // check for each subscriber's broker id and skip if equal
-                    if (incomingBrokerID != null && subscriber.brokerID != null &&
incomingBrokerID.equals(subscriber.brokerID)) {
-                        continue;
-                    }
-                    HashMap<String, String> headers = new HashMap<String, String>();
-                    headers.put(IOUtils.Notification_Operation, operation.getName());
-                    String brokerID = notificationReferenceBindingProvider.getBrokerID();
-                    if (brokerID != null) {
-                        headers.put(Constants.Broker_ID, brokerID);
-                    }
-                    IOUtils.sendHttpRequest(subscriber.address, headers, writeable, null);
+            for (SubscriberInfo subscriber : notificationReferenceBindingProvider.getSubscribers())
{
+                // check for each subscriber's broker id and skip if equal
+                if (incomingBrokerID != null && subscriber.brokerID != null &&
incomingBrokerID.equals(subscriber.brokerID)) {
+                    continue;
                 }
+                HashMap<String, String> headers = new HashMap<String, String>();
+                headers.put(IOUtils.Notification_Operation, operation.getName());
+                String brokerID = notificationReferenceBindingProvider.getBrokerID();
+                if (brokerID != null) {
+                    headers.put(Constants.Broker_ID, brokerID);
+                }
+                IOUtils.sendHttpRequest(subscriber.address, headers, writeable, null);
             }
         } catch(Exception e) {
             e.printStackTrace();

Modified: incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingProvider.java?rev=573062&r1=573061&r2=573062&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-notification/src/main/java/org/apache/tuscany/sca/binding/notification/NotificationReferenceBindingProvider.java
Wed Sep  5 14:17:07 2007
@@ -247,7 +247,7 @@
         }
     }
 
-    public List<SubscriberInfo> getSubscribers() {
+    public synchronized List<SubscriberInfo> getSubscribers() {
         return subscribers;
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message