You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Paul Fraser <pa...@qnenet.com> on 2020/08/10 05:13:05 UTC

Karaf Camel OSGi

Hi,

Blindly ventured into Karaf Camel code and used DefaultCamelContext for a single project wide camel 
context in a DS Activator.

Did not work. Research turned up a question from Alex Soto answered by Claus Ibsen. (Jan 2020)

Claus stated you have to use OsgiCamelContext and if you do you are on your own. He also states that 
Blueprint is the only approach continuing.

Then I find camel-core-osgi 3.5.0-SNAPSHOT which at least creates a camel context in a DS Activator.

Before I go off and learn Blueprint,is it possible and practical to build a system for production 
with Camel Java Routes in bundles using camel-core-osgi?

Paul Fraser


Re: Karaf Camel OSGi

Posted by Paul Fraser <pa...@qnenet.com>.
Excellent,

Sounds as if it is all under control..

Paul

On 10/08/2020 4:13 pm, Jean-Baptiste Onofre wrote:
> Hi Paul,
>
> In the example, I used blueprint just as a loader (to avoid to create the CamelContext by hand).
>
> But, I also have an example where I create CamelContext by hand and register as a service (just 
> have to find it).
> About the message on the mailing list, the subject is "[HEADS UP/PROPOSAL] "New" Camel Karaf for 
> 3.5.0", where you can see:
>
> "2. Remove osgi-activator component to use whiteboard pattern
> I removed osgi-activator component to use RouteBuilder extended/production ready whiteboard 
> pattern, using service property.
>
> 3. Introduction of CamelContextConfigurer whiteboard
> Camel-core-osgi now provided CamelContextConfigurer interface allowing you to create and configure 
> CamelContext smoothly."
>
> Regards
> JB
>
>> Le 10 août 2020 à 07:59, Paul Fraser <paulf@qnenet.com <ma...@qnenet.com>> a écrit :
>>
>> Thanks, JB,
>>
>> Good news. Is the blueprint route necessary in your example or just provided as an option?
>>
>> I cannot find the camel mailing list discussion, can you provide a clue to the topic and which list?
>>
>> Paul
>>
>>
>> On 10/08/2020 3:32 pm, Jean-Baptiste Onofre wrote:
>>> Hi,
>>>
>>> Yes, it’s fully possible:
>>>
>>> https://github.com/apache/karaf/tree/master/examples/karaf-camel-example/karaf-camel-example-java
>>>
>>> I’m also preparing a "native" DS support (as explained on the Camel mailing list).
>>>
>>> Regards
>>> JB
>>>
>>>> Le 10 août 2020 à 07:13, Paul Fraser <paulf@qnenet.com <ma...@qnenet.com>> a écrit :
>>>>
>>>> Hi,
>>>>
>>>> Blindly ventured into Karaf Camel code and used DefaultCamelContext for a single project wide 
>>>> camel context in a DS Activator.
>>>>
>>>> Did not work. Research turned up a question from Alex Soto answered by Claus Ibsen. (Jan 2020)
>>>>
>>>> Claus stated you have to use OsgiCamelContext and if you do you are on your own. He also states 
>>>> that Blueprint is the only approach continuing.
>>>>
>>>> Then I find camel-core-osgi 3.5.0-SNAPSHOT which at least creates a camel context in a DS 
>>>> Activator.
>>>>
>>>> Before I go off and learn Blueprint,is it possible and practical to build a system for 
>>>> production with Camel Java Routes in bundles using camel-core-osgi?
>>>>
>>>> Paul Fraser
>>>>
>>>> <paulf.vcf>
>>>
>>
>> <paulf.vcf>
>


Re: Karaf Camel OSGi

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Paul,

In the example, I used blueprint just as a loader (to avoid to create the CamelContext by hand).

But, I also have an example where I create CamelContext by hand and register as a service (just have to find it).
About the message on the mailing list, the subject is "[HEADS UP/PROPOSAL] "New" Camel Karaf for 3.5.0", where you can see:

"2. Remove osgi-activator component to use whiteboard pattern
I removed osgi-activator component to use RouteBuilder extended/production ready whiteboard pattern, using service property.

3. Introduction of CamelContextConfigurer whiteboard
Camel-core-osgi now provided CamelContextConfigurer interface allowing you to create and configure CamelContext smoothly."

Regards
JB

