Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 51019 invoked from network); 26 Oct 2009 22:11:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Oct 2009 22:11:23 -0000 Received: (qmail 52346 invoked by uid 500); 26 Oct 2009 22:11:23 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 52238 invoked by uid 500); 26 Oct 2009 22:11:23 -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 51991 invoked by uid 99); 26 Oct 2009 22:11:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 22:11:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 22:11:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6AC3D234C046 for ; Mon, 26 Oct 2009 15:10:59 -0700 (PDT) Message-ID: <222821384.1256595059436.JavaMail.jira@brutus> Date: Mon, 26 Oct 2009 22:10:59 +0000 (UTC) From: "Richard S. Hall (JIRA)" To: dev@felix.apache.org Subject: [jira] Updated: (FELIX-1754) Usage of BundleContext.getServiceReferences results in failure to activate components In-Reply-To: <1434368419.1255469851360.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard S. Hall updated FELIX-1754: ----------------------------------- Attachment: FELIX-1754.txt > Usage of BundleContext.getServiceReferences results in failure to activate components > ------------------------------------------------------------------------------------- > > Key: FELIX-1754 > URL: https://issues.apache.org/jira/browse/FELIX-1754 > Project: Felix > Issue Type: Bug > Components: Framework > Affects Versions: felix-2.0.1 > Reporter: Matthew Sykes > Priority: Minor > Fix For: felix-2.2.0 > > Attachments: assignable.diff, FELIX-1754.txt > > > I'm attempting to move some code from Equinox to Felix that makes use of the declarative services 1.1 runtime. Many of the components in our bundles declare multiple 'provide' elements in the service declaration . In general these services consist of a standardized interface in one package and extensions to that interface in another. Depending on the requirements of the code using the component, other bundles will declare their components with references to either the standardized interface or the extended interface. > The issue I'm seeing is that the Felix SCR fails to activate some components because it's failing to resolve references to the service provided by another component. It turns out that the SCR is using BundleContext.getServiceReferences instead of BundleContext.getAllServiceReferences to locate candidate services when resolving references. Unfortunately, the getServiceReference flavor requires that the using bundle have access to all class names under which the target service was registered - not just the interface associated with the reference. > Given the use-case I've described and the behavior of Equinox, I believe the Felix SCR should be using BundleContext.getAllServiceReferences(..) to resolve references and rely on the bundle creator to define the correct imports. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.