Hi all,
R4.2 Core Spec "6.1.4.35 public void uninstall( )" says:
--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---
Postconditions, when an exception is thrown
- getState() not in { UNINSTALLED }.
- This Bundle has not been uninstalled.
--end quote---
It seems umbiguous that the step 3,4 and 5 will be done if
this bundle's state was ACTIVE, STARTING or STOPPING and Bundle.stop
throws an exception (FrameworkEvent is fired).
My understanding is :
- step 3,4 and 5 will be done even if the Bundle.stop() throws an exception.
Therefore, bundle state will be UNINSTALLED.
- If Bundle.uninstall() throws an exception (BundleException,
IllegalStateException, or SecurityException), the bundle state will be
not UNINSTALLED (except if precondition is alread UNINSTALLED and
IllegalStateException is thrown).
Is my understanding correct ?
Best regards,
=======
Ikuo YAMASAKI
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev