[
https://issues.apache.org/jira/browse/KARAF-3469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14322740#comment-14322740
]
Christian Schneider commented on KARAF-3469:
--------------------------------------------
The idea is to have a command that depends on an OSGi service that is not
installed in all deployments.
In my case it was a command to display meta type infromations. So this command
would be in the same bundle as the other config commands.
I have no implemented this using the OSGi APIs.
Btw. I think this is just one more reason why I would prefer the felix command
style as it would not require a new framework :-)
> It should be possible to create a reference to an optional service from a
> command
> ---------------------------------------------------------------------------------
>
> Key: KARAF-3469
> URL: https://issues.apache.org/jira/browse/KARAF-3469
> Project: Karaf
> Issue Type: Improvement
> Reporter: Christian Schneider
> Fix For: 4.0.0
>
>
> To inject services into commands you use the
> @org.apache.karaf.shell.api.action.lifecycle.Reference annotation. Unlike the
> one from DS this annotation does not have an optional flag.
> We should allow to reference optional services and have them injected with
> null if they are not present.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)