[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.technology.equinox] Re: Plugins - singletons or not?

Yes. your recap is correct.

A refresh is not a framework restart (though it might be implemented as such for simple minded implementers). The parameter to the refresh is a set of bundles. The implementation is supposed to calculate the closure of all dependent bundles and restart those. So -at least- the affected bundles should be stopped and started again (which effectively creates a new ClassLoader for each). Good implementations minize the set of affected bundles though this is not a trivial calculation.

Kind regards,

	Peter Kriens


Jeff McAffer wrote:

Just to recap then.
"eager" = restart all dependents when a prereq changes
"lazy" = wait until an explicit framework restart/refresh to hook the new
packages into the global namespace.
Is this close?  Assuming it is,

What happens during the refresh?  Is this effectively a framework restart
where everything is shutdown and restarted?  If not, how do the dependents
of some updated bundle know to drop their references to old classes and get
new ones?

Jeff

"pkriens" <Peter.Kriens@xxxxxxxx> wrote in message
news:3E893936.8000104@xxxxxxxxxxx

Jeff McAffer wrote:


In OSGi (at least some older versions) the old bundle (B) would stay

around

until the framework was restarted or all dependent bundles were shutdown

and

restarted.  Is this still the state of the art in OSGi?

In release 1 some frameworks refreshed "eagerly", restarting any
dependent bundles, other frameworks left the packages lying around and
resolved the problem lazy. In release 2 we mandate the lazy approach but
provide a special service, the PackageAdmin service that allows the
Management Agent to initiate a refresh (and expose the current status of
package sharing). The refresh can do a global refresh or for a set of
bundles.

The idea behind this is that a management agent can install several
bundles before it refreshes saving time and some error scenarios.

BTW, what stayed around were exported packages not the bundle.

Kind regards,

Peter Kriens



Jeff