activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r493032 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
Date Fri, 05 Jan 2007 13:39:43 GMT
Author: rajdavies
Date: Fri Jan  5 05:39:42 2007
New Revision: 493032

URL: http://svn.apache.org/viewvc?view=rev&rev=493032
Log:
guard against MessageEvaluationContext dropping the message whilst doing the check

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java?view=diff&rev=493032&r1=493031&r2=493032
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java
Fri Jan  5 05:39:42 2007
@@ -56,11 +56,13 @@
     }
 
 
-    public boolean matches(MessageEvaluationContext message) throws JMSException{
+    public boolean matches(MessageEvaluationContext mec) throws JMSException{
         try{
             //for Queues - the message can be acknowledged and dropped whilst still
             //in the dispatch loop
-            return message.getMessage() != null &&  matchesForwardingFilter(message.getMessage());
+            //so need to get the reference to it
+            Message message = mec.getMessage();
+            return message != null &&  matchesForwardingFilter(message);
         }catch(IOException e){
             throw JMSExceptionSupport.create(e);
         }



Mime
View raw message