Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing a fragment requires a refresh on the host, how can this be avoided?

I have two bundles: bundle A and bundle B which is configured as a fragment of bundle A using: Fragment-Host:

Whenever I install bundle B it fails to start (INSTALLED) and therefore to attach itseld to bundle A.

At this point when I check bundle A's status I see that it still doesn't recognize bundle B as its fragment.

If I do refresh bundle A it solves the problem - bundle B switches to RESOLVED and is able to attach itself to bundle A, bundle A recognizes bundle B as its fragment and everything is working as expected.

My question is how this refresh can be avoided, i.e. as soon as bundle B is installed it should attach itself to its host which is already ACTIVE.

Thank you.

like image 351
Joly Avatar asked Sep 02 '11 09:09

Joly


1 Answers

You cannot do that without a refresh, and it's in the OSGI specs too - to properly attach a fragment bundle, a transition from INSTALLED to RESOLVED of the host bundle is necessary. See section 3.14 of the 4.3 OSGi Core Specification.

like image 89
Tassos Bassoukos Avatar answered Sep 17 '22 22:09

Tassos Bassoukos