qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1228843 - /qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java
Date Sun, 08 Jan 2012 13:44:02 GMT
Author: rgodfrey
Date: Sun Jan  8 13:44:01 2012
New Revision: 1228843

URL: http://svn.apache.org/viewvc?rev=1228843&view=rev
Log:
QPID-1644 : Fix 0-8 Java Client to only declare amq.* exchanges passively when creating a
producer

Modified:
    qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java

Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java?rev=1228843&r1=1228842&r2=1228843&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java
(original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java
Sun Jan  8 13:44:01 2012
@@ -40,6 +40,7 @@ import org.apache.qpid.framing.Composite
 import org.apache.qpid.framing.ContentBody;
 import org.apache.qpid.framing.ContentHeaderBody;
 import org.apache.qpid.framing.ExchangeDeclareBody;
+import org.apache.qpid.framing.MethodRegistry;
 
 public class BasicMessageProducer_0_8 extends BasicMessageProducer
 {
@@ -53,15 +54,17 @@ public class BasicMessageProducer_0_8 ex
     void declareDestination(AMQDestination destination)
     {
 
-        ExchangeDeclareBody body = getSession().getMethodRegistry().createExchangeDeclareBody(_session.getTicket(),
-                                                                                        
     destination.getExchangeName(),
-                                                                                        
     destination.getExchangeClass(),
-                                                                                        
     false,
-                                                                                        
     false,
-                                                                                        
     false,
-                                                                                        
     false,
-                                                                                        
     true,
-                                                                                        
     null);
+        final MethodRegistry methodRegistry = getSession().getMethodRegistry();
+        ExchangeDeclareBody body =
+                methodRegistry.createExchangeDeclareBody(_session.getTicket(),
+                                                         destination.getExchangeName(),
+                                                         destination.getExchangeClass(),
+                                                         destination.getExchangeName().toString().startsWith("amq."),
+                                                         false,
+                                                         false,
+                                                         false,
+                                                         true,
+                                                         null);
         // Declare the exchange
         // Note that the durable and internal arguments are ignored since passive is set
to false
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message