topic = new ActiveMQTempTopic(authoriseTo);
[...]
authoriseTo = ((ActiveMQDestination) authoriseToTopic).getPhysicalName();

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.

Thanks! Unfortunately I'm getting now:

javax.jms.InvalidDestinationException: Cannot use a Temporary destination from another Connection

The string (physical topic name) I'm passing on the message is for example:
TemporaryTopic-{TD{ID:joutsen.csc.fi-37800-1146651981603-6:0}TD}ID:joutsen.csc.fi-37800-1146651981603-17:0

I'm using ActiveMQ version 3.1.

Reply via email to