Hi, 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 ? No that should work as you described it. I will have a look. Regards, Clement > >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-tp3132 >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]

