I thought eclipse already had
declarative services what about these?
Extension Registry (org.eclipse.equinox.registry) status:green
The Eclipse extension registry allows bundles to communicate and cooperate
using declarative markup and lazy instantiation. The extension mechanism is
similar to OSGi services and declarative services but has some different
contractual and management characteristics.
Declarative Services (org.eclipse.equinox.ds) status:red
An implementation of the OSGi R4 Declarative Services specification. This
service simplifies the task of authoring OSGi services by performing the work
of registering the service and handling service dependencies. This minimizes
the amount of code a programmer has to write; it also allows service components
to be loaded only when they are needed.
Glenn Everitt
From: corona-dev-bounces@xxxxxxxxxxx
[mailto:corona-dev-bounces@xxxxxxxxxxx]
On Behalf Of Marcin Okraszewski
Sent: Friday, December 01, 2006
8:26 AM
To: Corona
development
Subject: [corona-dev] Automatic /
declarative bundles start.
We have some problems with starting required plugins
that have indirect relationships. Currently we have the starting sequence
hardcoded, which is not a desired solution. We would like to do it more
decleratively.
I did a plugin which listens to boundle events and if a new bundle starts, it
checks its MANIFEST.MF for X-Require-Started header, which contains the plugins
to start. There is one disadvantage of this approach - you need to start this
bundle before other boundles, so it requires change in config.ini. But then
everything magicly runs.
The plugin is commited to Eclipse CVS in incubator. Plugin name is
org.eclipse.corona.bundlestarter. There are 3 bundles which use this approach,
just to test it - org.eclipse.corona.tests.bundlestarter.b[1-3]. There is also
an OSGi launch configuration "Bundle Starter". To check how it works,
run the "Bundle Starter" launch. In console type:
1. ss
2. start org.eclipse.corona.tests.bundlestarter.b1
3. ss
You will see that plugins b1-b3 are started, eventhough there are no
dependenticies between them. The real start order will be b3,b2,b1. If you
would start b2, then b2 and b3 would be active, and b1 kept as is.
Note: for some reason the lounch sometimes stars all bundles, eventhough the
b1-b3 are marked to be not started. I found that it helps if you start the OSGi
configuration from run window rather than recently started configurations.
What do you think about this? Should we
switch to this approach?
I would then polish it and add also the reversed dependency - "start me,
when some other bundle starts" rather than current "start some
bundles when I start".
Marcin
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose it
to anyone else. If you received it in error please notify us immediately and
then destroy it.
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.