Where and how are you doing the corresponding
setJMSReplyTo? Can you try the
TemporaryTopic replyTopic = (TemporaryTopic) msg.getJMSReplyTo();
immediately after the setJMSReplyTo() call?
Another instructive thing would be to
take a look at the String
Change your getJMSReplyTo() line to read:
Destination replyDestination = message.getJMSReplyTo();
Topic replyTopic = (Topic)replyDestination;
and it should go okay (at least it does under 2.4.4). It would probably also work under WebLogic. For compatibility, if you have explicitly to call delete() on temporaryTopic under Weblogic (I don't know if you do or if you should) you could use an instanceof and cast only if it is indeed a temporarytopic.
Now the question is, why is it creating Topic instead of TemporaryTopic? Does anybody know? Does it matter?