[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [corona-dev] Automatic / declarative bundles start.
|
Does it solve all use cases?
The reason why I came out with it was the proxy bundle. I want it to
start before org.eclipse.corona.soa.client.axis2. There is no OSGi
service dependeticies between them. Additionally I don't want to store
any reference to proxy bundle in org.eclipse.corona.soa.client.axis2.
How would I do it with DS?
Marcin
Everitt, Glenn napisaĆ(a):
*I thought eclipse already had declarative services what about these?*
* *
*Extension Registry (org.eclipse.equinox.registry
<http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox.registry>)*
status:green <http://www.eclipse.org/equinox/bundles/#legend>
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
<http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox.ds>)*
status:red <http://www.eclipse.org/equinox/bundles/#legend>
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.
------------------------------------------------------------------------
_______________________________________________
corona-dev mailing list
corona-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/corona-dev
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.