You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2006/12/10 19:27:49 UTC
svn commit: r485230 -
/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h
Author: tabish
Date: Sun Dec 10 10:27:48 2006
New Revision: 485230
URL: http://svn.apache.org/viewvc?view=rev&rev=485230
Log:
http://issues.apache.org/activemq/browse/AMQCPP-23
Change the delivery mode function to turn the property internally into true / false string.
Modified:
incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h?view=diff&rev=485230&r1=485229&r2=485230
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/commands/StompMessage.h Sun Dec 10 10:27:48 2006
@@ -290,9 +290,13 @@
return cms::DeliveryMode::PERSISTANT;
}
- return util::Integer::parseInt( getPropertyValue(
+ if( util::Boolean::parseBoolean( getPropertyValue(
CommandConstants::toString(
- CommandConstants::HEADER_PERSISTANT ) ) );
+ CommandConstants::HEADER_PERSISTANT ) ) ) == true ) {
+ return (int)cms::DeliveryMode::PERSISTANT;
+ }
+
+ return cms::DeliveryMode::NON_PERSISTANT;
}
/**
@@ -300,10 +304,16 @@
* @param mode DeliveryMode enumerated value.
*/
virtual void setCMSDeliveryMode( int mode ) {
+ std::string persistant = "true";
+
+ if( mode == (int)cms::DeliveryMode::NON_PERSISTANT ) {
+ persistant = "false";
+ }
+
setPropertyValue(
CommandConstants::toString(
CommandConstants::HEADER_PERSISTANT ) ,
- util::Integer::toString( mode ) );
+ persistant );
}
/**