Execute works on getAddedCollection but not getChangedCollection

Todd Wright twright at bbn.com
Thu Feb 1 13:17:27 EST 2007


Does your other plugin call "publishChange" on the object?  A plugin 
must explicitly call "publishChange" to notify the subscribers that the 
object has changed.

If you're calling "publishChange", what does your predicate look like? 
It should do a simple "instanceof" check and optionally check for 
immutable fields (i.e. properties you're not changing).  For more 
information, see page 28 of the Cougaar Developers Guide:
   http://doc.cougaar.org

Todd

James Livingood wrote:
> 
> Hello all,
>  
> 
> I’ve subscribed to the object I want:
> 
> HypothesisSub = (IncrementalSubscription) 
> getBlackboardService().subscribe(HYPOTHESIS_PRED);
> 
>  
> 
> And in my execute() I have:
> 
> for (Iterator i = HypothesisSub.getAddedCollection().iterator(); 
> i.hasNext();) {
> 
> // grabs all the information and puts it into MS SQL.
> 
> }
> 
> for (Iterator i = HypothesisSub.getChangedCollection().iterator(); 
> i.hasNext();) {
> 
> // grab all the data AGAIN and put it into MS SQL
> 
> }
> 
>  
> 
> Why does the getAddedCollection run when the plugin is first started up, 
> but the getChangedCollection does not run when objects that I've 
> subscribed to change/new ones are added/etc?
> 
>  
> 
>  
> 
> Thanks for any hints, information, things to check, etc.
> 
> James
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Cougaar-developers mailing list
> Cougaar-developers at cougaar.org
> http://cougaar.org/mailman/listinfo/cougaar-developers



More information about the Cougaar-developers mailing list