Yes, ServiceReference is also a MetaInfoHolder. And you can inject services in four dfferent ways (I think);
@Service MyService service; @Service List<MyService> services; @Service ServiceReference<MyService> service; @Service List<ServiceReference<MyService>> services; (not using @This) and they behave pretty much as expected. I can't remember if it is possible to pass a ServiceReference to Qi4j.getServiceDescriptor(), but wouldn't surprise me if it is possible. Cheers Niclas On Sat, Oct 13, 2012 at 8:14 AM, Stanislav Muhametsin <[email protected]> wrote: > Quoting Niclas Hedhman <[email protected]>: > >> You retrieve the XyzDescriptor from the Qi4j interface and you have >> metaInfo() on the descriptor returned. >> >> Cheers >> Niclas > > > Ahh, I see. What if this composite is a service? Do I need to use this > module's find service method? That is, to get the access to meta info > container through service reference. Or is it possible to do > > @This ServiceReference<MyService> _meAsRef; > > in case there are multiple services in the module of the same type but with > different id? > > > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev -- Niclas Hedhman, Software Developer 河南南路555弄15号1901室。 http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/3xugrbk I work here; http://tinyurl.com/6a2pl4j I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

