How to safely disable a bundle [message #489987] |
Tue, 06 October 2009 18:34 |
Andrew Eisenberg Messages: 382 Registered: July 2009 |
Senior Member |
|
|
I would like to know the safest way to let users switch between two versions of a bundle. Neither bundle is a singleton, but typically, users will only want one of them running at a time.
To be more specific, in Eclipse, I have a preference page that allows users to switch. When clicking a button, the active bundle is stopped and disabled (by adding a DisabledInfo to the SystemState), and the inactive bundle is enabled and started. Next, PackageAdmin.refreshPackages() is called on these bundles. And a restart occurs immediately after that.
The problem is that by doing the refresh, all the other plugins that depend on the compiler plugin also shut down and restart. This causes many exceptions to be raised in the error log (eg- "Error notifying registry change listener").
Is there some way that I can schedule the disabling of a bundle (and refreshing its packages) to occur on restart, rather than immediately? Or is there someway that I can avoid throwing these exceptions?
thanks,
--andrew
|
|
|
Powered by
FUDForum. Page generated in 0.02913 seconds