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

Servicemix-drools - exchange submited two times, second raise error in logs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2013.02
    • servicemix-drools
    • None
    • Servicemix 3.3.2/3.4.1 in WAR mode in Tomcat 6, JRE 6 / x64 on Windows

    • Patch Available

    Description

      Related to this topic : http://servicemix.396122.n5.nabble.com/Servicemix-3-3-2-drools-2010-01-Received-exchange-problem-td3325976.html

      Stacktrace : http://servicemix.396122.n5.nabble.com/file/n3326715/Drools.log

      A message is normally submitted two times to drools component:

      • first as Active
      • second as Done

      A filter exist in DroolsEndPoint.handleProviderExchange in order to process only Active message but not enough in my case.

      In my case the first pass was processed correctly the exchange then and in DroolsEndPoint.handleProviderExchange the second pass was still Active not DONE... then it fire the rule and when it arrive in jbiHelper.answer the exchange was passed to DONE, so when it try to set the OUT message it failed.

      Solution is to add the same filter in jbiHelper.answer as it was done in DroolsEndPoint.handleProviderExchange like this :
      public void answer(Source content) throws Exception {
      MessageExchange me = this.exchange.getInternalExchange();
      if (me.getStatus() == ExchangeStatus.ACTIVE)

      { ... }

      }

      Attachments

        1. JbiHelper.java
          7 kB
          Erwan Guiochet

        Activity

          People

            ffang Freeman Yue Fang
            erwan.guiochet Erwan Guiochet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified