So if I do Message *clone = message->clone(); and then later (out of scope) clone the dest, then that should be safe also, right ?
thanx Søren Timothy Bish wrote: > > Yes, anything you clone is now yours to delete. > > > On Fri, 2008-12-05 at 06:11 -0800, Sodan wrote: >> ok, it seems that I need to >> cms::Destination *clone = cmsdst->clone(); >> and then later when done, I can delete the clone... >> >> right ? >> >> >> >> Sodan wrote: >> > >> > So I get a message and create a producer based on the destination >> > const cms::Destination *cmsdst = map->getCMSReplyTo(); >> > session->createProducer(cmsdst); >> > which works fine. >> > >> > The thing is that I dont need to reply instantly back, when I get a >> > message, >> > instead I will send back messages after 1 minute or 1 hour. >> > So is the above Destination valid forever or ? >> > >> > So the 2 questions are: >> > 1) the above 'const cms::Destination' objects, who owns that and for >> how >> > long, >> > or can/should I make a copy of it or ? >> > 2) tried to do >> > string providerstring = cmsdst->toProviderString(); >> > t = session->createQUEUE(providerstring); >> > session->createProducer(t); >> > but this does not work... no messages seems to hit the other end >> > >> > The providerstring returned is: >> "ID:verisign-45349-1228314908106-0:32:1" >> > >> > So I get a message... and need to reply later, sometimes much later... >> > What is the best approach ? >> > >> > >> > -- > Tim Bish > http://fusesource.com > http://timbish.blogspot.com/ > > > > > -- View this message in context: http://www.nabble.com/Questions-about-getCMSReplyTo-tp20853339p20855709.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.