Return-Path: Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: (qmail 81552 invoked from network); 5 Apr 2011 15:51:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Apr 2011 15:51:49 -0000 Received: (qmail 85680 invoked by uid 500); 5 Apr 2011 15:51:49 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 85641 invoked by uid 500); 5 Apr 2011 15:51:49 -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 85633 invoked by uid 99); 5 Apr 2011 15:51:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2011 15:51:48 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gnodet@gmail.com designates 209.85.216.49 as permitted sender) Received: from [209.85.216.49] (HELO mail-qw0-f49.google.com) (209.85.216.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2011 15:51:44 +0000 Received: by qwi2 with SMTP id 2so513710qwi.22 for ; Tue, 05 Apr 2011 08:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=Gj1yHXnhhucdHlEqrgaGYvbe4SxRUzOFl+i8AH+d8i0=; b=pNX3+t1clFFsQzYPcBrGoNr7m0NB9DhF92h6KWejCJ2+56BI5rQbpcI0eKPfP3v+u2 qdkcWRIrjxNaS9hdqUXYXjrOSbuxqPsh5ko7uakx70YM89gDAl72qu1YvjpCosfzfONW o4pVd9YEsWFmCHxKOrpSK1xFtGT5il9ddvSeo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=cn1JFZU2k0qqMtie7wFFwXvFNIakT4fX8taIEJTHjciVQSfrfvFj8kyKIy6vh+mWZR cL+vPYpr6GifKL39YJO6l36zMOFJFIjJI0DC6tEi4Tw3aqESU0QFXQWEJIit9WHlJpoA +4lrOzdv7h2Iof1QahQFQosliDaoPdqvQ44oQ= MIME-Version: 1.0 Received: by 10.224.10.13 with SMTP id n13mr7350583qan.17.1302018683592; Tue, 05 Apr 2011 08:51:23 -0700 (PDT) Received: by 10.224.54.147 with HTTP; Tue, 5 Apr 2011 08:51:23 -0700 (PDT) In-Reply-To: References: <3688EBF5-317D-4ED4-85CD-887C74766A6A@gemini.edu> <4D9A3121.5000009@googlemail.com> Date: Tue, 5 Apr 2011 17:51:23 +0200 Message-ID: Subject: Re: Settings Service PID with FileInstall From: Guillaume Nodet To: users@felix.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yeah, I agree. In Karaf, we've enhanced the config commands so that you can actually edit a configuration based on the zookeeper file it uses, so that should help too. On Tue, Apr 5, 2011 at 17:36, Achim Nierbeck wrot= e: > Guillaume, > > you are right that if there are multiple directories watched you run > into this issue. > Never the less the ID still would be unique, just the stored data > wouldn't which leads to quite a mess > when looking for the reason :) > > Since the ConfigurationAdmin API doesn't give a way of adding this > PID, ok I give up :) > > Just thinking about a perfect world, where we certainly don't live in, > it would have helped. > > regards, Achim > > > 2011/4/5 Guillaume Nodet : >> Fileinstall can monitor multiple directories, so you'd need the full >> path in order to have a unique id. >> And the ConfigurationAdmin API gives no way to set the PID anyway, so >> not sure how we could do that. =A0The API only allow the creation of a >> new factory configuration given its factory PID or the modification of >> an existing configuration. >> >> On Tue, Apr 5, 2011 at 09:01, Achim Nierbeck w= rote: >>> Hi Guillaume, >>> >>> I'm still not convinced :) >>> Since a file name is usually unique since we are talking of the >>> combination of FileInstall and ConfigurationAdmin. >>> In this case I'd say the - pattern could be u= sed. >>> >>> regards, Achim >>> >>> >>> 2011/4/4 Guillaume Nodet : >>>> @Achim: >>>> This would not really guarantee a new unique PID if you can give it ..= . >>>> >>>> @Carlos: >>>> Not sure about the meta-type, but I suppose it should use the factory >>>> pid instead of factory based configurations? >>>> >>>> On Mon, Apr 4, 2011 at 22:59, Achim Nierbeck = wrote: >>>>> Hi Guillaume, >>>>> >>>>> just because out of curiosity, where in the spec is it defined how th= e >>>>> PID is generated? >>>>> I just found the following in the current 4.2 spec: >>>>> >>>>> >>>>> When a Configuration object for a Managed Service Factory is created >>>>> (ConfigurationAdmin.createFactoryConfiguration), a new unique PID is >>>>> created for this object by the Configuration Admin service. The schem= e used >>>>> for this PID is defined by the Configuration Admin service and is unr= elated >>>>> to the factory PID. >>>>> >>>>> >>>>> The way I read this, that it is completely free on how to define this >>>>> unique PID. >>>>> From my point of =A0view in combination with the FileInstaller this n= ewly >>>>> unique Service PID could be like Carlos suggested. >>>>> >>>>> just my 2 cents >>>>> >>>>> regards, Achim >>>>> >>>>>> The ConfigAdmin spec specifies that the PID has to be generated, so >>>>>> no, that's not possible. >>>>>> However you can filter based on the file name, as an additional >>>>>> property is added to the configuration to be able to easily link it >>>>>> back to the file. >>>>>> Look for the felix.fileinstall.filename property. >>>>>> >>>>>> On Fri, Apr 1, 2011 at 13:50, Carlos Quiroz wro= te: >>>>>>> Hi >>>>>>> >>>>>>> I have been using FileInstall to start and install my services usin= g ManagedServiceFactories but one issue I find is that FileInstall ask Conf= igAdmin an initial configuration which is set to a random UUID. >>>>>>> >>>>>>> Could be that FileInstall gets the pid from the file name like is g= etting the Factory PID? Like >>>>>>> >>>>>>> -.cfg >>>>>>> >>>>>>> In the code, FileInstall is actually doing something like that pars= ing the filename but it doesn't use the service.pid part >>>>>>> >>>>>>> I think that would be quite useful as the Random UUID in PID makes = it difficult to find specific services >>>>>>> >>>>>>> Any opinion? >>>>>>> >>>>>>> Carlos >>>>>>> -------------------------------------------------------------------= -- >>>>>>> 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 >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Cheers, >>>> Guillaume Nodet >>>> ------------------------ >>>> Blog: http://gnodet.blogspot.com/ >>>> ------------------------ >>>> Open Source SOA >>>> http://fusesource.com >>>> >>>> --------------------------------------------------------------------- >>>> 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 >>> >>> >> >> >> >> -- >> Cheers, >> Guillaume Nodet >> ------------------------ >> Blog: http://gnodet.blogspot.com/ >> ------------------------ >> Open Source SOA >> http://fusesource.com >> >> --------------------------------------------------------------------- >> 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 > > --=20 Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org