Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-542

Drools core 3.0.4 - Drools does not remove itself as a listener when Facts are Retracted

    XMLWordPrintable

    Details

      Description

      REPORTED BY TOM GONZALEZ:
      ---------------------------------------------

      We are asserting facts that support property change listeners and found that Drools added itself as a listener just fine but failed to remove itself when the facts were retracted.

      We have fixed the stated problem by modifying org.drools.common.AbstractWorkingMemory as follows:

      Starting at line number 582:
      protected void removePropertyChangeListener(final FactHandle handle) throws NoSuchFactObjectException {
      Object object = null;
      try {
      object = getObject( handle );

      final Method method = object.getClass().getMethod( "removePropertyChangeListener",
      AbstractWorkingMemory.ADD_REMOVE_PROPERTY_CHANGE_LISTENER_ARG_TYPES );

      method.invoke( object,
      this.addRemovePropertyChangeListenerArgs );

      Regards,

      Tom G

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tirelli Edson Tirelli
                Reporter:
                tirelli Edson Tirelli
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: