Hi "iJava",

I asked myself the same question this week and looked at the source code of 
PAX-CDI. The AbstractCdiContainer 
<https://github.com/ops4j/org.ops4j.pax.cdi/blob/master/pax-cdi-spi/src/main/java/org/ops4j/pax/cdi/spi/AbstractCdiContainer.java>seems
 
to register the CDI BeanManager as an OSGi-Service with bundleId/symbolicName 
properties (scroll down to the end of the source file). So you should be 
able to look up the BeanManager for your CDI bundles.

However, I haven't tried this yet myself, someone else may give you a 
better answer.

Regards
Martin

On Wednesday, August 10, 2016 at 12:53:14 PM UTC+2, iJava wrote:
>
> There is a bundle A and threre is class MyClass in bundle A.
>
> We suppose that pax-cdi+weld is on.
>
> Can can I get reference to BeanManager of the bundle A inside MyClass 
> without using @Inject and other CDI annotations? 
> Via osgi service? Or how?
>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to