Yes, this is a pain isn't it?
We have the JMS spec to blame for that.
Either of your two methods will work.
Actually we have exactly this problem in the message bridge where we have to forward a
message from one source to a a target.
In that case we use method 2)
Take a look at the message bridge code for an example:
See
http://anonsvn.jboss.org/repos/messaging/tags/JBossMessaging_1_4_0_CR1/sr...
search for addMessageIDInHeader
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065323#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...