Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
Windows XP SP 2 with Sun JVM 1.5.0.17
Description
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.