[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Re: Autostarting required plugins

Hi Jeff,

I want to put my plug in for a 'better' start dependency model.

The trend I've seen in some of the implementations is to use variations on
a 'run-level' type of mechanism to control the start order.  Ultimately,
that boils down to: each bundle is given a number and that determines the
start order.

The problem with this sort of model is that it assumes that you know the
start level number of your dependencies so you make sure you put your
number so that it follows theirs.  That is, of course, fragile if, for some
reason your dependencies need to later adjust their own start levels
because of some dependency that they have!

It would be much better to use a method where we recognize that start order
dependencies need to be declared symbolically just like runtime
dependencies.  In the manifest, and using bundle symbolic names.

In other words, I propose that if we do anything at all in the space of
standardizing start order,  that we create a manifest header for declaring
the start-order dependencies.   The header simply lists those bundles that
this bundle KNOWS it must follow in the start order.

Bundle-StartFollows : <bundle id> [, <bundle id> [, ...]]

At launch time,  a 'Start Order Resolver' simply scans these values and
resolves the start order.   This order can be cached and reused if there is
no change to the configuration.   This order of course, is not applicable
to lazy (classload-initiated) starting.



Jeff McAffer <Jeff_McAffer@xxxxxxxxxx> wrote on 02/14/2006 01:50:07 AM:
> Your summary of the situation is quite accurate.  One thing that I will
> point out however is that this is really an OSGi thing not an
> Eclipse/Equinox thing.  OSGi explicitly stays out of defining how/when
> bundles are started.  This is great from a spec point of view as it is
> much more flexible.  Its a bit of a bummer from a consumer point of view
> since each framework implmentation does things differently.  Some
> frameworks, for example, have been known to aggressively start all
> when they are installed.  Other folks have implemented something like you

> suggest and have someone that starts bundles for them according to
> whatever policy they want.
> We have talked about a couple ideas that might help with using update
> manager and getting bundles started at install time but are focused on M5

> right now and have not implemented anything.