You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Ioannis Canellos (JIRA)" <ji...@apache.org> on 2011/01/24 14:31:45 UTC
[jira] Created: (KARAF-415) Config commands do not support the use
of Managed Service Factories
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.
[jira] Commented: (KARAF-415) Config commands do not support the
use of Managed Service Factories
Posted by "Achim Nierbeck (JIRA)" <ji...@apache.org>.
[ 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.
[jira] [Closed] (KARAF-415) Config commands do not support the use
of Managed Service Factories
Posted by "Jamie goodyear (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jamie goodyear closed KARAF-415.
--------------------------------
> 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: karaf-shell
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (KARAF-415) Config commands do not support the
use of Managed Service Factories
Posted by "Achim Nierbeck (JIRA)" <ji...@apache.org>.
[ 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
[jira] Commented: (KARAF-415) Config commands do not support the
use of Managed Service Factories
Posted by "Ioannis Canellos (JIRA)" <ji...@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"
> <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
[jira] Assigned: (KARAF-415) Config commands do not support the use
of Managed Service Factories
Posted by "Ioannis Canellos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ioannis Canellos reassigned KARAF-415:
--------------------------------------
Assignee: Ioannis Canellos
> 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
[jira] Resolved: (KARAF-415) Config commands do not support the use
of Managed Service Factories
Posted by "Ioannis Canellos (JIRA)" <ji...@apache.org>.
[ 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
[jira] Commented: (KARAF-415) Config commands do not support the
use of Managed Service Factories
Posted by "Ioannis Canellos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993484#comment-12993484 ]
Ioannis Canellos commented on KARAF-415:
----------------------------------------
I raised jira [FELIX-2837] in order to request solution a. The jira is a "Won't Fix" because this is the intended behaviour according to the spec.
So, the only possible work around is having a flag on config edit command.
> 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
>
> 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
[jira] Updated: (KARAF-415) Config commands do not support the use
of Managed Service Factories
Posted by "Andreas Pieber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Pieber updated KARAF-415:
---------------------------------
Affects Version/s: 2.1.3
> 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
>
> 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