[rules-users] More on thread safety of working memory

Michael Neale michael.neale at gmail.com
Tue Feb 20 22:23:00 EST 2007


Dirk, it should be OK. As when you assert a fact with a change listneer (a
dymanic fact) it should call the sync'ed modifyObject just like you would
form the outside.

On 2/21/07, Dirk Bergstrom <dirk at juniper.net> wrote:
>
> This horse has been beaten pretty hard
> (http://thread.gmane.org/gmane.comp.java.drools.user/3557/focus=3585), but
> I
> have a newish angle on it.
>
> My app has a big collection of business objects (1000 of type X, 10,000 of
> type
> Y, 200 of type Z, etc) asserted into a single working memory.  These
> objects
> need to be updated from external sources periodically.  Because each
> object type
> has a different source, I'd like to parallelize the updates in separate
> threads.
>
> Some of the updates involve retraction of expired objects or assertion of
> new
> ones, but most are just changing fields on already-asserted objects (all
> fields
> have PropertyChangeListener (PCL) support).
>
> I think that using a SynchronisedWorkingMemory will handle the
> assert/retract
> updates.  Will it be "happy" in the face of PCL changes as well, or do I
> need to
> do something more?
>
> --
> Dirk Bergstrom               dirk at juniper.net
> _____________________________________________
> Juniper Networks Inc.,          Computer Geek
> Tel: 408.745.3182           Fax: 408.745.8905
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070221/7a132908/attachment.html 


More information about the rules-users mailing list