You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Guo Du <mr...@gmail.com> on 2010/04/08 11:38:10 UTC

Re: does felix support some trigger mechanism while install/uninstall bundles?

On Thu, Apr 8, 2010 at 4:30 AM, ext2 <xu...@tongtech.com> wrote:
> I known, I should write a bundle act as a admin role to inspect for these
> special application bundles, when these special application bundles
> installed /uninstalled, the admin bundle should prepare or clean up
You need ensure admin bundle started before application bundles.

> But I still has following questions: if I write a application bundle, only
> the bundle itself knows how to prepare and clean-up environment; But the
Then you should do it in org.osgi.framework.BundleActivator



>        The osgi framework does support install/uninstall event, but how to
> use this event ? I need to register the listener in the special bundle, but
> before the bundle started I couldn't register any listener.
You may register a org.osgi.framework.BundleListener in your admin
bundle and register by:
framework.getBundleContext().addBundleListener(bunldeEventListener).

-Guo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org