[jboss-dev-forums] [Design of JBoss ESB] - Should JmsCourier be allowed to overwrite outgoing JMS Messa
beve
do-not-reply at jboss.com
Wed Aug 5 09:19:34 EDT 2009
Jira: https://jira.jboss.org/jira/browse/JBESB-2771
When a JmsCourier is created and is specified to be a sender (isReciever=false), the passed in JMSEPR's message selectors is stored in a field (_messageProperties which is a List of KeyValuePairs).
When this JmsCourier is going to deliver a JMS Message it will iterate through the properties and set them on the outgoing JMS Message:
for (KeyValuePair kvp : _messageProperties) {
| String key = kvp.getKey();
| if(message.getStringProperty(key) == null) {
| message.setStringProperty(key, kvp.getValue());
| }
The problem here is that the current implementation will first check to see if the JMS Message already has a property with the same key set on it, and if it has, will not overwrite the value.
This is a problem because before this is done the JMSPropertiesStrategy will have been run and might for example have set the 'jbossESBresponseUUID' causing and old and invalid message selector to be passed through.
This can be fixed by letting the JmsCourier have the last say and overwrite message properties. Or an explicit check could be add for 'jbossESBresponseUUID'.
Any thoughts on this?
Thanks,
/Daniel
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4248128#4248128
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4248128
More information about the jboss-dev-forums
mailing list