Hi,

The bundle usage counting is required for a simple feature start and stop 
functionality.
If a bundle is used by multiple features I need a count to know when to install and start a bundle and when features are stopped to detect when to stop and or uninstall a bundle.

Paul

On 15/06/2016 8:00 PM, Neil Bartlett wrote:
Depends what you mean by "bundle usage".

If you’re talking about services, then you can get the ServiceReferences 
registered by a bundle and count the using bundles with getUsingBundles. If 
you’re talking about package wiring and Require-Bundle then you can adapt the 
bundle to a BundleWiring object and call getProvidedWires. Bear in mind that 
there will be duplicates and the bundle could also wire to itself (or reference 
its own services).

Neil

On 15 Jun 2016, at 10:53, Paul F Fraser <[email protected]> wrote:

Hi,

Is there an existing ability in the OSGi environment to keep a bundle usage 
count?

It is not difficult to create my own method and storage, but if something 
already exists!

I did think I could use the Bundle data area but it seems that different 
frameworks lay it out differently.

Aries subsystems has bundle counting but it is a bit heavy for my use case.

Any suggestions?

Regards

Paul Fraser


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to