You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Pete Mueller <pe...@routecloud.com> on 2009/11/25 12:28:59 UTC

Using Camel with Felix (Karaf) without Spring

Hello all,  

I was wondering if anyone has some tips or an example of using Camel and
OSGi without using Spring.  Our project uses Apache Felix (Karaf actually)
on an embedded device, as such the size and performance of Spring is
unattractive.

We have created various services using iPOJO and are looking for a way to
"glue" them all together with Camel. I was hoping to just load camel-core
and only the endpoint we use to keep the size minimal.

Any help would be appreciated
-p
-- 
View this message in context: http://old.nabble.com/Using-Camel-with-Felix-%28Karaf%29-without-Spring-tp26511153p26511153.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using Camel with Felix (Karaf) without Spring

Posted by Willem Jiang <wi...@gmail.com>.
Just a quick answer for reusing the OSGi service.
Camel 2.x support to use the OSGi service name as the BeanComponent's 
reference.

You can find the code here[1]

[1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiServiceRegistry.java 


Willem

Pete Mueller wrote:
> Hello Charles,
> 
> I should have been more specific.  Yes, I meant without Spring DM.  What I
> am attempting  is to create a system that has X number of services
> registered, but not all services are running at all times, if a service is
> down, the routes that direct messages to it must also be brought down to
> stop messages from being accepted and going nowhere. A simple example would
> be:
> 
> HTTP POST -->  Translator Service --> Database
> 
> If the translator service is brought offline, the HTTP listener and database
> resources should be brought down as well.
>  
> My first thought was to:
> 1. Creating a bundle with just an "empty" camel context. 
> 2. Registering my service using iPOJO in a separate bundle
> 3. Creating a separate bundle that has a route written in Java DSL that uses
> the context from (1) and the service from (2) 
> 
> The idea is to have a central engine that routes can "register" themselves
> to.  Since I'm working with embedded devices, if a particular sub-system
> isn't needed, I'd like to shut it down, which means the routes that would
> send messages to those services would need to be shut down as well.  I guess
> this could also be accomplished by creating an independent camel context for
> every route, but this seems like it would incur extra overhead.
> 
> My OSGi container is essentially a "clean" install of Karaf, so I do have
> the Spring Deployer at my disposal, but not Spring DM.  It is not clear to
> me which features are used by which parts of a camel project  
>  
> Some questions:
> - How do I create the camel content and export it to be picked up by the
> routing bundle. Is this done automatically? 
> - Do I need Spring DM to use the <osgi:service> elements?
> - Do I need Spring DM to use the .beanRef() camel routing?  
> - If I have OSGi services defined with iPOJO, how do I access them from a
> camel route?  
> 
> If there is a better way to accomplish the goal, I'm open to suggestions. 
> -p
> 
> 
> cmoulliard wrote:
>> Hi Peter,
>>
>> Can you precise what you understand by 'without spring' ? without
>> spring configuration file, without Spring DM services, ...
>>
>> Camel routes can be defined using Java DSL language and deployed as a
>> bundle top of Apache Felix Karaf. There is an example here :
>> https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms
>>
>> A camel-blueprint component is under construction :
>> https://svn.apache.org/repos/asf/camel/trunk/components/camel-blueprint
>>
>> remark : Blueprint = OSGI RI of Spring DM service
>>
>> Regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>> twitter : http://twitter.com/cmoulliard
>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>> Apache Camel Group :
>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>
>> ....
>>
>> -----
>> Charles Moulliard
>> SOA Architect
>>
>> My Blog : http://cmoulliard.blogspot.com/  
>>
> 


Re: Using Camel with Felix (Karaf) without Spring

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Peter,

Interesting design that you propose here.

> - How do I create the camel content and export it to be picked up by the
> routing bundle. Is this done automatically?

The camel-spring-osgi component allow to automatically register the
camelContext and made it available for other bunldes.

The existing implementation of camel top of an OSGI server (Apache
Felix Karaf, Apache ServiceMix 4) depends on Spring Dynamic Module
(spring DM). Why : This project initiated some months ago by Spring
offer the advantage to register objects dynamically in the OSGI
service registry. In consequence, those objects (including the
camelContext) are available by other bundles of the OSGI platform.

This is why when you deploy camel on osgi platform, the following
bundles must be deployed :

  <feature name="camel-spring-osgi" version="2.1-SNAPSHOT">
    <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
    <feature version="2.5.6.SEC01">spring</feature>
    <feature version="1.2.0">spring-dm</feature> // Spring Dynamic Module
    <bundle>mvn:org.springframework/spring-tx/2.5.6.SEC01</bundle>
    <feature version="2.1-SNAPSHOT">camel-core</feature>
    <bundle>mvn:org.apache.camel/camel-spring-osgi/2.1-SNAPSHOT</bundle>
  </feature>

This situation will change in the future. The last OSGI specification
R4.2 includes a Blueprint Container Specification (based on Spring DM
work) (see page 121 of OSGI R4.2 specification) and a blueprint
implementation is already available
(http://svn.apache.org/repos/asf/incubator/aries/trunk/blueprint). A
camel-blueprint component is currently developed
(https://svn.apache.org/repos/asf/camel/trunk/components/camel-blueprint).

In consequence, it will be possible in a near future to use blueprint
as "Dynamic Service layer" for Camel

> - Do I need Spring DM to use the <osgi:service> elements?

Yes

> - Do I need Spring DM to use the .beanRef() camel routing?

No

> - If I have OSGi services defined with iPOJO, how do I access them from a
> camel route?

You don't need to use iPOJO. You can create your POJOs, package them
in one or several bundles and use them in your camel route like this :


Rema

> If there is a better way to accomplish the goal, I'm open to suggestions.


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm



On Wed, Nov 25, 2009 at 8:29 PM, Pete Mueller <pe...@routecloud.com> wrote:
>
> Hello Charles,
>
> I should have been more specific.  Yes, I meant without Spring DM.  What I
> am attempting  is to create a system that has X number of services
> registered, but not all services are running at all times, if a service is
> down, the routes that direct messages to it must also be brought down to
> stop messages from being accepted and going nowhere. A simple example would
> be:
>
> HTTP POST -->  Translator Service --> Database
>
> If the translator service is brought offline, the HTTP listener and database
> resources should be brought down as well.
>
> My first thought was to:
> 1. Creating a bundle with just an "empty" camel context.
> 2. Registering my service using iPOJO in a separate bundle
> 3. Creating a separate bundle that has a route written in Java DSL that uses
> the context from (1) and the service from (2)
>
> The idea is to have a central engine that routes can "register" themselves
> to.  Since I'm working with embedded devices, if a particular sub-system
> isn't needed, I'd like to shut it down, which means the routes that would
> send messages to those services would need to be shut down as well.  I guess
> this could also be accomplished by creating an independent camel context for
> every route, but this seems like it would incur extra overhead.
>
> My OSGi container is essentially a "clean" install of Karaf, so I do have
> the Spring Deployer at my disposal, but not Spring DM.  It is not clear to
> me which features are used by which parts of a camel project
>
> Some questions:
> - How do I create the camel content and export it to be picked up by the
> routing bundle. Is this done automatically?
> - Do I need Spring DM to use the <osgi:service> elements?
> - Do I need Spring DM to use the .beanRef() camel routing?
> - If I have OSGi services defined with iPOJO, how do I access them from a
> camel route?
>
> If there is a better way to accomplish the goal, I'm open to suggestions.
> -p
>
>
> cmoulliard wrote:
>>
>> Hi Peter,
>>
>> Can you precise what you understand by 'without spring' ? without
>> spring configuration file, without Spring DM services, ...
>>
>> Camel routes can be defined using Java DSL language and deployed as a
>> bundle top of Apache Felix Karaf. There is an example here :
>> https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms
>>
>> A camel-blueprint component is under construction :
>> https://svn.apache.org/repos/asf/camel/trunk/components/camel-blueprint
>>
>> remark : Blueprint = OSGI RI of Spring DM service
>>
>> Regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>> twitter : http://twitter.com/cmoulliard
>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>> Apache Camel Group :
>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>
>> ....
>>
>> -----
>> Charles Moulliard
>> SOA Architect
>>
>> My Blog : http://cmoulliard.blogspot.com/
>>
>
> --
> View this message in context: http://old.nabble.com/Using-Camel-with-Felix-%28Karaf%29-without-Spring-tp26511153p26518850.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Re: Using Camel with Felix (Karaf) without Spring

Posted by Gert Vanthienen <ge...@gmail.com>.
Charles, Peter,

Given that you can also create a CamelContext from within a simple
main() method and run routes that way, it should be possible to build
a solution that does not require spring-dm.  I think we should be able
to build a simple Activator that is capable of tracking all
RoutesBuilder implementations in the service registry and start those
routes in a shared CamelContext.  This would only require the standard
OSGi Activator and ServiceTracker.

For the dynamic disabling of routes, we can probably reuse the same
mechanism for stopping the route if the RoutesBuilder implementation
gets unregistered.  Not sure how we could deal with services that are
in other bundles, but perhaps the bundle that registers the builder
can itself track the requirements and unregister the routesbuilder as
soon as the requirements are no longer met.

Anyway, I think it's a very interesting use case -- I think it would
be kind of cool if we can also deploy Camel in this kind of embedded
environment.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/11/26 Charles Moulliard <cm...@gmail.com>:
> Hi Peter,
>
> Interesting design that you propose here.
>
>> - How do I create the camel content and export it to be picked up by the
>> routing bundle. Is this done automatically?
>
> The camel-spring-osgi component allow to automatically register the
> camelContext and made it available for other bunldes.
>
> The existing implementation of camel top of an OSGI server (Apache
> Felix Karaf, Apache ServiceMix 4) depends on Spring Dynamic Module
> (spring DM). Why : This project initiated some months ago by Spring
> offer the advantage to register objects dynamically in the OSGI
> service registry. In consequence, those objects (including the
> camelContext) are available by other bundles of the OSGI platform.
>
> This is why when you deploy camel on osgi platform, the following
> bundles must be deployed :
>
>  <feature name="camel-spring-osgi" version="2.1-SNAPSHOT">
>   <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
>   <feature version="2.5.6.SEC01">spring</feature>
>   <feature version="1.2.0">spring-dm</feature> // Spring Dynamic Module
>   <bundle>mvn:org.springframework/spring-tx/2.5.6.SEC01</bundle>
>   <feature version="2.1-SNAPSHOT">camel-core</feature>
>   <bundle>mvn:org.apache.camel/camel-spring-osgi/2.1-SNAPSHOT</bundle>
>  </feature>
>
> This situation will change in the future. The last OSGI specification
> R4.2 includes a Blueprint Container Specification (based on Spring DM
> work) (see page 121 of OSGI R4.2 specification) and a blueprint
> implementation is already available
> (http://svn.apache.org/repos/asf/incubator/aries/trunk/blueprint). A
> camel-blueprint component is currently developed
> (https://svn.apache.org/repos/asf/camel/trunk/components/camel-blueprint).
>
> In consequence, it will be possible in a near future to use blueprint
> as "Dynamic Service layer" for Camel
>
>> - Do I need Spring DM to use the <osgi:service> elements?
>
> Yes
>
>> - Do I need Spring DM to use the .beanRef() camel routing?
>
> No
>
>> - If I have OSGi services defined with iPOJO, how do I access them from a
>> camel route?
>
> You don't need to use iPOJO. You can create your POJOs, package them
> in one or several bundles and use them in your camel route like this :
>
> In your Spring config file
>
> <from/>
> <to uri="bean ref="example"/>
> <to />
>
> <bean id="example" class="org.apache.camel.example.MyTest"/>
>
>
> Remark : Don't forget to import the packages names of your POJOS in
> the manifest file of your camel bundle
>
>> If there is a better way to accomplish the goal, I'm open to suggestions.
>
> The question is : How a service which is down will inform the camel
> routes where it is used that the route must be stopped ? What is a
> down service (a bundle, a web application, a database, ...) ?
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>
>
>
> On Wed, Nov 25, 2009 at 8:29 PM, Pete Mueller <pe...@routecloud.com> wrote:
>>
>> Hello Charles,
>>
>> I should have been more specific.  Yes, I meant without Spring DM.  What I
>> am attempting  is to create a system that has X number of services
>> registered, but not all services are running at all times, if a service is
>> down, the routes that direct messages to it must also be brought down to
>> stop messages from being accepted and going nowhere. A simple example would
>> be:
>>
>> HTTP POST -->  Translator Service --> Database
>>
>> If the translator service is brought offline, the HTTP listener and database
>> resources should be brought down as well.
>>
>> My first thought was to:
>> 1. Creating a bundle with just an "empty" camel context.
>> 2. Registering my service using iPOJO in a separate bundle
>> 3. Creating a separate bundle that has a route written in Java DSL that uses
>> the context from (1) and the service from (2)
>>
>> The idea is to have a central engine that routes can "register" themselves
>> to.  Since I'm working with embedded devices, if a particular sub-system
>> isn't needed, I'd like to shut it down, which means the routes that would
>> send messages to those services would need to be shut down as well.  I guess
>> this could also be accomplished by creating an independent camel context for
>> every route, but this seems like it would incur extra overhead.
>>
>> My OSGi container is essentially a "clean" install of Karaf, so I do have
>> the Spring Deployer at my disposal, but not Spring DM.  It is not clear to
>> me which features are used by which parts of a camel project
>>
>> Some questions:
>> - How do I create the camel content and export it to be picked up by the
>> routing bundle. Is this done automatically?
>> - Do I need Spring DM to use the <osgi:service> elements?
>> - Do I need Spring DM to use the .beanRef() camel routing?
>> - If I have OSGi services defined with iPOJO, how do I access them from a
>> camel route?
>>
>> If there is a better way to accomplish the goal, I'm open to suggestions.
>> -p
>>
>>
>> cmoulliard wrote:
>>>
>>> Hi Peter,
>>>
>>> Can you precise what you understand by 'without spring' ? without
>>> spring configuration file, without Spring DM services, ...
>>>
>>> Camel routes can be defined using Java DSL language and deployed as a
>>> bundle top of Apache Felix Karaf. There is an example here :
>>> https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms
>>>
>>> A camel-blueprint component is under construction :
>>> https://svn.apache.org/repos/asf/camel/trunk/components/camel-blueprint
>>>
>>> remark : Blueprint = OSGI RI of Spring DM service
>>>
>>> Regards,
>>>
>>> Charles Moulliard
>>> Senior Enterprise Architect
>>> Apache Camel Committer
>>>
>>> *****************************
>>> blog : http://cmoulliard.blogspot.com
>>> twitter : http://twitter.com/cmoulliard
>>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>>
>>> Apache Camel Group :
>>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>>
>>> ....
>>>
>>> -----
>>> Charles Moulliard
>>> SOA Architect
>>>
>>> My Blog : http://cmoulliard.blogspot.com/
>>>
>>
>> --
>> View this message in context: http://old.nabble.com/Using-Camel-with-Felix-%28Karaf%29-without-Spring-tp26511153p26518850.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>

Re: Using Camel with Felix (Karaf) without Spring

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Peter,

Interesting design that you propose here.

> - How do I create the camel content and export it to be picked up by the
> routing bundle. Is this done automatically?

The camel-spring-osgi component allow to automatically register the
camelContext and made it available for other bunldes.

The existing implementation of camel top of an OSGI server (Apache
Felix Karaf, Apache ServiceMix 4) depends on Spring Dynamic Module
(spring DM). Why : This project initiated some months ago by Spring
offer the advantage to register objects dynamically in the OSGI
service registry. In consequence, those objects (including the
camelContext) are available by other bundles of the OSGI platform.

This is why when you deploy camel on osgi platform, the following
bundles must be deployed :

 <feature name="camel-spring-osgi" version="2.1-SNAPSHOT">
   <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
   <feature version="2.5.6.SEC01">spring</feature>
   <feature version="1.2.0">spring-dm</feature> // Spring Dynamic Module
   <bundle>mvn:org.springframework/spring-tx/2.5.6.SEC01</bundle>
   <feature version="2.1-SNAPSHOT">camel-core</feature>
   <bundle>mvn:org.apache.camel/camel-spring-osgi/2.1-SNAPSHOT</bundle>
 </feature>

This situation will change in the future. The last OSGI specification
R4.2 includes a Blueprint Container Specification (based on Spring DM
work) (see page 121 of OSGI R4.2 specification) and a blueprint
implementation is already available
(http://svn.apache.org/repos/asf/incubator/aries/trunk/blueprint). A
camel-blueprint component is currently developed
(https://svn.apache.org/repos/asf/camel/trunk/components/camel-blueprint).

In consequence, it will be possible in a near future to use blueprint
as "Dynamic Service layer" for Camel

> - Do I need Spring DM to use the <osgi:service> elements?

Yes

> - Do I need Spring DM to use the .beanRef() camel routing?

No

> - If I have OSGi services defined with iPOJO, how do I access them from a
> camel route?

You don't need to use iPOJO. You can create your POJOs, package them
in one or several bundles and use them in your camel route like this :

In your Spring config file

<from/>
<to uri="bean ref="example"/>
<to />

<bean id="example" class="org.apache.camel.example.MyTest"/>


Remark : Don't forget to import the packages names of your POJOS in
the manifest file of your camel bundle

> If there is a better way to accomplish the goal, I'm open to suggestions.

The question is : How a service which is down will inform the camel
routes where it is used that the route must be stopped ? What is a
down service (a bundle, a web application, a database, ...) ?

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm



On Wed, Nov 25, 2009 at 8:29 PM, Pete Mueller <pe...@routecloud.com> wrote:
>
> Hello Charles,
>
> I should have been more specific.  Yes, I meant without Spring DM.  What I
> am attempting  is to create a system that has X number of services
> registered, but not all services are running at all times, if a service is
> down, the routes that direct messages to it must also be brought down to
> stop messages from being accepted and going nowhere. A simple example would
> be:
>
> HTTP POST -->  Translator Service --> Database
>
> If the translator service is brought offline, the HTTP listener and database
> resources should be brought down as well.
>
> My first thought was to:
> 1. Creating a bundle with just an "empty" camel context.
> 2. Registering my service using iPOJO in a separate bundle
> 3. Creating a separate bundle that has a route written in Java DSL that uses
> the context from (1) and the service from (2)
>
> The idea is to have a central engine that routes can "register" themselves
> to.  Since I'm working with embedded devices, if a particular sub-system
> isn't needed, I'd like to shut it down, which means the routes that would
> send messages to those services would need to be shut down as well.  I guess
> this could also be accomplished by creating an independent camel context for
> every route, but this seems like it would incur extra overhead.
>
> My OSGi container is essentially a "clean" install of Karaf, so I do have
> the Spring Deployer at my disposal, but not Spring DM.  It is not clear to
> me which features are used by which parts of a camel project
>
> Some questions:
> - How do I create the camel content and export it to be picked up by the
> routing bundle. Is this done automatically?
> - Do I need Spring DM to use the <osgi:service> elements?
> - Do I need Spring DM to use the .beanRef() camel routing?
> - If I have OSGi services defined with iPOJO, how do I access them from a
> camel route?
>
> If there is a better way to accomplish the goal, I'm open to suggestions.
> -p
>
>
> cmoulliard wrote:
>>
>> Hi Peter,
>>
>> Can you precise what you understand by 'without spring' ? without
>> spring configuration file, without Spring DM services, ...
>>
>> Camel routes can be defined using Java DSL language and deployed as a
>> bundle top of Apache Felix Karaf. There is an example here :
>> https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms
>>
>> A camel-blueprint component is under construction :
>> https://svn.apache.org/repos/asf/camel/trunk/components/camel-blueprint
>>
>> remark : Blueprint = OSGI RI of Spring DM service
>>
>> Regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>> twitter : http://twitter.com/cmoulliard
>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>> Apache Camel Group :
>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>
>> ....
>>
>> -----
>> Charles Moulliard
>> SOA Architect
>>
>> My Blog : http://cmoulliard.blogspot.com/
>>
>
> --
> View this message in context: http://old.nabble.com/Using-Camel-with-Felix-%28Karaf%29-without-Spring-tp26511153p26518850.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Re: Using Camel with Felix (Karaf) without Spring

Posted by Pete Mueller <pe...@routecloud.com>.
Hello Charles,

I should have been more specific.  Yes, I meant without Spring DM.  What I
am attempting  is to create a system that has X number of services
registered, but not all services are running at all times, if a service is
down, the routes that direct messages to it must also be brought down to
stop messages from being accepted and going nowhere. A simple example would
be:

HTTP POST -->  Translator Service --> Database

If the translator service is brought offline, the HTTP listener and database
resources should be brought down as well.
 
My first thought was to:
1. Creating a bundle with just an "empty" camel context. 
2. Registering my service using iPOJO in a separate bundle
3. Creating a separate bundle that has a route written in Java DSL that uses
the context from (1) and the service from (2) 

The idea is to have a central engine that routes can "register" themselves
to.  Since I'm working with embedded devices, if a particular sub-system
isn't needed, I'd like to shut it down, which means the routes that would
send messages to those services would need to be shut down as well.  I guess
this could also be accomplished by creating an independent camel context for
every route, but this seems like it would incur extra overhead.

My OSGi container is essentially a "clean" install of Karaf, so I do have
the Spring Deployer at my disposal, but not Spring DM.  It is not clear to
me which features are used by which parts of a camel project  
 
Some questions:
- How do I create the camel content and export it to be picked up by the
routing bundle. Is this done automatically? 
- Do I need Spring DM to use the <osgi:service> elements?
- Do I need Spring DM to use the .beanRef() camel routing?  
- If I have OSGi services defined with iPOJO, how do I access them from a
camel route?  

If there is a better way to accomplish the goal, I'm open to suggestions. 
-p


cmoulliard wrote:
> 
> Hi Peter,
> 
> Can you precise what you understand by 'without spring' ? without
> spring configuration file, without Spring DM services, ...
> 
> Camel routes can be defined using Java DSL language and deployed as a
> bundle top of Apache Felix Karaf. There is an example here :
> https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms
> 
> A camel-blueprint component is under construction :
> https://svn.apache.org/repos/asf/camel/trunk/components/camel-blueprint
> 
> remark : Blueprint = OSGI RI of Spring DM service
> 
> Regards,
> 
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
> 
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
> 
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
> 
> ....
> 
> -----
> Charles Moulliard
> SOA Architect
> 
> My Blog : http://cmoulliard.blogspot.com/  
> 

-- 
View this message in context: http://old.nabble.com/Using-Camel-with-Felix-%28Karaf%29-without-Spring-tp26511153p26518850.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using Camel with Felix (Karaf) without Spring

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Peter,

Can you precise what you understand by 'without spring' ? without
spring configuration file, without Spring DM services, ...

Camel routes can be defined using Java DSL language and deployed as a
bundle top of Apache Felix Karaf. There is an example here :
https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms

A camel-blueprint component is under construction :
https://svn.apache.org/repos/asf/camel/trunk/components/camel-blueprint

remark : Blueprint = OSGI RI of Spring DM service

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm



On Wed, Nov 25, 2009 at 12:28 PM, Pete Mueller <pe...@routecloud.com> wrote:
>
> Hello all,
>
> I was wondering if anyone has some tips or an example of using Camel and
> OSGi without using Spring.  Our project uses Apache Felix (Karaf actually)
> on an embedded device, as such the size and performance of Spring is
> unattractive.
>
> We have created various services using iPOJO and are looking for a way to
> "glue" them all together with Camel. I was hoping to just load camel-core
> and only the endpoint we use to keep the size minimal.
>
> Any help would be appreciated
> -p
> --
> View this message in context: http://old.nabble.com/Using-Camel-with-Felix-%28Karaf%29-without-Spring-tp26511153p26511153.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>