activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmaxo <cm...@engineer.com>
Subject Re: activemq-cpp getStringProperty
Date Tue, 09 Oct 2007 16:38:39 GMT



Ah - I see what's going on.  Looks like you have a slight programming error
in this line:

char *propValue = textMessage->getStringProperty("session_id").c_str();

You're getting a pointer to the internal char* of a temporary string object
... not a good idea :).  Instead, change the code to this and it should work
fine.

string propValue = textMessage->getStringProperty("session_id");

This worked for me.

Regards,
Nate


Hmm, I made that change but I still get an exception.  The exception
specifically states the property is not available.  Do you mind telling me
what version of the activemq-cpp code you are using and what version of the
activemq server you are using?  Maybe I've got something wrong.

Thanks,
Corey
-- 
View this message in context: http://www.nabble.com/activemq-cpp-getStringProperty-tf4576622s2354.html#a13119494
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message