On 06.04.11 13:30, "Gay David (Annecy)" <[email protected]> wrote:
>Hi Clement, > >Thanks for your analysis. >I've discovered yesterday that the problem was related to the service >property value that is String instead of an Integer (if I'm not wrong). >That's why the comparator don't work, because it expected Integer value. Right this was the issue. The service reference comparator expect Integer (it's the spec). > >Anyway, I will check your fix ASAP and confirm you. Thanks ! Regards, Clement > >Thanks again and regards. >David > > >-----Message d'origine----- >De : Clement Escoffier [mailto:[email protected]] >Envoyé : mardi 5 avril 2011 22:02 >À : Apache Felix - Users Mailing List >Objet : Re: iPojo, service.ranking and dynamic-priority > >Hi, > >There is a bug when adding a service property using propagation: >https://issues.apache.org/jira/browse/FELIX-2902 > >I've committed a fix, but I need to add some test cases (just tested on >your application). Please check using the trunk version. > >Regards, > >Clement > >On 05.04.11 11:41, "DavidGay" <[email protected]> wrote: > >> >>(NOTE : I repost this message, because it seems to be block. I don't see >>it >>on mail-archive.com. I'm really sorry if you receive this twice.) >> >>Hi all, >> >>I¹m trying to use the service ranking with iPojo. >> >>As far as I understand, if I provide a service property >>³service.ranking², >>iPojo will inject to consumers the ³best² service with the highest value >>at >>the time I required a service. >> >>Even more, if I put @Requires( policy=²dynamic-priority²), I understand >>that >>iPojo will dynamically inject me the ³best² service found every time. >> >>I made a little test to check this behavior, but I was unable to make it >>works. >>If you install my test bundle in Felix, type in console : >> >>-> foo-create 3 >>* BIND FooService >>* VALIDATE Consumer >>Create foo service with a ranking level of '3' >> >>-> foo-consume >>Consuming foo : foo service with rank 3 >> >>-> foo-create 54 >>Create foo service with a ranking level of '54' >> >>-> foo-consume >>Consuming foo : foo service with rank 3 >> >>I expect iPojo to inject me the ³best² service (service.ranking=54) in >>this >>case inside my consumer. But it¹s not the case, the consumer still use >>the >>first created consumer. >> >>Is it the normal behavior ? >>Is my code wrong somewhere ? >>Did I misunderstood dynamic-policy behavior ? >> >>Thanks for any helps >>PS : I¹ve tested with iPojo 1.8.0 & Felix 3.2.0 with Java 1.6.0_23-b05 / >>Win >>XP >> >>Regards >>David G. >> >>http://old.nabble.com/file/p31322443/ipojo.service.rank.test.zip >>ipojo.service.rank.test.zip >> >>-- >>View this message in context: >>http://old.nabble.com/iPojo%2C-service.ranking-and-dynamic-priority-tp313 >>2 >>2443p31322443.html >>Sent from the Apache Felix - Users mailing list archive at Nabble.com. >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [email protected] >>For additional commands, e-mail: [email protected] >> > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [email protected] >For additional commands, e-mail: [email protected] > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [email protected] >For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

