camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad Johnson <>
Subject Re: CamelBlueprintTestSupport No bean could be found in the registry
Date Tue, 09 Feb 2016 18:49:34 GMT
I just had a "duh" moment when I re-read.  My comments weren't referring to
the asService method specifically but the addServicesOnStartup method.
Apologies for any confusion there.

If I had a good way to mock up a set of bundles to show the injection of a
second test stub bundle and attach it I'd do that but I don't think the
forum permits attachments.

On Tue, Feb 9, 2016 at 12:44 PM, Brad Johnson <>

> I wish there was a way to see your code.  But if you are exporting the
> service from the firs bundle AND it doesn't use a CamelContextRoute in that
> bundle, then you shouldn't need to invoke the asService method at all.  The
> <test> scope will pick up your second bundle and register the service
> automatically.
> If you make a copy of your service provider bundle and just put a test
> stub inside it with a blueprint statement that exposes that interface and
> put a reference to that bundle in your consumer the test will automatically
> pick it up and register it.  Unfortunately if that second bundle relies on
> CamelContexts and routes this will not work.  So it is really only useful
> for creating test stubs.
> As Quinn pointed out if you create an API bundle and perhaps a models
> bundle that the other two projects depend on then they are decoupled.  A
> test stub bundle would depend on the API, have a test implementation and
> then be exposed via its service interface.
> I could probably work this up as a project easier to demonstrate but i
> don't know if there's a way to do attachments.
> On Mon, Feb 8, 2016 at 1:37 PM, enigma <> wrote:
>> @Ranx - With reference to your statement - " If the first bundle is in his
>> POM with a scope of
>> test then it should be available during testing. ".
>> Are you saying that it is possible to invoke the asService method *without
>> *the the Stub Implementation and the OSGI can invoke the actual
>> implementation?
>> If that is the case, then I have tried it that approach and was NOT
>> successful. Not sure, if I am missing something here.
>> --
>> View this message in context:
>> Sent from the Camel - Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message