On 5/3/06, Aleksi Kallio <[EMAIL PROTECTED]> wrote:
> Temporary topic names already are globally unique in ActiveMQ.
Exactly, that's way I would like to use them.
> How are
> you converting from temporary topic to string and back again? Maybe
> we've just gotta tweak that code a little to get your code to work.
Relevant lines of code are...
Topic marshalling:
// to is instance of MapMessage
to.setStringProperty(KEY_AUTHORISE_TO, authoriseTo);
Unmarshalling:
// from is instance of MapMessage
authoriseTo = from.getStringProperty(KEY_AUTHORISE_TO);
I'd replace these lines of code with...
Topic name initialisation:
// authoriseToTopic is instance of Topic
authoriseTo = authoriseToTopic.getTopicName();
authoriseTo = ((ActiveMQDestination) authoriseToTopic).getPhysicalName();
And topic recreation on the replying end:
topic = session.createTopic(authoriseTo);
topic = new ActiveMQTempTopic(authoriseTo);
and it should work.
The main issue is that the last line you typed (session.createTopic)
will create a regular topic, not a temporary topic.
--
James
-------
http://radio.weblogs.com/0112098/