You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by cniehues <ch...@its-telco.de> on 2016/01/18 12:00:36 UTC
How to set service ranking with aries-blueprint-plugin
Hello,
I use the aries-blueprint-plugin to generate my blueprint.xml and want to
know how to set the ranking for my services. I noticed that the
OsgiServiceProvider annotation has a ranking property in current version but
the aries-blueprint-plugin uses an older version so it's not supported by
now.
I saw an example using
/@Properties(@Property(name = "service.ranking", value = "10"))/
but that seems not to work. Is that the right way to do it?
Greetings
Christian
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-set-service-ranking-with-aries-blueprint-plugin-tp4044891.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to set service ranking with aries-blueprint-plugin
Posted by cniehues <ch...@its-telco.de>.
I thought I could solve with problem with the starting level so that the
custom implementation always has a lower starting level than the default
implementation. I know that I have to restart the client bundle and that
it's not very comfortable but anyway it's a solution at all for my example.
But a configurable dynamic solution certainly would be a much better
solution.
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-set-service-ranking-with-aries-blueprint-plugin-tp4044891p4044896.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to set service ranking with aries-blueprint-plugin
Posted by Christian Schneider <ch...@die-schneider.net>.
The ranking concept is fine. The problem is just that if only the lower
rank service was present when the client starts then it will stick with it.
You can already restart the client bundle to make it switch but this is
pretty inconvenient.
So we need to implement the dynamic rebinding to a higher ranked service.
In fact there is already an issue for that:
https://issues.apache.org/jira/browse/ARIES-1314
I just did not get to it till now.
Christian
On 18.01.2016 12:55, cniehues wrote:
> Thanks for the info. I already know about this behavior. My intention was to
> provide a customer specific service implementation with a higher rank
> without changing/stopping the default implementation from an installed
> feature.
>
> Let's say there is a bundle in my product providing implementation for 5
> different services. If I want to provide a custom implementation for one of
> the services how should I do this without ranking?
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-set-service-ranking-with-aries-blueprint-plugin-tp4044891p4044894.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
Re: How to set service ranking with aries-blueprint-plugin
Posted by cniehues <ch...@its-telco.de>.
Thanks for the info. I already know about this behavior. My intention was to
provide a customer specific service implementation with a higher rank
without changing/stopping the default implementation from an installed
feature.
Let's say there is a bundle in my product providing implementation for 5
different services. If I want to provide a custom implementation for one of
the services how should I do this without ranking?
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-set-service-ranking-with-aries-blueprint-plugin-tp4044891p4044894.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to set service ranking with aries-blueprint-plugin
Posted by Christian Schneider <ch...@die-schneider.net>.
Currently there is no way to set the service ranking using the blueprint
maven plugin.
You can create an issue to track this enhancement.
Btw. service ranking is currently less useful in blueprint in general
than you might think.
Once a blueprint bundle has bound a service it will not switch to a
higher ranked one if it appears.
Christian
On 18.01.2016 12:00, cniehues wrote:
> Hello,
>
> I use the aries-blueprint-plugin to generate my blueprint.xml and want to
> know how to set the ranking for my services. I noticed that the
> OsgiServiceProvider annotation has a ranking property in current version but
> the aries-blueprint-plugin uses an older version so it's not supported by
> now.
>
> I saw an example using
> /@Properties(@Property(name = "service.ranking", value = "10"))/
> but that seems not to work. Is that the right way to do it?
>
> Greetings
> Christian
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-set-service-ranking-with-aries-blueprint-plugin-tp4044891.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com