<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
James Livingood wrote:
<blockquote cite="mid200702021157.l12BvoV08330@zima.bbn.com" type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
  <style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
  </style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  </o:SmartTagType>
  <div class="Section1">
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt; color: windowtext;">Hello Aaron
and Todd,<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt; color: windowtext;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt; color: windowtext;">If the
other plugin doesn’t run
publishChange(), is there still a way to detect changes to the objects?</span></font></p>
  </div>
</blockquote>
If no one calls publishChange, then no one knows that the object has
changed. The purpose of the publishChange call is to notify plugins
that something has changed -- which causes them to wake up, and their
execute method to be called. This is also what puts the object on the
ChangedCollection.<br>
If you do not call publishChange, then the object will not be on the
ChangedCollection -- and if it is old, it also wont be on the
AddedCollection. So your plugin wouldnt see it. Additionally,
Subscriptions are how your plugin knows that it has work to do and
should run. So if no one calls publishChange on the object, then your
plugin's subscriptions will think there is nothing new for your plugin
to do, so the plugin wont even run!<br>
<br>
Even if your plugin were periodically running anyway (a different
subscription, or an Alarm), <br>
the only way in this case to tell that the object has changed would be
to compare it with some previous memory of what the object looked like.
<br>
<br>
Correct Cougaar behavior is to call publishChange on any object
previously publishAdded to the Blackboard when you change it.<br>
<br>
The full Java file that you sent doesnt look at the ChangedCollection,
so I assume this is a previous version.<br>
<br>
Aaron<br>
<br>
</body>
</html>