You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Achim Nierbeck (JIRA)" <ji...@apache.org> on 2011/01/24 14:39:46 UTC

[jira] Commented: (KARAF-415) Config commands do not support the use of Managed Service Factories

    [ https://issues.apache.org/jira/browse/KARAF-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985682#action_12985682 ] 

Achim Nierbeck commented on KARAF-415:
--------------------------------------

This is also true if the corresponding cfg file is placed in the etc folder. It would be really nice if the pid of the instance would take the name of the configuration. 

> 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
>            Reporter: Ioannis Canellos
>
> 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.
-
You can reply to this email to add a comment to the issue online.