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 1D8069CFF for ; Fri, 27 Jan 2012 18:19:25 +0000 (UTC) Received: (qmail 12086 invoked by uid 500); 27 Jan 2012 18:19:24 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 12050 invoked by uid 500); 27 Jan 2012 18:19:23 -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 12042 invoked by uid 99); 27 Jan 2012 18:19:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 18:19:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [91.221.255.3] (HELO APTXMGATE2.axway.net) (91.221.255.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 18:19:19 +0000 X-WSS-ID: 0LYGYVK-22-1LX-02 X-M-MSG: Received: from WPTXCAS1.ptx.axway.int (unknown [10.128.17.51]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by APTXMGATE2.axway.net (Postfix) with ESMTP id 2CC46AD1992 for ; Fri, 27 Jan 2012 19:18:56 +0100 (CET) Received: from WPTXMAIL1.ptx.axway.int ([::1]) by WPTXCAS1.ptx.axway.int ([::1]) with mapi id 14.01.0355.002; Fri, 27 Jan 2012 19:18:55 +0100 From: "Gay David (Annecy)" To: "users@felix.apache.org" Subject: RE: iPojo Composite Thread-Topic: iPojo Composite Thread-Index: AczZ5q8L6lcLJz49Sm+ubT04wALwmABU26oAAHlkX7A= Date: Fri, 27 Jan 2012 18:18:54 +0000 Message-ID: <1506FFE6E7E2FA4A9381BFB87F99B48153194348@WPTXMAIL1.ptx.axway.int> References: <1506FFE6E7E2FA4A9381BFB87F99B481531924CE@WPTXMAIL1.ptx.axway.int> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.17.7] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi Clement, Thanks for your help. I've open a Jira for the composite problem here : https://issues.apache.org= /jira/browse/FELIX-3323 Tell me if you also want me to open a Jira for the @Updated problem or if y= ou need more time to investigate. Have a nice week end. WBR // David G. -----Original Message----- From: Clement Escoffier [mailto:clement.escoffier@gmail.com]=20 Sent: mercredi 25 janvier 2012 10:20 To: users@felix.apache.org Subject: Re: iPojo Composite Hi, On 23.01.2012, at 16:50, Gay David (Annecy) wrote: > Hi, > =20 > I have some problems with the iPojo composite. > I made a simple project to illustrate what's happen. See in attachment. > There are 2 bundles : one that define a service, one other that define a = composite. > =20 > Just compile and install theses 2 bundles in a Felix runtime. > You should have this bundles : > =20 > g! lb > START LEVEL 1 > ID|State |Level|Name > 0|Active | 0|System Bundle (4.0.2) > 1|Active | 1|Apache Felix Bundle Repository (1.6.6) > 2|Active | 1|Apache Felix Configuration Admin Service (1.2.8) > 3|Active | 1|Apache Felix EventAdmin (1.2.14) > 4|Active | 1|Apache Felix File Install (3.1.10) > 5|Active | 1|Apache Felix Gogo Command (0.12.0) > 6|Active | 1|Apache Felix Gogo Runtime (0.10.0) > 7|Active | 1|Apache Felix Gogo Shell (0.10.0) > 8|Active | 1|Apache Felix iPOJO (1.8.0) > 9|Active | 1|Apache Felix iPOJO API (1.6.0) > 10|Active | 1|Apache Felix iPOJO Gogo Command (1.0.1) > 11|Active | 1|Apache Felix iPOJO Composite (1.8.0) > 12|Active | 1|Apache Felix Metatype Service (1.0.4) > 13|Active | 1|foo-provider (1.0.0.SNAPSHOT) > 14|Active | 1|foo-composite (1.0.0.SNAPSHOT) > =20 > I use the file install to create the services instances. > =20 > 1- @Updated not call > =20 > Don't know if there is a problem in my code but if I create an instance, = thanks to FileInstall in > /load/foo.provider.impl.FooServiceImpl-0.cfg with this content= : job.name=3DADummyValue > =20 > The service is well create: no problem. > The configuration is well inject : no problem > =20 > For example : > g! instance foo.provider.impl.FooServiceImpl.bc404b98-4118-418e-84cb-deba= 273eb309 > instance name=3D"foo.provider.impl.FooServiceImpl.bc404b98-4118-418e-84cb= -deba273eb309" component.type=3D"foo.provider.impl.FooServiceImpl" state=3D= "valid" bundle=3D"13" > handler name=3D"org.apache.felix.ipojo:properties" state=3D"valid= " > property name=3D"job.name" value=3D"ADummyValue" > handler name=3D"org.apache.felix.ipojo:provides" state=3D"valid" > provides service.id=3D"40" state=3D"registered" specifica= tions=3D"[foo.provider.FooService]" > property name=3D"service.pid" value=3D"foo.provid= er.impl.FooServiceImpl.bc404b98-4118-418e-84cb-deba273eb309" > property name=3D"factory.name" value=3D"foo.provi= der.impl.FooServiceImpl" > property name=3D"instance.name" value=3D"foo.prov= ider.impl.FooServiceImpl.bc404b98-4118-418e-84cb-deba273eb309" > handler name=3D"org.apache.felix.ipojo:architecture" state=3D"val= id" > =20 > If I change the content of the .cfg with job.name=3D ADummyValue2 : is wo= rking also. > =20 > But, the lifecycle callback @Updated is never called ! That seems to be a bug. I will have a look. We recently 'enhanced' the cond= ition to call @Updated. Maybe we're a bit too strict :-) > =20 > =20 > 2- Composite > =20 > I try the same with the composite. > Create a file /load/foo.compo-0.cfg with content job.name=3DDu= mmyCompo > =20 > It's working very well, I even see my System.out : "Configuration updated= :DummyCompo", great ! > =20 > But, if I update the job.name with job.name=3DDummyCompo2 .... I have an = exception : > =20 > *ERROR* [org.apache.felix.ipojo.Factory, org.osgi.service.cm.ManagedServi= ceFactory, id=3D38, bundle=3D14]: Unexpected problem updating Configuration= PID=3Dfoo.compo.26ec176f-6860-4100-a538-b5fb523d4a1f, fac > toryPID=3Dfoo.compo, bundleLocation=3Dfile:../foo-composite/target/foo-co= mposite-1.0.0-SNAPSHOT.jar > java.lang.ClassCastException: org.apache.felix.ipojo.composite.CompositeM= anager cannot be cast to org.apache.felix.ipojo.InstanceManager > at org.apache.felix.ipojo.IPojoFactory.updated(IPojoFactory.java:= 627) > at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfigurat= ion.run(ConfigurationManager.java:1567) > at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:10= 4) > at java.lang.Thread.run(Unknown Source) > =20 > Also, did I do something wrong ? > =20 This is definitely a bug. Could you open a jira issue ? Regards, Clement > =20 > =20 > Thanks all for your help. > WBR // David G. > =20 > =20 > > --------------------------------------------------------------------- > 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