I'm not in any way an expert on CDI, but are you sure that the beans.xml file 
to which you had recourse isn't just the (normally needed) CDI beans.xml file?

https://docs.oracle.com/javaee/6/tutorial/doc/gjbnz.html

---
A. Soroka
The University of Virginia Library



> On Mar 16, 2017, at 12:11 PM, Bob Blackard <black...@omniprise.com> wrote:
> 
> Howdy all.
> 
> I've been struggling with pax-cdi/camel-cdi trying to get a RouteBuilder to 
> trigger when the bundle is loaded.  I had tried creating my own project based 
> on the camel-example-cdi-osgi which uses pax-cdi, pax-cdi-weld and 
> camel-osgi.  Problem was, I missed the META-INF/beans.xml document, which 
> contains nothing more than <beans/>.
> 
> Without that document, I could see CDI wiring itself up, but my RouteBuilder 
> wasn't getting triggered.  When I added that document, my RouteBuilder got 
> triggered.
> 
> This implies that the CDI initiator is bound, somehow, to the Spring 
> initiator.
> 
> I tried switching the META-INF/beans.xml to an 
> OSGI-INF/blueprint/blueprint.xml, containing nothing more than <blueprint 
> xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"/>, but that didn't cause 
> my RouteBuilder to get triggered.
> 
> I generally avoid Spring when working with OSGi since, in my experience at 
> least, it doesn't play well due to classloader issues.  So, I'm left with 
> lots of questions.
> 
> Blueprint
> -------------
> Is there a way to use pax-cdi with a Blueprint initiator rather than a Spring 
> initiator?
> 
> Spring
> ---------
> Are my concerns about Spring on OSGi unfounded?  Have the classloader/wiring 
> issues that I experienced with Spring in OSGi in the past been resolved?  Is 
> that why so many people seem to be pushing Spring over Blueprint these days, 
> even though Blueprint is build to support the OSGi classloader/wiring model?  
> Is there now an OSGi-enabled classloader for Spring?
> 
> Thanks
> Bob
> 
> 
> 
> -- 
> -- 
> ------------------
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to