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 25D7810EE9 for ; Thu, 5 Mar 2015 12:27:43 +0000 (UTC) Received: (qmail 50940 invoked by uid 500); 5 Mar 2015 12:27:42 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 50874 invoked by uid 500); 5 Mar 2015 12:27:42 -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 50862 invoked by uid 99); 5 Mar 2015 12:27:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2015 12:27:42 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of matthjes@gmail.com designates 209.85.213.181 as permitted sender) Received: from [209.85.213.181] (HELO mail-ig0-f181.google.com) (209.85.213.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2015 12:27:17 +0000 Received: by igkb16 with SMTP id b16so45190545igk.1 for ; Thu, 05 Mar 2015 04:25:45 -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=56DrucynBfwofIXbTWGzzJMKs1ohgkK7SVbEXgyqoz8=; b=PVztVQ6HC5bED+Yd2RUWq5BLcPcQwjQaVpY2kUBMW6oViHsjeDbEV7H91ns+evhSd8 nZvrzRT4rnDo1mXTct1Ksh84tnzk01fSArArrFgHTiXEG6ysuYHD874oUm3oVrG2xx6O nSYvq/G54994RcxJARe1jWlTCVRCd43uARJj2NeIm/BJ6eheubw70dIrk3UD7lG9RN5o c1ZGIIITvE7t2ijHId24mRtnjXeXSkO0geNP6g8HB8L7CXlXRzeOuc6KJRxGog0uPGer +ZziMB9/To80v50p8drd4b+1RIHfAoGUXiTP3b6XJezBAVXT+rXEOZT/venA7JvwotTQ pbdA== MIME-Version: 1.0 X-Received: by 10.42.94.65 with SMTP id a1mr3129100icn.1.1425558345623; Thu, 05 Mar 2015 04:25:45 -0800 (PST) Received: by 10.36.52.69 with HTTP; Thu, 5 Mar 2015 04:25:45 -0800 (PST) In-Reply-To: <63B9D1CE-6870-40D2-A30D-28A4D5A8741F@gmail.com> References: <63B9D1CE-6870-40D2-A30D-28A4D5A8741F@gmail.com> Date: Thu, 5 Mar 2015 13:25:45 +0100 Message-ID: Subject: Re: Question regarding Config Admin From: Matthias Jeschke To: users@felix.apache.org Content-Type: multipart/alternative; boundary=20cf303345f3cc2ede051089aa9e X-Virus-Checked: Checked by ClamAV on apache.org --20cf303345f3cc2ede051089aa9e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, After creating the instances I think you have to create the configuration. What I did was to inject the ConfigurationAdmin and then create a new configuration (with the respective managed service pid) via "createFactoryConfiguration()". Best regards Matthias On Thu, Mar 5, 2015 at 1:09 PM, Andrew Phillips wrote: > I am using iPojo and trying to create some instances of a component with > different configuration and tying the configuration to the Config Admin i= n > karat (so it can be managed with the config commands). > > No matter what i do, i cannot get the configuration of these instances to > show up when i do a config:list in karat. Any help would be greatly > appreciated! > > Here is how i am creating the instances: > > Instance instance =3D Instance.instance().of(MapQuestGeocodeProvider.clas= s) > .named("com.hdscores.geocode.mapquest.MapQuetGeocodeOpenProvider"= ) > > .with("managed.service.pid").setto("com.hdscores.geocode.mapquest.MapQuet= GeocodeOpenProvider") > .with(MapQuestGeocodeProvider.API_URL).setto(" > http://open.mapquestapi.com/geocoding/v1/address") > > .with(MapQuestGeocodeProvider.API_KEY).setto("Fmjtd%7Cluur2d6anu%2C7g%3Do= 5-9ab55u") > .with(Constants.SERVICE_RANKING).setto("10") > .with(GeocodeServiceProperties.USE_IN_MANAGER).setto("true"); > > Instance instance2 =3D Instance.instance().of(MapQuestGeocodeProvider.cla= ss) > > .named("com.hdscores.geocode.mapquest.MapQuetGeocodeLicensedProvider") > > .with("managed.service.pid").setto("com.hdscores.geocode.mapquest.MapQuet= GeocodeLicensedProvider") > .with(MapQuestGeocodeProvider.API_URL).setto(" > http://www.mapquestapi.com/geocoding/v1/address") > > .with(MapQuestGeocodeProvider.API_KEY).setto("Gmjtd%7Cluur2gutnq%2C2l%3Do= 5-lrasd") > .with(Constants.SERVICE_RANKING).setto("1") > .with(GeocodeServiceProperties.USE_IN_MANAGER).setto("true=E2=80= =9D); > > the GeocodeProvider class starts off like this: > > @Component() > @Provides(strategy =3D =E2=80=9CSERVICE") > public class MapQuestGeocodeProvider implements GeocodeService { > > public static final String API_URL =3D "apiUrl"; > public static final String API_KEY =3D "apiKey"; > > private Client client; > > @ServiceProperty(name =3D GeocodeServiceProperties.USE_IN_MANAGER) > private boolean useInManager; > > @ServiceProperty(name=3DAPI_URL) > private String apiUrl; > > @ServiceProperty(name=3DAPI_KEY) > private String apiKey; > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org > For additional commands, e-mail: users-help@felix.apache.org > > --20cf303345f3cc2ede051089aa9e--