Hi Camel works the best in Apache Karaf as its OSGi container. That is what we use for development and testing.
There may be some caveats and issues running in Eclipse Virgo. If it does not matter for you which osgi container, then I suggest to use Apache Karaf On Wed, Feb 12, 2014 at 1:47 PM, franck102 <franckman...@fico.com> wrote: > I am trying to use Camel 2.12. in a Virgo server, using spring/OSGI since > Virgo's blueprint is based on Gemini. > > The context.xml file below sucessfully starts a camel context... however > breaking in the code shows that I am instantiating a SpringCamelContext > rather than a org.apache.camel.core.osgi.OsgiDefaultCamelContext. > > It looks like I want the org.apache.camel.osgi.CamelContextFactoryBean to > create my camel context, but I just can't figure out how to tell Spring to > use that factory. I have read hundreds of posts about camel, spring & OSGI > and I just can't figure this out, any help would be greatly appreciated! > > I am using maven and having dependencies on camel-core and camel-spring. > It looks like osgi support has been embedded into camel-spring, and so I > should not need or want dependencies on camel-core-osgi or camel-osgi? > > > <?xml version="1.0" encoding="UTF-8"?> > > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-3.0.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd"> > > <camelContext id="ModelCentralCamelContext" > xmlns="http://camel.apache.org/schema/spring"> > <endpoint id="mcedits" uri="seda:mcedits?multipleConsumers=true"/> > > <route> > <from ref="mcedits"/> > <to uri="log:ExampleRouter"/> > </route> > <route> > <from ref="mcedits"/> > <to uri="file:${mcentral-distrib}/eai/mcedits"/> > </route> > </camelContext> > > <bean class="com.fico.modelcentral.eai.context.MCEditProducer"/> > </beans> > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Confused-with-Camel-in-Spring-OSGI-tp5747186.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com 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