Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 543E273D1 for ; Mon, 29 Aug 2011 06:56:21 +0000 (UTC) Received: (qmail 39075 invoked by uid 500); 29 Aug 2011 06:56:19 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 38532 invoked by uid 500); 29 Aug 2011 06:56:04 -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 38515 invoked by uid 99); 29 Aug 2011 06:56:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2011 06:56:02 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2011 06:55:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4C062D50A2 for ; Mon, 29 Aug 2011 06:55:39 +0000 (UTC) Date: Mon, 29 Aug 2011 06:55:39 +0000 (UTC) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Message-ID: <6843897.2345.1314600939307.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <822732591.20490.1314427409053.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (FELIX-3089) A component without ServicePermissions cannot be registered as a service MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-3089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092666#comment-13092666 ] Felix Meschberger commented on FELIX-3089: ------------------------------------------ Agreed. I think this is this piece of code verifying dependencies: if ( !dm.hasGetPermission() ) { // bundle has no service get permission ** satisfied = false; } else if ( !dm.isSatisfied() ) { // bundle would have permission but there are not enough services satisfied = false; } At ** we should probably assume satisfaction if the reference is optional. > A component without ServicePermissions cannot be registered as a service > ------------------------------------------------------------------------ > > Key: FELIX-3089 > URL: https://issues.apache.org/jira/browse/FELIX-3089 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) > Affects Versions: scr-1.6.0 > Reporter: Yasuhiro Kawame > > Given the following Component XML > > > > bind="bind" > unbind="unbind" > policy="dynamic" > cardinality="0..1" > interface="ServiceProvider" > /> > > > > > When this component's bundle does not have ServicePermission[ServiceProvider , GET], Binding is not registered as a service. > But I think that Binding can be registered. > Because the component's reference specifies optional cardinality. > (see OSGi Compendium R4.2 > 112.3.2 Reference Cardinality, 112.9.1 Service Permissions) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira