Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 697B6173F5 for ; Thu, 5 Feb 2015 16:15:30 +0000 (UTC) Received: (qmail 11955 invoked by uid 500); 5 Feb 2015 16:15:29 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 11900 invoked by uid 500); 5 Feb 2015 16:15:29 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 11884 invoked by uid 99); 5 Feb 2015 16:15:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2015 16:15:29 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pawel.pogorzelski1@gmail.com designates 209.85.214.179 as permitted sender) Received: from [209.85.214.179] (HELO mail-ob0-f179.google.com) (209.85.214.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2015 16:15:24 +0000 Received: by mail-ob0-f179.google.com with SMTP id wp4so7837813obc.10 for ; Thu, 05 Feb 2015 08:15:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Ot3MbZwJBychZtTML7qXF82OQB6iWSM0HXxdgg8N1HM=; b=eutHtRF8MYNpLYi6fEWfsOV4ZKk3Y7E3+jxiVshR0sEf8xv4lVxZ1eoM1K2n0tJnnV DMtccI1r/YwfDrxM3w9mSeSrsbQOOknTvKmYNRvYEm3/EkyA6X1/9x/JUoSrlrQL+aFj qlGjFakFxKwzKQf3AhRbhpV0CRsm6nBstx96ig0nruURDVr4Fjzkjp3UJmaUl0o3RnxN TCzY8lBa9PttJstUNz0ndg1zwTd3nCO1BzN09LNrpXQcW183Lq8Lns2dYbJyqO+cNg6L 4UJf7avA7MtmXRXclyNvrIrKRXQo4/P07+3wyjHiox3QXNm0i695KBpOXrDiOavn5CIV KGew== MIME-Version: 1.0 X-Received: by 10.182.215.163 with SMTP id oj3mr2864498obc.49.1423152904472; Thu, 05 Feb 2015 08:15:04 -0800 (PST) Received: by 10.76.80.100 with HTTP; Thu, 5 Feb 2015 08:15:04 -0800 (PST) In-Reply-To: <54D39425.9050801@hupie.com> References: <54D39425.9050801@hupie.com> Date: Thu, 5 Feb 2015 17:15:04 +0100 Message-ID: Subject: Re: OSGi Declarative Services dependency on a generic supertype From: Pawel Pogorzelski To: users@felix.apache.org Content-Type: multipart/alternative; boundary=001a11c2c2ce550ec2050e599b2b X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2c2ce550ec2050e599b2b Content-Type: text/plain; charset=UTF-8 Thanks Ferry, it indeed works. Is there any way of doing it without specifying all the object supertypes during the registration? Maybe using Felix SCR annotations instead of OSGi ones? Cheers, Pawel On Thu, Feb 5, 2015 at 5:02 PM, Ferry Huberts wrote: > > > On 05/02/15 16:59, Pawel Pogorzelski wrote: > >> Guys, >> I have a generic interface IRepository extended by IAppleRepository, >> IOrangeRepository and so on. Concrete implementations like AppleRepository >> are registered in the container with non-generic interfaces like >> IAppleRepository. Is it possible to tell DS engine I need every service >> sublassing IRepository? Corresponding line in my component.xml looks like >> follows: >> >> > interface="com.Whatever.IRepository" bind="addRepository" >> unbind="removeRepository"/> >> >> but it doesn't work. I'm on Felix 4.4.1. >> > > > Then the bundles don't advertise the IRepository interface but their > subclass(es). > > Make the bundles advertise IRepository and it'll work. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org > For additional commands, e-mail: users-help@felix.apache.org > > --001a11c2c2ce550ec2050e599b2b--