Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How are dependencies handled in unload/reload events?
How are dependencies handled in unload/reload events? [message #11974] Mon, 10 March 2003 03:11 Go to next message
Eclipse UserFriend
Originally posted by: kduffey.marketron.com

Hi,

I am curious if OSGi supports this ability to allow a plugin to be unloaded,
and/or reloaded at runtime without restarting the app? If so, how do
dependencies get handled? Does the engine inform all dependencies to also be
deactivated, clean up any refs, etc? If the plugin contributes UI elements,
do they all get removed and the UI repainted? I am interested in how this
mechanism actually works.

Thanks.
Re: How are dependencies handled in unload/reload events? [message #12000 is a reply to message #11974] Mon, 10 March 2003 07:12 Go to previous message
Eclipse UserFriend
Originally posted by: Peter.Kriens.aQute.se

The OSGi can update bundles because the framework can track the
dependencies between bundles. Dependency is on package level and through
the service registry. Communication between bundles is always
established through the registry. Each of these dependencies can be
introspected and sends out notification to interested parties.

So in this case the Eclipse UI has to listen to the appropriate OSGi
events and clean up the UI when bundles get uninstalled or updated.
There is (obviously :-) no free lunch here.

The service registry plays a key role in this dependency managements. A
special support class makes it trivial to track a certain (type of)
service in the registry and apply actions on the coming, leaving or
property changes. The service registry very much like a blackboard
(whiteboard?). Objects are registered under a set of class/interface
names + a set of properties. All registrations, property modifications,
and unregistrations are signalled through a service event listener.

My proposal would be to investigate if the dynamic plugins could
leverage this registry to establish the communication between Eclipse
and/or among themeselves. The registry creates a clear communication
point and minimizes the (large) package sharing that is associated with
Class.forName.

There is a caveat. Bundles can hang on to objects that should have been
gc'd, i.e. bundles that do not play by the rules.




Kevin wrote:

> Hi,
>
> I am curious if OSGi supports this ability to allow a plugin to be unloaded,
> and/or reloaded at runtime without restarting the app? If so, how do
> dependencies get handled? Does the engine inform all dependencies to also be
> deactivated, clean up any refs, etc? If the plugin contributes UI elements,
> do they all get removed and the UI repainted? I am interested in how this
> mechanism actually works.
>
> Thanks.
>
>
>
>
Previous Topic:Avalon
Next Topic:Additional plugin model considerations
Goto Forum:
  


Current Time: Sun May 05 14:53:53 GMT 2024

Powered by FUDForum. Page generated in 0.03271 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top