No. If stop completes with an exception, uninstall can still proceed. Uninstall can fail if the state change lock is held by another thread and that thread does not release the lock in some reasonable time. --
BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [email protected] office: +1 386 848 1781 mobile: +1 386 848 3788 From: Ikuo Yamasaki <[email protected]> To: OSGi Developer Mail List <[email protected]> Date: 2011/05/26 18:11 Subject: Re: [osgi-dev] Q on Bundle#uninstall() Sent by: [email protected] Hi all I have an additional question on Bundle#uninstall(). --begin quote--- The following steps are required to uninstall a bundle: 1 If this bundle’s state is UNINSTALLED then an IllegalStateException is thrown. 2 If this bundle’s state is ACTIVE, STARTING or STOPPING, this bundle is stopped as described in the Bundle.stop method. If Bundle.stop throws an exception, a Framework event of type FrameworkEvent.ERROR is fired containing the exception. 3 This bundle’s state is set to UNINSTALLED. 4 A bundle event of type BundleEvent.UNINSTALLED is fired. 5 This bundle and any persistent storage area provided for this bundle by the Framework are removed. --end quote--- --begin quote--- Throws BundleException If the uninstall failed. This can occur if another thread is attempting to change this bundle’s state and does not complete in a timely manner. --end quote--- Q. If this bundle's state was ACTIVE, STARTING or STOPPING and Bundle.stop throws an exception (FrameworkEvent is fired), will Bundle.uninstall() throw BundleException which wraps the exception thrown by Bundle.stop (), or not? Best regards, ======= Ikuo YAMASAKI _______________________________________________ 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
