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 2096C1037B for ; Wed, 4 Sep 2013 08:24:53 +0000 (UTC) Received: (qmail 32217 invoked by uid 500); 4 Sep 2013 08:24:52 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 32179 invoked by uid 500); 4 Sep 2013 08:24:52 -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 32161 invoked by uid 99); 4 Sep 2013 08:24:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Sep 2013 08:24:51 +0000 Date: Wed, 4 Sep 2013 08:24:51 +0000 (UTC) From: "Clement Escoffier (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FELIX-4207) ipojo @Component with propagation set to true doesn't propagate properties 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-4207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Clement Escoffier updated FELIX-4207: ------------------------------------- Assignee: Clement Escoffier > ipojo @Component with propagation set to true doesn't propagate properties > -------------------------------------------------------------------------- > > Key: FELIX-4207 > URL: https://issues.apache.org/jira/browse/FELIX-4207 > Project: Felix > Issue Type: Bug > Components: iPOJO > Affects Versions: ipojo-runtime-1.10.1 > Reporter: Guillaume Delafosse > Assignee: Clement Escoffier > Labels: annotations, component, propagation > > I use config admin to instantiate my component and I want its property to be deployed with its registered service as a service property. > According to the documentation, I have to set the flag propagation to true to do so. So my code is like : > @Component(name="component", propagation=true) > @Provides > public class MyComponent implements MyService > { > @Property(name="p") > private String p; > > } > Then I look to my instance details and I don't see the property attached to the service, it's just attached to the component instance : > instance name="component.16d0dcc1-ae65-49b9-a7fe-17f6723997db" state="valid" bundle="8" component.type="component" > handler name="org.apache.felix.ipojo:properties" state="valid" > property name="p" value="1" > handler name="org.apache.felix.ipojo:provides" state="valid" > provides specifications="[test.ipojo.MyService]" state="registered" service.id="50" > property name="service.pid" value="component.16d0dcc1-ae65-49b9-a7fe-17f6723997db" > property name="service.factoryPid" value="component" > property name="factory.name" value="component" > property name="instance.name" value="component.16d0dcc1-ae65-49b9-a7fe-17f6723997db" > handler name="org.apache.felix.ipojo:architecture" state="valid" > Then I tried to add the @ServiceProperty on my property field and I also removed the propgation flag. So my code is now like : > @Component(name="component") > @Provides > public class MyComponent implements MyService > { > @Property(name="p") > @ServiceProperty > private String p; > > } > and if I look to my instance details I can see the property attached to both my component and my service : > instance name="component.c4ee23a1-14c3-447c-93f8-78caf65a8304" state="valid" bundle="8" component.type="component" > handler name="org.apache.felix.ipojo:properties" state="valid" > property name="p" value="1" > handler name="org.apache.felix.ipojo:provides" state="valid" > provides specifications="[test.ipojo.MyService]" state="registered" service.id="52" > property name="service.pid" value="component.c4ee23a1-14c3-447c-93f8-78caf65a8304" > property name="service.factoryPid" value="component" > property name="p" value="1" > property name="factory.name" value="component" > property name="instance.name" value="component.c4ee23a1-14c3-447c-93f8-78caf65a8304" > handler name="org.apache.felix.ipojo:architecture" state="valid" > Is it a but with the propagation flag or is the documentation wrong? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira