Dear Karaf addicts,

I export custom Karaf shell commands using blueprint. It was ok with Karaf 
3.0.x, but not working (i.e. no custom command available in the shell) with 
4.0.3.

For instance:
Java:

public /*final*/ MySimulator { // No final as GOGO command

public void sayHello() {

  System.out.println("hello");

}

}


XML:

<bean id="mySimulator" class="shell.MySimulator"/>



<service ref="mySimulator" auto-export="class-hierarchy">

<service-properties>

  <entry key="osgi.command.scope" value="simu"/>

  <entry key="osgi.command.function">

   <array>

    <value>sayHello</value>

   </array>

  </entry>

</service-properties>

</service>

How to fix this and allow Karaf to handle my commands?

PS: the assembly does include the following boot features: aries-blueprint, 
bundle, shell-compat, ssh

Kind regards,
Jean-Philippe

[@@ OPEN @@]

Reply via email to