Return-Path: Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: (qmail 22630 invoked from network); 11 Feb 2011 13:57:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Feb 2011 13:57:22 -0000 Received: (qmail 7209 invoked by uid 500); 11 Feb 2011 13:57:22 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 7069 invoked by uid 500); 11 Feb 2011 13:57:21 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 7055 invoked by uid 99); 11 Feb 2011 13:57:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Feb 2011 13:57:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Feb 2011 13:57:18 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 849C419F295 for ; Fri, 11 Feb 2011 13:56:57 +0000 (UTC) Date: Fri, 11 Feb 2011 13:56:57 +0000 (UTC) From: "Ioannis Canellos (JIRA)" To: issues@karaf.apache.org Message-ID: <1626317062.10485.1297432617539.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <11302796.153551295875905674.JavaMail.jira@thor> Subject: [jira] Commented: (KARAF-415) Config commands do not support the use of Managed Service Factories MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/KARAF-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993492#comment-12993492 ] Ioannis Canellos commented on KARAF-415: ---------------------------------------- I don't think that we can reuse this, because this is the piece of information that is already known to the user. But we could open the properties file as a file (and not via configadmin) read the real pid and then invoke the configuration admin. > Config commands do not support the use of Managed Service Factories > ------------------------------------------------------------------- > > Key: KARAF-415 > URL: https://issues.apache.org/jira/browse/KARAF-415 > Project: Karaf > Issue Type: Bug > Components: console > Affects Versions: 2.1.3 > Reporter: Ioannis Canellos > Assignee: Ioannis Canellos > > Below is a sample usage of a managed service factoriy with factory-pid = "rg.apache.karaf.someservice" > > > > From the karaf shell I use the config command to create a new instance of that service say "instance1": > karaf@root> config:edit org.apache.karaf.someservice-instance1 > karaf@root> config:propset somekey somevalue > karaf@root> config:update > As a result a new instance of the service is created and the configuration is persisted in the file etc/org.apache.karaf.someservice-instance1.cfg > The problem is that its assigned a random service.pid of the form org.apache.karaf.someservice.b95c9421-77e8-474d-8083-7665a0cfcedf and when I try to update the configuration > karaf@root> config:edit org.apache.karaf.someservice-instance1 > It doesn't work. Instead I have to use the assigned pid (which requires me to perform a config:list and then use correlate): > karaf@root> config:edit org.apache.karaf.someservice.b95c9421-77e8-474d-8083-7665a0cfcedf > We need to change the config commands in a manner that will either: > a) Enforce the use of a PID: org.apache.karaf.someservice-instance1 or > b) Provide a flag so that when editing existing configuration the filename can be used. > If you can think of other alternatives please discuss. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira