<br><br><div class="gmail_quote">On Wed, Sep 19, 2012 at 2:02 PM, Mircea Markus <span dir="ltr">&lt;<a href="mailto:mircea.markus@jboss.com" target="_blank">mircea.markus@jboss.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div class="im"><br><div><div>On 19 Sep 2012, at 12:57, Manik Surtani wrote:</div><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><blockquote type="cite">
<br>Hi guys,<br><br>Having briefly investigated<span> </span><a href="https://issues.jboss.org/browse/ISPN-2314" target="_blank">https://issues.jboss.org/browse/ISPN-2314</a>, I consider the fix (<a href="https://github.com/infinispan/infinispan/pull/1318" target="_blank">https://github.com/infinispan/infinispan/pull/1318</a>) to be rather fishy.<br>
<br>Sure it works, but it masks the fact that the order in which things are started has changed (This IMO seems to be the result of<span> </span><a href="http://issues.jboss.org/browse/ISPN-2256" target="_blank">http://issues.jboss.org/browse/ISPN-2256</a>).<span> </span><br>
<br>Not only that, but the fact that you have to modify both the component registry and the configuration makes me think that there&#39;re situations where the configuration changes are applied, and others where it&#39;s not (hence why you have to change the component registry).<br>
<br>So, can we please stop and try to understand what really is happening here? I was expecting Mircea to have a look into a fix for this since it looks related to cache start order.<br><br>Personally, I don&#39;t really see why the lifecycle manager has to mess up with the component registry. Changes to the configuration were &#39;enough&#39; (until 2256) and I don&#39;t see why that should change.<br>
</blockquote><div><br></div><div>It appears that the cache is already constructed when the cache starting callback is issued.  This means any changes to the configuration at this point won&#39;t have any effect.  But changing the configuration is still necessary to allow for restarts.</div>
</span></blockquote><br></div></div><div>The cacheStartingCallback was being invoked from two places:</div><div>- when the cache was first created from InternalCacheFactory</div>- on subsequent  re-starts from ComponentRegistry.start() <div>
<br></div><div>As the same call happened at different stages of initialisation I&#39;ve only kept the 2nd call for consistency. </div><div><br></div></div></blockquote></div><br>Perhaps we need two notifications? One during initialization, and one during startup?<br>
<br>On the other hand, I&#39;m not sure why would the interceptor chain exist during restart but not during start. AFAIK it&#39;s a volatile component, so it should be removed during shutdown.<br><br>Cheers<br>Dan<br><br>