Hi Jens,

you can still use the "old style" as in K3 if you have the shell-compat feature installed in k4.

Using the new style you can use @Reference to a service (the new style doesn't use blueprint anymore).

Regards
JB

On 12/04/2015 06:50 AM, Jens J Parappallil wrote:
Hi ,

In K4 how is it possible to inject a custom bean property to your karaf
command ?.
I am in the process of migrating my custom commands to K4. I understand
that the new way of publishing commands is via the Manifest header
Karaf-Command. How to inject custom properties to my command.
Is it possible to register the command like in K3 using blueprint ?

I have tried to move the class to karat.shell.api.* and then register in
blueprint

   <command-bundlexmlns="http://karaf.apache.org/xmlns/shell/v1.1.0";>

<command>

<actionclass=“foo.bar.PingCommand">

<propertyname="repositories"ref="elasticSearchRepositories"/>

</action>

</command>

</command-bundle>


I think the namespace has to be different ??

Thanks
Jens


DISCLAIMER: "The information in this e-mail and any attachment is
intended only for the person to whom it is addressed and may contain
confidential and/or privileged material. If you have received this
e-mail in error, kindly contact the sender and destroy all copies of the
original communication. IBS makes no warranty, express or implied, nor
guarantees the accuracy, adequacy or completeness of the information
contained in this email or any attachment and is not liable for any
errors, defects, omissions, viruses or for resultant loss or damage, if
any, direct or indirect."

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to