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 03:44:00 GMT
What I meant was if he is using the actual implementation or the test stub
is the second bundle then he can simply refer to in the test scope.
There's one huge caveat there though.  It has to be a pure OSGi service
that does not rely on another CamelContext.  PojoSR is not capable of
testing across multiple contexts.  My guess is that he has something
associated with a second camel context in the service bundle.  So if the
bundle declares a service like:

 <service interface="">
      <bean class="" />


 <service interface="">
      <bean class="" />

Then that can be used during testing from one bundle to the other and
switched to and from the actual implementation to a test
implementation by changing what the bean class is..  It can use its
own blueprint xml, obviously, it just can't rely on a second camel

Those can be switched.  In some cases one can then use this:

 <service interface="">
      <bean class="${databaseImplClazz}" />

And change it with configuration.  As long as one doesn't get multiple
contexts involved.  Hopefully in Camel 3 they will move to a karaf
environment for tests (whether through Pax Exam or something else.)

When my clients ask what I find weakest in Camel/blueprint I
automatically reply "testing".

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