On 5/10/17 08:16 , Alex Sviridov wrote:
Hi all
I use Apache Felix 5.4.0 and I have two bundles: bundleA and bundleB. BundleB
depends on bundleA.
I update bundleA and after that run the following code to do osgi refresh:
Bundle systemBundle = bcx . getBundle ( 0 );
FrameworkWiring frameworkWiring = systemBundle . adapt ( FrameworkWiring .
class );
frameworkWiring . refreshBundles ( null );
(from here http://stackoverflow.com/a/23361835/5057736 )
This code does the following: it stops and starts bundleA and stops and starts
bundleB.
But why bundleA? I am asking because in result bundleA is two times updated. Is
this a bug or what?
The first stop/start is when you do the update, the second is when you
do the refresh. The former is historical, since that is the way update()
was defined in the first version of the spec (I believe). Later versions
of the spec where refreshing was introduced didn't change this behavior
for backward compatibility reasons.
If refresh were there from the beginning, then it would have likely been
better to have update() simply prepare the updated version and refresh
enact it.
-> richard
Best regards, Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org