> Le 10 août 2020 à 07:59, Paul Fraser <pa...@qnenet.com> a écrit :
> 
> Thanks, JB,
> 
> Good news. Is the blueprint route necessary in your example or just provided as an option?
> 
> I cannot find the camel mailing list discussion, can you provide a clue to the topic and which list?
> 
> Paul
> 
> 
> On 10/08/2020 3:32 pm, Jean-Baptiste Onofre wrote:
>> Hi,
>> 
>> Yes, it’s fully possible:
>> 
>> https://github.com/apache/karaf/tree/master/examples/karaf-camel-example/karaf-camel-example-java <https://github.com/apache/karaf/tree/master/examples/karaf-camel-example/karaf-camel-example-java>
>> 
>> I’m also preparing a "native" DS support (as explained on the Camel mailing list).
>> 
>> Regards
>> JB
>> 
>>> Le 10 août 2020 à 07:13, Paul Fraser <paulf@qnenet.com <ma...@qnenet.com>> a écrit :
>>> 
>>> Hi,
>>> 
>>> Blindly ventured into Karaf Camel code and used DefaultCamelContext for a single project wide camel context in a DS Activator.
>>> 
>>> Did not work. Research turned up a question from Alex Soto answered by Claus Ibsen. (Jan 2020)
>>> 
>>> Claus stated you have to use OsgiCamelContext and if you do you are on your own. He also states that Blueprint is the only approach continuing.
>>> 
>>> Then I find camel-core-osgi 3.5.0-SNAPSHOT which at least creates a camel context in a DS Activator.
>>> 
>>> Before I go off and learn Blueprint,is it possible and practical to build a system for production with Camel Java Routes in bundles using camel-core-osgi?
>>> 
>>> Paul Fraser
>>> 
>>> <paulf.vcf>
>> 
> 
> <paulf.vcf>


Re: Karaf Camel OSGi

Posted by Paul Fraser <pa...@qnenet.com>.
Thanks, JB,

Good news. Is the blueprint route necessary in your example or just provided as an option?

I cannot find the camel mailing list discussion, can you provide a clue to the topic and which list?

Paul


On 10/08/2020 3:32 pm, Jean-Baptiste Onofre wrote:
> Hi,
>
> Yes, it’s fully possible:
>
> https://github.com/apache/karaf/tree/master/examples/karaf-camel-example/karaf-camel-example-java
>
> I’m also preparing a "native" DS support (as explained on the Camel mailing list).
>
> Regards
> JB
>
>> Le 10 août 2020 à 07:13, Paul Fraser <paulf@qnenet.com <ma...@qnenet.com>> a écrit :
>>
>> Hi,
>>
>> Blindly ventured into Karaf Camel code and used DefaultCamelContext for a single project wide 
>> camel context in a DS Activator.
>>
>> Did not work. Research turned up a question from Alex Soto answered by Claus Ibsen. (Jan 2020)
>>
>> Claus stated you have to use OsgiCamelContext and if you do you are on your own. He also states 
>> that Blueprint is the only approach continuing.
>>
>> Then I find camel-core-osgi 3.5.0-SNAPSHOT which at least creates a camel context in a DS Activator.
>>
>> Before I go off and learn Blueprint,is it possible and practical to build a system for production 
>> with Camel Java Routes in bundles using camel-core-osgi?
>>
>> Paul Fraser
>>
>> <paulf.vcf>
>


Re: Karaf Camel OSGi

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

Yes, it’s fully possible:

https://github.com/apache/karaf/tree/master/examples/karaf-camel-example/karaf-camel-example-java <https://github.com/apache/karaf/tree/master/examples/karaf-camel-example/karaf-camel-example-java>

I’m also preparing a "native" DS support (as explained on the Camel mailing list).

Regards
JB

> Le 10 août 2020 à 07:13, Paul Fraser <pa...@qnenet.com> a écrit :
> 
> Hi,
> 
> Blindly ventured into Karaf Camel code and used DefaultCamelContext for a single project wide camel context in a DS Activator.
> 
> Did not work. Research turned up a question from Alex Soto answered by Claus Ibsen. (Jan 2020)
> 
> Claus stated you have to use OsgiCamelContext and if you do you are on your own. He also states that Blueprint is the only approach continuing.
> 
> Then I find camel-core-osgi 3.5.0-SNAPSHOT which at least creates a camel context in a DS Activator.
> 
> Before I go off and learn Blueprint,is it possible and practical to build a system for production with Camel Java Routes in bundles using camel-core-osgi?
> 
> Paul Fraser
> 
> <paulf.vcf>


Re: Karaf Camel OSGi

Posted by Alex Soto <al...@envieta.com>.
It is perfectly possible, Paul, I have used it in several projects, with Blueprint XML.
 
Best regards,
Alex soto




> On Aug 10, 2020, at 1:13 AM, Paul Fraser <pa...@qnenet.com> wrote:
> 
> Hi,
> 
> Blindly ventured into Karaf Camel code and used DefaultCamelContext for a single project wide camel context in a DS Activator.
> 
> Did not work. Research turned up a question from Alex Soto answered by Claus Ibsen. (Jan 2020)
> 
> Claus stated you have to use OsgiCamelContext and if you do you are on your own. He also states that Blueprint is the only approach continuing.
> 
> Then I find camel-core-osgi 3.5.0-SNAPSHOT which at least creates a camel context in a DS Activator.
> 
> Before I go off and learn Blueprint,is it possible and practical to build a system for production with Camel Java Routes in bundles using camel-core-osgi?
> 
> Paul Fraser
> 
> <paulf.vcf>