Anyway, it would be easy to make a small code change to workaround the ActiveMQ behaviour.
I don't have ActiveMQ set up here, so maybe you could try this:
Remove this code from JBossMessage::setDestination()
| if (!(destination instanceof JBossDestination))
| {
| throw new InvalidDestinationException("Destination cannot be foreign");
| }
|
Also we should probably add a sanity check in ProducerAspect::handleSend() to check if the destination is actually a JBossDestination, in case someone is actually stupid enough to try and send a message to JBM with a foreign destination set.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053842#4053842
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053842
"thomasra" wrote : The version of ActiveMQ is vanilla 4.1.1.
|
| Like I said earlier: using a connectionfactory and a rar file, along with actually creating a new Message from the ActiveMQ session, copying the content to the new message _does_ work.
That shouldn't be necessary. Part of the JMS spec says a JMS 1.1 compliant provider *must* be able to to accept messages from another JMS provider for sending (this is called a foreign message).
I'm not sure if ActiveMQ is JMS compliant - I shall take a look at their source and see....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053832#4053832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053832