From: Amir S. <am...@co...> - 2004-10-13 21:34:58
|
The workaround you discussed in your previous post is inapplicable for MantaRay, since in Manta the TemporaryQueue or TemporaryTopic object is not passed on the JMSReplyTo as a Queue or a Topic, but rather as a Destination (JMS1.1). Therefore, you can not cast it to a Queue or a Topic - this is not a Queue or Topic, it's a pure Destination. A temporary workaround that you could use, is to create a MessageConsumer from a Session (and not a QueueSender from a QueueSession). This is a bit cumbersome, but this whole issue would be resolved in Manta 1.2 which will be released early next week. Thanks for pointing this out to us. Nimo, Amir adds : I have opened a Bug on the matter, you can monitor it on: https://sourceforge.net/tracker/index.php?func=detail&aid=1046613&group_id=112623&atid=663823 Manta Development Team. ----- Original Message ----- From: Anthony Bargnesi To: man...@li... Sent: Wednesday, October 13, 2004 8:34 PM Subject: [Mantaray-users] MantaRay behavior when using TemporaryQueue with JMSReplyTo property Hello MantaRay developers, There was a bug in JMS 1.1 about setting the JMSReplyTo property to a TemporaryQueue. Since the JMSReplyTo property takes a Destination, such as a Queue or Topic, if you try ((TemporaryQueue)message.getJMSReplyTo()) then it will throw a ClassCastException. This bug was reported in the Java Developer Connection as bug # 4354955 (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4354955). The workaround is to cast message.getJMSReplyTo() to a Queue or a Topic because they extend from Destination. So the workaround would yield ((Queue)message.getJMSReplyTo()). The trouble I have with implementing this workaround is that it does not work for MantaRay. The same ClassCastException occurs when I execute the line "final javax.jms.QueueSender producer = _queueSession.createSender((javax.jms.Queue)destination);". The object "destination" is a javax.jms.Destination, which becomes a MantaDestination. I performed a destination.class.getName() yielding "Destination DEBUG - org.mr.api.jms.MantaDestination." Then I performed a destination.toString(); yielding "Destination DEBUG - &&TMPQ{ODA}[4]0" From this debug statement it appears that it sees its a temporary queue coming from agent ODA, but I cannot cast it to a Queue. Any help would be appreciated, I have tried this with other JMS vendors such as swiftmq & openjms and both have succeeded in this workaround. Thanks, Anthony Bargnesi Software Developer aba...@e-... 'There's no place like 127.0.0.1' |