On Thu, 2010-09-23 at 06:21 -0700, sodandk wrote: > Hi there > > I do > const cms::Destination *jmsdest = msg->getCMSReplyTo()->clone(); > and now and then use the saved jmsdest, to send messages back... > > many of my objects gets the same destination, so I dont want to have > hundreds > of the same destinations hanging around, instead I was to compare two > destinations, so I only has one of each. > > How to do that ? > > Is there a way to do dest->getname or something, so I can compare two > destinations > to see if they are indeed the same ? > > sincerely, > Søren >
You could cast them to ActiveMQDestination pointers and call the equals method on one, passing in the target pointer. Regards -- Tim Bish Open Source Integration: http://fusesource.com Follow me on Twitter: http://twitter.com/tabish121 My Blog: http://timbish.blogspot.com/