camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bengt Rodehav <be...@rodehav.com>
Subject Re: camel-cxf in OSGi, java DSL and iPOJO (no Spring)
Date Thu, 26 May 2011 13:18:34 GMT
Willem,

Can you explain that a bit? Should I change the thread context classloader
prior to creating the camel context? I don't quite understand.

/Bengt

2011/5/26 Willem Jiang <willem.jiang@gmail.com>

> Maybe you need to set the thread context classloader with the classloader
> which loads the SEI class.
>
>
> On 5/26/11 8:50 PM, Bengt Rodehav wrote:
>
>> Willem,
>>
>> I don't "load" my camel context, I create it programmatically like this:
>>
>> *    CamelContextFactory factory = new CamelContextFactory();
>>
>>>     factory.setBundleContext(bc);
>>>     CamelContext context = factory.createContext();*
>>>
>>
>>
>> I get the bundle context (bc) from iPOJO when my component is constructed.
>>
>> /Bengt
>>
>> 2011/5/26 Willem Jiang<willem.jiang@gmail.com>
>>
>>  Hi,
>>>
>>> I'm not sure how do you load the camel context.
>>> camel-cxf bundle don't need to import your customer SEI package, you just
>>> need to make sure you thread context classloader can load the SEI class.
>>>
>>>
>>> On 5/26/11 7:19 PM, Bengt Rodehav wrote:
>>>
>>>  Hello again Willem,
>>>>
>>>> Yes the ITrsWebService class is actually part of the bundle that
>>>> contains
>>>> the route and its package is exported. When I use Spring with
>>>> "cxf:bean",
>>>> as
>>>> I described earlier, Spring seems to have no problem finding this
>>>> interface.
>>>>
>>>> However, I cannot see that the camel-cxf bundle is importing this
>>>> package.
>>>> Shouldn't it have a dynamic import of "*"? How else can camel-cxf load a
>>>> class it isn't aware of?
>>>>
>>>> I've tried to do "update 165" (165 is the camel-cxf bundle) to make it
>>>> resolve again and perhaps find my class - but it doesn't help.
>>>>
>>>> /Bengt
>>>>
>>>> 2011/5/26 Willem Jiang<willem.jiang@gmail.com>
>>>>
>>>>  On 5/26/11 6:16 PM, Bengt Rodehav wrote:
>>>>
>>>>>
>>>>>  *  ITrsWebService serverBean = new TrsWebServiceImpl();
>>>>>
>>>>>>
>>>>>>  >       from("cxf:
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>> http://localhost:9001/trsws/?serviceClass=se.digia.trs.route.webservice.ITrsWebService
>>>>>>>
>>>>>>>   ").bean(serverBean);*
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>  But for some reason camel-cxf can't seem to find the ITrsWebService
>>>>>> class
>>>>>> (an interface). I get the following exception:
>>>>>>
>>>>>>
>>>>>>  Can you check if your application bundle can access the SEI class
>>>>>>
>>>>> without
>>>>> any issue ?
>>>>>
>>>>>
>>>>> --
>>>>> Willem
>>>>> ----------------------------------
>>>>> FuseSource
>>>>> Web: http://www.fusesource.com
>>>>> Blog:    http://willemjiang.blogspot.com (English)
>>>>>         http://jnn.javaeye.com (Chinese)
>>>>> Twitter: willemjiang
>>>>>
>>>>> Connect at CamelOne May 24-26
>>>>> The Open Source Integration Conference
>>>>> http://camelone.com
>>>>>
>>>>>
>>>>>
>>>>
>>> --
>>> Willem
>>> ----------------------------------
>>> FuseSource
>>> Web: http://www.fusesource.com
>>> Blog:    http://willemjiang.blogspot.com (English)
>>>         http://jnn.javaeye.com (Chinese)
>>> Twitter: willemjiang
>>>
>>> Connect at CamelOne May 24-26
>>> The Open Source Integration Conference
>>> http://camelone.com
>>>
>>>
>>
>
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
>
> Connect at CamelOne May 24-26
> The Open Source Integration Conference
> http://camelone.com
>

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