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 C947C10A7C for ; Tue, 20 Jan 2015 15:09:10 +0000 (UTC) Received: (qmail 14584 invoked by uid 500); 20 Jan 2015 15:09:10 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 14526 invoked by uid 500); 20 Jan 2015 15:09:10 -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 14515 invoked by uid 99); 20 Jan 2015 15:09:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jan 2015 15:09:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of az@develdynamic.com designates 62.141.41.71 as permitted sender) Received: from [62.141.41.71] (HELO mail.develdynamic.com) (62.141.41.71) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 20 Jan 2015 15:08:44 +0000 Received: from [192.168.35.130] (nctd.adsl.kis.ru [89.189.4.82]) by mail.develdynamic.com ; Tue, 20 Jan 2015 16:08:26 +0100 Message-ID: <54BE6F65.6090105@develdynamic.com> Date: Tue, 20 Jan 2015 18:08:21 +0300 From: Artem Zhirkov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: users@felix.apache.org Subject: Re: Getting a reference to a declarative service References: <54BE339F.9030500@develdynamic.com> <4F501081-17DC-49CF-9058-3113642B06A9@netcentric.biz> <88DEECE6-846B-46C5-B0C6-18F1FDD56FEE@gmail.com> In-Reply-To: <88DEECE6-846B-46C5-B0C6-18F1FDD56FEE@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Neil, bundle is active, but I dont have any DS implementation bundle installed...I thought the framework itself contains the implementation. On 01/20/2015 03:19 PM, Neil Bartlett wrote: > Dirk: I don’t think Artem was asking about activation of the component, he has a problem with service registration. So whether the component is immediate or delayed seems to be irrelevant. > > Artem: there are a few things you need to check. Is your bundle active? Do you have a DS implementation bundle (such as org.apache.felix.scr, or org.eclipse.equinox.ds) installed and active? > > Regards, > Neil > > >> On 20 Jan 2015, at 11:09, Dirk Rudolph wrote: >> >> Try to add immediate=“true” to your component definition. This should result in something like >> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> and causes the component to be started immediately after it has been registered. >> >> Kind regards, >> Dirk Rudolph | Senior Software Engineer >> >> Netcentric AG >> >> M: +41 79 642 37 11 >> D: +49 174 966 84 34 >> >> dirk.rudolph@netcentric.biz | www.netcentric.biz >>> On 20 Jan 2015, at 11:53, Artem Zhirkov wrote: >>> >>> Hello, >>> >>> I want to include more than one service into a bundle, so it seems like I have to make a use of declarative services. >>> >>> I'm building a test bundle with maven + maven-bundle-plugin and generating the ds descriptor with maven-scr-plugin, so it looks like this: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> After installing the test bundle into my osgi container I'm trying to get a list of all services in the test bundle by calling bundle.getRegisteredServices(), but it'd always return null. >>> >>> What I'm doing wrong? Maybe I should use ServiceTracker to obtain a reference to ds service? >>> >>> Thanks >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org >>> For additional commands, e-mail: users-help@felix.apache.org >>> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org > For additional commands, e-mail: users-help@felix.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org