[ 
https://issues.apache.org/activemq/browse/SMXCOMP-553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean Jacobs updated SMXCOMP-553:
--------------------------------

    Attachment: SwitchPropertyOnExchangeTest.java

This is a unit test that shows the problem detailed in this issue.

> SwitchPredicate for EIP MessageFilter does not work properly when switch is 
> set on the message exchange.
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-553
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-553
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-eip
>         Environment: Windows XP SP 2 with Sun JVM 1.5.0.17
>            Reporter: Jean Jacobs
>            Priority: Minor
>         Attachments: SwitchPropertyOnExchangeTest.java
>
>
> While creating unit tests for the servicemix-eip component, I was testing the 
> SwitchPredicate when the property that turns on/off the message flow is set 
> on the message exchange.  It appears that the property is not getting picked 
> up properly.  I set the property on the exchange as follows:
> me.setProperty("on", Boolean.TRUE);
> In the MessageFilter.java processAsync() method, it copies the message 
> exchange's "in" message to a new message exchange, the property gets lost.  
> It was set on the exchange itself not on the exchange's "in" message.
> I tried setting the exchange's "in" message property as follows:
> me.getInMessage().setProperty("on", Boolean.TRUE);
> The property gets transferred to the new exchange's "in" message, but the 
> code in SwitchPredicate.java's matches() method is looking for the property 
> on the exchange not its "in" message.
> The property is set to False by default. I will submit a test that shows the 
> problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to