[ 
https://issues.apache.org/jira/browse/KARAF-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ioannis Canellos resolved KARAF-415.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.0

> 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
>             Fix For: 2.2.0
>
>
> Below is a sample usage of  a managed service factoriy with factory-pid = 
> "rg.apache.karaf.someservice"
> <osgix:managed-service-factory factory-pid="org.apache.karaf.someservice" 
> update-strategy="container-managed" auto-export="all-classes">
>      <bean class="org.apache.karaf.SomeService"/>
> </osgix:managed-service-factory> 
> 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

        

Reply via email to