CamelBlueprintTestSupport and URL Handler Service

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CamelBlueprintTestSupport and URL Handler Service

samslara
Hello,
  I'm trying to use CamelBlueprintTestSupport to simulate how we have our production setup as but i'm running into a problem.  Our production setup makes use of OSGi URL Handler Service to handle certain URLs that are in our blueprint files however when using CamelBlueprintTestSupport I can't seem to register any URL handlers that my blueprint file needs.  I'm attempting to do this by registering an OSGi service of type org.osgi.service.url.AbstractURLStreamHandlerService with the property "url.handler.protocol=classpath" which is the scheme of my URL.  This works in our regular OSGi container (Servicemix 4.3.0 btw) but not using CamelBlueprintTestSupport.  For my test I'm using Camel 2.12.1.  Any ideas on what may be the problem?
Reply | Threaded
Open this post in threaded view
|

Re: CamelBlueprintTestSupport and URL Handler Service

cajun
I am having the same problem ....
Reply | Threaded
Open this post in threaded view
|

Re: CamelBlueprintTestSupport and URL Handler Service

ceposta
In reply to this post by samslara
if you can put together a simple test-case i would gladly take a look
for you. the blueprint test support can be tricky when depending on
external services to be present, but it can usually be coaxed to work
:)

On Fri, Feb 28, 2014 at 11:00 AM, samslara <[hidden email]> wrote:

> Hello,
>   I'm trying to use CamelBlueprintTestSupport to simulate how we have our
> production setup as but i'm running into a problem.  Our production setup
> makes use of OSGi URL Handler Service to handle certain URLs that are in our
> blueprint files however when using CamelBlueprintTestSupport I can't seem to
> register any URL handlers that my blueprint file needs.  I'm attempting to
> do this by registering an OSGi service of type
> org.osgi.service.url.AbstractURLStreamHandlerService with the property
> "url.handler.protocol=classpath" which is the scheme of my URL.  This works
> in our regular OSGi container (Servicemix 4.3.0 btw) but not using
> CamelBlueprintTestSupport.  For my test I'm using Camel 2.12.1.  Any ideas
> on what may be the problem?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/CamelBlueprintTestSupport-and-URL-Handler-Service-tp5748113.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta
Reply | Threaded
Open this post in threaded view
|

Re: CamelBlueprintTestSupport and URL Handler Service

Claus Ibsen-2
Hi

camel-test-blueprint does not use a real OSGi container. But uses
pojosr which only offers a limited functionality of OSGi container.

For your use-case you need to use pax-exam for testing which bootup a
real Karaf OSGi container.


On Sat, Mar 1, 2014 at 1:29 AM, Christian Posta
<[hidden email]> wrote:

> if you can put together a simple test-case i would gladly take a look
> for you. the blueprint test support can be tricky when depending on
> external services to be present, but it can usually be coaxed to work
> :)
>
> On Fri, Feb 28, 2014 at 11:00 AM, samslara <[hidden email]> wrote:
>> Hello,
>>   I'm trying to use CamelBlueprintTestSupport to simulate how we have our
>> production setup as but i'm running into a problem.  Our production setup
>> makes use of OSGi URL Handler Service to handle certain URLs that are in our
>> blueprint files however when using CamelBlueprintTestSupport I can't seem to
>> register any URL handlers that my blueprint file needs.  I'm attempting to
>> do this by registering an OSGi service of type
>> org.osgi.service.url.AbstractURLStreamHandlerService with the property
>> "url.handler.protocol=classpath" which is the scheme of my URL.  This works
>> in our regular OSGi container (Servicemix 4.3.0 btw) but not using
>> CamelBlueprintTestSupport.  For my test I'm using Camel 2.12.1.  Any ideas
>> on what may be the problem?
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/CamelBlueprintTestSupport-and-URL-Handler-Service-tp5748113.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Christian Posta
> http://www.christianposta.com/blog
> twitter: @christianposta



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io