Doesn't using the modify function mean the bean will find out about the
change immediately? That is mentioned in JIA section 6.5.8.

Is that what you meant by "...otherwise does things explicitly."?

If that is the case, why is the listener required in any scenario?

Mike



----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 21, 2004 1:49 PM
Subject: Re: JESS: Java Beans


> I think Brenda K Hamilton wrote:
> > What I need is to have a Java program, may or may not be a bean, load
> > Jess and a set of rules and 'pass' some object, a DOM document is a good
> > example, and have the rules process the object.  For a DOM document, the
> > processing would take the form of doing a left depth first traversal and
> > extract selected information.
> >
> > >From the documentation and examples, it seems like objects that are
> > manipulated by Jess have to provide a change listener and chance
> > support.  Is this correct?
> >
>
> There are two different ways to "manipulate" Java objects in Jess. One
> way is just as in Java -- writing code that calls methods and
> otherwise does things explicitly. There are no requirements at all on
> such objects.
>
> The other thing you can do is pattern-match on objects -- i.e., write
> rules that directly react to them.  Jess can pattern-match objects to
> the extent that they are JavaBeans -- i.e., only JavaBean-like
> properties can be matched.
>
> PropertyChangeEvent support is not required, but if a Bean doesn't
> support it, then Jess will be working with a "snapshot" of the object
> -- if code outside of Jess changes a property of such an object, Jess
> won't know about the new value until Rete.reset() or
> Rete.updateObject() are called. If, on the other hand, a Bean support
> PropertyChangeEvents, then Jess will know immediately when such
> changes are made.
>
> So the answer is no, support for PropertyChangeEvents is not
> required. For static objects, such as a tree of XML nodes, they
> wouldn't matter even if they were there. PropertyChangeEvents are
> useful when Beans are connected to some time-varying information
> source outside of Jess.
>
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Science and Engineering PSEs        Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> PO Box 969, MS 9012                 [EMAIL PROTECTED]
> Livermore, CA 94550         http://herzberg.ca.sandia.gov
>
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]
> --------------------------------------------------------------------
>
>

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to