You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/01/18 19:32:43 UTC

svn commit: r497526 - /webservices/muse/trunk/modules/muse-wsn-impl/src/org/apache/muse/ws/notification/impl/SimpleNotificationConsumer.java

Author: danj
Date: Thu Jan 18 10:32:42 2007
New Revision: 497526

URL: http://svn.apache.org/viewvc?view=rev&rev=497526
Log:
small update to ensure backwards compatibility, behavior-wise - we only run the topic 
listeners if there are > 0 listeners on a topic, NOT if there is a topic in the message. 
using my initial check would cause a change in behavior for pre-2.2 users who made all 
of their listeners as simple NotificationMessageListeners.

Modified:
    webservices/muse/trunk/modules/muse-wsn-impl/src/org/apache/muse/ws/notification/impl/SimpleNotificationConsumer.java

Modified: webservices/muse/trunk/modules/muse-wsn-impl/src/org/apache/muse/ws/notification/impl/SimpleNotificationConsumer.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsn-impl/src/org/apache/muse/ws/notification/impl/SimpleNotificationConsumer.java?view=diff&rev=497526&r1=497525&r2=497526
==============================================================================
--- webservices/muse/trunk/modules/muse-wsn-impl/src/org/apache/muse/ws/notification/impl/SimpleNotificationConsumer.java (original)
+++ webservices/muse/trunk/modules/muse-wsn-impl/src/org/apache/muse/ws/notification/impl/SimpleNotificationConsumer.java Thu Jan 18 10:32:42 2007
@@ -192,7 +192,17 @@
                 // if a topic is available, pass it along to the 
                 // topic listeners
                 //
-                if (_messages[n].getTopic() != null)
+                QName topic = _messages[n].getTopic();
+                Collection topicListeners = getTopicListeners(topic);
+                
+                //
+                // our check is if there are zero topic listeners, not 
+                // whether a topic merely exists in the message. this 
+                // means that pre-2.2 users who created all listeners 
+                // as message listeners will not experience a change 
+                // in behavior for messages with topics in them
+                //
+                if (!topicListeners.isEmpty())
                     processTopicListeners(_messages[n]);
                 
                 else



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