Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-553

SwitchPredicate for EIP MessageFilter does not work properly when switch is set on the message exchange.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 2013.02
    • servicemix-eip
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jjacobs Jean Jacobs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: