karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Achim Nierbeck (JIRA)" <j...@apache.org>
Subject [jira] Commented: (KARAF-415) Config commands do not support the use of Managed Service Factories
Date Fri, 11 Feb 2011 13:40:57 GMT

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

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

to bad, but somehow makes sense. 
Now since the FileInstaller does insert a special property

quote -

What File Install does, though, is adding a special property to the newly created configuration
which allows the configuration to be related back to the cfg file.

- unquote

we might be able to use this. 

> 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"
> <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

        

Mime
View raw message