Right, thanks. @Reference should really support a filter, not just for this
case.
Also, exposing local beans as services seems a clumsy way, just to be able to
use them in commands.
On 17.06.2017 09:52, Christian Schneider wrote:
The karaf @Reference annotation is not only a special
The karaf @Reference annotation is not only a special annotation. The karaf
commands are run completely independent of the blueprint container.
So the only way to use a blueprint bean from a command is to export it as a
service. As the @Reference does not have a filter you should use a specific
Hi Achim
Right, I can still use the "old"-style with Blueprint. But all this code is
marked as deprecated.
So I'm desparately trying to find a solution using the "new"-style Karaf
commands, as the old-style will disappear.
I would not spend time on this, if it wasn't marked deprecated.
I
Hi Martin,
afaik you still can also use the "old" style with blueprint.
As you are using blueprint anyway that shouldn't be much of a big deal.
The idea about the new command way is to not depend on blueprint for Karaf
internals.
The @Reference annotation is actually a karaf own annotation,
In Karaf 3, a command can be defined in Blueprint as:
where in my case "producerTemplate" comes from a CamelContext created in the
same Blueprint context.
Now in Karaf 4, how would I do the same, i.e. set the property?
- Martin