karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Simpler karaf shell command/action definition
Date Wed, 09 May 2012 16:59:27 GMT
Absolutely. Compatibility to the 1.0.0 namespace is mandatory so camel 
and other projects have time to switch and can support karaf 2 and 3 for 
a while.

The question is mainly if we should change the 1.1.0 namespace before we 
release karaf 3. As soon as we release we will have to support the 1.1.0 
namepace so
now is about the last chance to change it.

I still also see value in the Action as a service aproach as it would 
help people who want to implement karaf actions but do not want to use 
blueprint or for people who want to use
a mainly annotation based config. We can wait with this till after 3.0.0 
though as it should not have compatibility issues.

Christian

Am 09.05.2012 18:46, schrieb Guillaume Nodet:
> Parent templates aren't supported in blueprint so we can't inject into
> multiple actions at the same time.
>
> I agree we could simplify the way you describe to have something like, but
> the handler would have to support the old and the new namespace I think:
>
>          <shell:action
> class="org.apache.karaf.admin.command.ChangeRmiServerPortCommand">
>              <property name="adminService" ref="adminService" />
>              <shell:completer ref="instanceCompleter" />
>          </shell:action>
>
>
>
> On Wed, May 9, 2012 at 6:16 PM, Christian Schneider<chris@die-schneider.net
>> wrote:
>> I think the namespace could be made a bit simpler by only using:
>>
>> <shell:action class="..">
>> <completer ref=""/>
>> </shell:action>
>>
>> So we could skip the command-bundle and we could skip the command.
>>
>> Additionally it would be great to be able to inject the same dependencies
>> into more than one action. Like the parent attribute in spring beans.
>>
>> Currently for example if we have a service that all commands of a type use
>> we have to inject it into each.
>>
>>
>> Christian
>>
>> Am 09.05.2012 18:05, schrieb Guillaume Nodet:
>>
>>> That's what we the namespace handler does.  The<action/>   are actually
>>>
>>> templates.
>>> The service publishing is needed at some point so that the shell knows
>>> about the commands.
>>>
>>> I don't really understand how you can really simply the minimum definition
>>> we have now:
>>>      <command-bundle xmlns="http://karaf.apache.**org/xmlns/shell/v1.0.0<http://karaf.apache.org/xmlns/shell/v1.0.0>
>>> ">
>>>          <command>
>>>              <action class="..."/>
>>>          </command>
>>>      </command-bundle>
>>>
>>>
>>>
>> --
>>
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> Talend Application Integration Division http://www.talend.com
>>
>>
>


-- 

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Mime
View raw message