karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ioannis Canellos (JIRA)" <j...@apache.org>
Subject [jira] Created: (KARAF-415) Config commands do not support the use of Managed Service Factories
Date Mon, 24 Jan 2011 13:31:45 GMT
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"
     <bean class="org.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.
You can reply to this email to add a comment to the issue online.

View raw message