OSGi fragment update versus bundle update?

303 views Asked by At

Just wondering is there any significant difference between OSGi fragment update versus the bundle update?

When a fragment bundle is updated, should we call FrameworkWiring.refreshBundles method on the updated fragment or on its parent bundle?

can you point me to some tutorial/example that develop osgi application using fragments?

1

There are 1 answers

0
BJ Hargrave On

You need to refresh the host bundle since it is the host bundle's class loader which is loading from the fragment. A fragment could be attached to multiple hosts.

In general, you should not be using fragments unless you have a specific use case which cannot be addressed in a more conventional way.