Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 29043 invoked from network); 25 May 2009 06:11:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 May 2009 06:11:08 -0000 Received: (qmail 41280 invoked by uid 500); 25 May 2009 06:11:20 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 41216 invoked by uid 500); 25 May 2009 06:11:20 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 41206 invoked by uid 99); 25 May 2009 06:11:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 06:11:20 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mcculls@gmail.com designates 209.85.200.172 as permitted sender) Received: from [209.85.200.172] (HELO wf-out-1314.google.com) (209.85.200.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 06:11:12 +0000 Received: by wf-out-1314.google.com with SMTP id 23so951807wfg.16 for ; Sun, 24 May 2009 23:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=J59zL/pNcQPO6SAdWEAvwzxFHcxrNL7EVDlqbl89NMQ=; b=Lymww7AhYEUq0M+NSA6VJnrRgiSpd9nnk+SAeDXpBbRSsn39z1ZeJRC1gFOo3vDmFn AFw9FP8aNXnYhaRPL753H4M8qhfN6qP1AAaIGN0D/yPnIVxP2EXCRJTN4raN5ssLoLob zfHaS8/CtI2MAS34G7Ak/miZf8LMkk8gyFhjg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=j/IwSbT43307iojFwTdB1TdK0Ct8PR8oMKDtk9bb1+3VH6yqQnWioGNZ7his6ZPOrP AJVk1sw2p/jw/vlRA9Lyzd9oJeVWhk60ZW+3hG3o5mlS5LmMzmCYkhkFVrbYl0GxZaJR Bp7P/WwiA8VLI1NAsTtxiNCpPCNu/shNe1+lQ= MIME-Version: 1.0 Received: by 10.142.14.18 with SMTP id 18mr2138020wfn.304.1243231852163; Sun, 24 May 2009 23:10:52 -0700 (PDT) In-Reply-To: <4A1A195D.3090008@gmail.com> References: <4A1A195D.3090008@gmail.com> Date: Mon, 25 May 2009 14:10:52 +0800 Message-ID: <81f0d9c0905242310m215e6e33ia1e0f3be5ec5f147@mail.gmail.com> Subject: Re: Service Rankings From: Stuart McCulloch To: dev@felix.apache.org Content-Type: multipart/alternative; boundary=000e0cd1776aebf42f046ab678a5 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd1776aebf42f046ab678a5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2009/5/25 Jo=E3o Ferreira > Hi > > I think i found a bug with service rankings since the comparator method > of service reference isn't being called. I placed a breakpoint in the > method and got no stop. you'll need to provide more details like which version of Felix you're usin= g and where you're setting the breakpoint (in trunk the ServiceReference.compareT= o implementation is actually in ServiceRegistrationImpl.java:452) also it depends how you're getting the service - if you use the bundle context method "getServiceReference(String clazz)" this definitely uses compareTo - see the "getBestServiceReference" utility method in BundleContextImpl:271 but if you're using a high-level framework like iPOJO then it might be usin= g its own implementation of the ranking algorithm to sort services (the compareTo method in ServiceReference only appeared in r4.1 of the OSGi spec, before that the service ordering was defined in the spec but there was no compareT= o method defined in the ServiceReference interface) Could someone confirm this? I'm creating the services with ipojo but i > dont think thats the prob since the services have the service.ranking > property set. > > Thanks > Jo=E3o Ferreira > --=20 Cheers, Stuart --000e0cd1776aebf42f046ab678a5--