You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by ext2 <xu...@tongtech.com> on 2010/04/08 05:02:15 UTC

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

Hi:
   Does anyone know the felix  has some extension trigger while install and
uninstall bundle? Thus I could use the extension trigger to write some
custom code to prepare some environment for the bundle to execute and clean
the environment  while the bundle is un-installed;
	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. 

Thanks for any suggestion



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


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

Posted by Guo Du <mr...@gmail.com>.
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


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

Posted by ext2 <xu...@tongtech.com>.
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
environment for these 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
admin-bundle can only receive event after the application bundle
un-installed, so the admin-bundle couldn't tell the application bundle to
clean-up the environment. 

So does felix has some mechanism to notify the event just before bundle
un-installed? 

=======================================================================
Hi:
   Does anyone know the felix  has some extension trigger while install and
uninstall bundle? Thus I could use the extension trigger to write some
custom code to prepare some environment for the bundle to execute and clean
the environment  while the bundle is un-installed;
	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. 

Thanks for any suggestion



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




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