On Thu, Apr 8, 2010 at 4:30 AM, ext2 <x...@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-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org