Hi Richard, I agree with you, and I understand why the existing active bundles remain wired to the uninstalled bundle until refresh. However it sounded like the newly installed bundle was wiring to the uninstalled bundle. This doesn’t sound right… the framework shouldn’t create new wires into uninstalled bundles, should it?
This assumes I have correctly understood the scenario as described by Maurice. Neil > On 4 Nov 2015, at 13:31, Richard S. Hall <he...@ungoverned.org> wrote: > > > On 11/4/15 06:52 , i...@cuhka.com <mailto:i...@cuhka.com> wrote: >> I 'solved' it by restarting the device. I rather don't, as I like solution >> where I can upgrade functionality without shutting down. > > You don't need to shut down, you just need to refresh the framework. If you > update A and S, the old version of A is still hanging around because X1 is > using it. So, you have your framework state in somewhat of an "in between" > stage. Refreshing things gets everything back in shape. There are very few > rare instances where you would not want to refresh after an update or an > uninstall...99% of the time, you should refresh after either of those > operations. > > -> richard > >> >> Basically my structure is as follows: >> Bundle A: API >> Bundle S: Service (uses and provides some API implementation from A) >> Bundle X1..N: Provide functionality for S using the extender pattern, use >> and provide some API implementation from A) >> I updated A and S. For the X bundles the API change wasn't important, but >> for S it was. Somehow S still picked up old-A, while I had uninstalled old-A >> (and old-S). I have updated my tooling from 'THE OSGi plugin' from Gradle to >> use 'the bnd OSGi plugin'. I noticed that the old plugin would automatically >> add A's package as Export-Bundle, while with bnd's plugin I had to do that >> myself. Maybe that caused the problem. >> >> Maurice. >> >> Citeren Neil Bartlett <njbartl...@gmail.com>: >> >>>> On 4 Nov 2015, at 11:07, Robert Onslow <robert.ons...@gmail.com> wrote: >>>> >>>> Delete the directory called felix-cache?? >>> >>> No, in his second email he says that other bundles are still running that >>> use the old API. So we’re talking about a series of changes made in a >>> running OSGi Framework, and it wouldn’t be a good idea to delete the >>> storage directory underneath a running framework. >>> >>> These changes *should* work. Best guess is that the implementation bundle >>> ships its own copy of the API bundle. >>> >>> As a general rule, you should do a refresh after a series of changes to >>> bundle states (installs, uninstalls or updates). You can do this simply >>> with the “refresh” command in the Gogo shell. In this scenario, a refresh >>> would cause all the bundles that import from the API bundle to stop and >>> revert to INSTALLED state. >>> >>> Regards, >>> Neil >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org >> For additional commands, e-mail: users-h...@felix.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > <mailto:users-unsubscr...@felix.apache.org> > For additional commands, e-mail: users-h...@felix.apache.org > <mailto:users-h...@felix.apache.org>