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

Christian Schneider commented on KARAF-3469:
--------------------------------------------

The code is in config.core. I worked around the issue by using the OSGi API so 
it is not critical to have this.
It would be possible to move that code into a new bundle but I thought a bundle 
for just one command would be overkill.

About the felix command style: Felix commands are implemented as singletons. So 
they can simply be registered as services using plain DS. Se we would not have 
to create any wiring framework at all. When I look at the current karaf 4 code 
I feel that we are doing things in a very proprietary way. Most of this is 
because we decided that commands should be created per execution. But we 
dicussed this already and I am being off topic for this issue :-)

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

Reply via email to