karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Hendley <shend...@greenenergycorp.com>
Subject Re: Console extensions without blueprint
Date Tue, 05 Jul 2011 15:23:21 GMT
Hello, I am trying to register commands without using blueprint but I am
running into issues and I wonder if I am fighting a losing battle.

I based what I was doing on a mailing-list thread from January:
http://karaf.922171.n3.nabble.com/Console-extensions-without-blueprint-td2305019.html

I have been able to get the command somewhat registered without blueprint
but they are not functional when executed.

karaf@root> sim:list
Error executing command: Cannot coerce list() to any of []

I believe what is occurring is when blueprint processes the command-bundle
it builds a "proxy" Function object that handles the argument parsing and
handling. Is that wrapping functionality exposed outside of blueprint?

Below is the ls output of my self-publishing attempt (63) and the blueprint
created command (62).

--------------------------------------------------------------------------------------
karaf@root> ls -a 63

Reef Protocol Simulator (63) provides:
--------------------------------------
objectClass = org.totalgrid.reef.protocol.api.Protocol
protocol = benchmark
service.id = 237
----
objectClass = org.apache.felix.gogo.commands.Action
osgi.command.function = list
osgi.command.scope = sim
service.id = 238
karaf@root> ls -a 62

Reef Admin Shell Extension (62) provides:
-----------------------------------------
objectClass = org.apache.karaf.shell.console.CompletableFunction,
org.apache.felix.service.command.Function
osgi.command.function = resetdb
osgi.command.scope = reef
service.id = 172

------------------------------------------------------------------------------------------

If need be I believe I can switch everything to blueprint but if it is
possible I would like to avoid that (without re-implementing too much of the
command handling code).

Thanks,
Sam Hendley

Mime
View raw message