Thanks Richard, that cleared things up for me. On Tue, Sep 6, 2011 at 10:11 PM, Richard S. Hall <[email protected]>wrote:
> It is not clear if you are intending to update S so it becomes S2 or if you > are installing a separate S2 bundle. > > If it is the former, then you shouldn't need to do anything other than > update S, because updating will stop S and then restart it (technically you > could still refresh afterward, but it is not strictly necessary). > > If it is the latter, then C won't necessarily get the new service. First, > it has to explicitly re-get it, since it won't get it without doing anything > (e.g., it could listen for service events). Even then, the service reference > it gets depends on service ranking. If you haven't assigned any service > ranking (via service properties) then it will likely get the first service > again if it re-gets it because older services have a higher default rank > than newer ones. > > -> richard > > > > On 9/6/11 17:06, Rafael Liu wrote: > >> Hey guys, >> >> I'm trying to understand service versioning/wiring.. Suppose that I have a >> client bundle C and server bundle S that both depend on a interface bundle >> I. Bundle C has a getServiceReference() and bundle S has the >> registerService(). So: >> >> C --> I<-- S >> >> I start the container and install/start everything. All is OK. But then I >> install/start a new version of S, say S2 (that still depends on bundle I >> with the same version). >> >> If I refresh bundle C I would expect that it gets wired to S2 now, and the >> next getServiceReference() would get the implementation from S2. But that >> is >> not what happen. In order for the new S2 to be seen I need to explicitly >> update S before refreshing C or reboot the framework. >> >> How can I hot-swap a service implementation? Am I doing it the wrong way? >> >> > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@felix.**apache.org<[email protected]> > For additional commands, e-mail: [email protected] > > -- Rafael Liu +55 61 9608-7722 http://rafaelliu.net

