qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r585129 - in /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client: BasicMessageProducer_0_10.java message/AbstractJMSMessageFactory.java
Date Tue, 16 Oct 2007 12:05:42 GMT
Author: arnaudsimon
Date: Tue Oct 16 05:05:38 2007
New Revision: 585129

URL: http://svn.apache.org/viewvc?rev=585129&view=rev
Log:
Updated for handling headers and jmstype

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

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java?rev=585129&r1=585128&r2=585129&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
Tue Oct 16 05:05:38 2007
@@ -99,6 +99,11 @@
         BasicContentHeaderProperties contentHeaderProperties = message.getContentHeaderProperties();
         // set the application properties
         qpidityMessage.getMessageProperties().setContentType(contentHeaderProperties.getContentType().toString());
+        AMQShortString type = contentHeaderProperties.getType();
+        if( type != null )
+        {
+            qpidityMessage.getMessageProperties().setType( type.toString());
+        }
         qpidityMessage.getMessageProperties().setMessageId(message.getJMSMessageID()) ;
         AMQShortString correlationID = contentHeaderProperties.getCorrelationId();
         if( correlationID != null )
@@ -121,8 +126,7 @@
                     .setReplyTo(new ReplyTo(dest.getExchangeName().toString(), dest.getRoutingKey().toString()));
         }
          //JMS_QPID_DESTTYPE   is always set but useles so this is a temporary fix
-        // TODO remove second test
-        if (contentHeaderProperties.getHeaders() != null && contentHeaderProperties.getHeaders().size()
> 1)
+        if (contentHeaderProperties.getHeaders() != null)
         {
             qpidityMessage.getMessageProperties().setApplicationHeaders(FiledTableSupport.convertToMap(contentHeaderProperties.getHeaders()));
 

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java?rev=585129&r1=585128&r2=585129&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java
Tue Oct 16 05:05:38 2007
@@ -131,17 +131,14 @@
         {
             props.setEncoding(encoding);
         }
-        props.setExpiration(devprop.getExpiration());
-        // todo update when fieldtable is used props.setHeaders(mprop.getApplicationHeaders());
+        props.setExpiration(devprop.getExpiration());        
         props.setMessageId(mprop.getMessageId());
         props.setPriority((byte) devprop.getPriority());
         props.setReplyTo(replyToURL);
         props.setTimestamp(devprop.getTimestamp());
         props.setType(mprop.getType());
         props.setUserId(mprop.getUserId());
-
-        props.setHeaders(FiledTableSupport.convertToFieldTable(mprop.getApplicationHeaders()));
-
+        props.setHeaders(FiledTableSupport.convertToFieldTable(mprop.getApplicationHeaders()));
       
         return createMessage(messageNbr, data, exchange, routingKey, props);
     }
 



Mime
View raw message