Hello,
With prior versions of JBoss Rules (3.0.5) I have been using JDK generated dynamic proxies as facts, and they have been working fine. However, after upgrading to JBoss Rules 4.0.0MR3, I cannot seem to get the dynamic proxies to work as facts. It seems that even though a rule fires that changes a field on the proxy, a second rule that should not be activated after the update still fires.
According to the JDK javadoc documentation, dynamic proxies are created as final. My assumption is that JBoss Rules is not creating Shadow facts for these since they are final. After reading the JIRA at
http://jira.jboss.com/jira/browse/JBRULES-960, I now am questioning what the effect of not using shadow facts is on the engine. The relevant part of that is:
"The problem is that SpringAOP is generating a proxy whose methods
equals() and hashCode() are "final". As drools must either override
these methods in the shadow proxy or not shadow the fact at all, I'm
disabling shadow proxy generation for this use case.