qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject svn commit: r1153298 - /qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
Date Tue, 02 Aug 2011 22:58:42 GMT
Author: rajith
Date: Tue Aug  2 22:58:41 2011
New Revision: 1153298

URL: http://svn.apache.org/viewvc?rev=1153298&view=rev
Log:
QPID-3377 Applying patch from Pavel Moravec
QPID-3381 Changed the code to use QpidMessageProperties.QPID_SUBJECT
instead of the string literal.

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

Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java?rev=1153298&r1=1153297&r2=1153298&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
(original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
Tue Aug  2 22:58:41 2011
@@ -35,6 +35,7 @@ import org.apache.qpid.client.AMQDestina
 import org.apache.qpid.client.AMQDestination.DestSyntax;
 import org.apache.qpid.client.message.AMQMessageDelegate_0_10;
 import org.apache.qpid.client.message.AbstractJMSMessage;
+import org.apache.qpid.client.message.QpidMessageProperties;
 import org.apache.qpid.client.messaging.address.Link.Reliability;
 import org.apache.qpid.client.messaging.address.Node.QueueNode;
 import org.apache.qpid.client.protocol.AMQProtocolHandler;
@@ -178,7 +179,7 @@ public class BasicMessageProducer_0_10 e
         
         if (destination.getDestSyntax() == AMQDestination.DestSyntax.ADDR && 
            (destination.getSubject() != null || 
-              (messageProps.getApplicationHeaders() != null && messageProps.getApplicationHeaders().get("qpid.subject")
!= null))
+              (messageProps.getApplicationHeaders() != null && messageProps.getApplicationHeaders().get(QpidMessageProperties.QPID_SUBJECT)
!= null))
            )
         {
             Map<String,Object> appProps = messageProps.getApplicationHeaders();
@@ -188,16 +189,16 @@ public class BasicMessageProducer_0_10 e
                 messageProps.setApplicationHeaders(appProps);          
             }
             
-            if (appProps.get("qpid.subject") == null)
+            if (appProps.get(QpidMessageProperties.QPID_SUBJECT) == null)
             {
                 // use default subject in address string
-                appProps.put("qpid.subject",destination.getSubject());
+                appProps.put(QpidMessageProperties.QPID_SUBJECT,destination.getSubject());
             }
                     
-            if (destination.getTargetNode().getType() == AMQDestination.TOPIC_TYPE)
+            if (destination.getAddressType() == AMQDestination.TOPIC_TYPE)
             {
                 deliveryProp.setRoutingKey((String)
-                        messageProps.getApplicationHeaders().get("qpid.subject"));      
         
+                        messageProps.getApplicationHeaders().get(QpidMessageProperties.QPID_SUBJECT));
               
             }
         }
         



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


Mime
View raw message