Hello,
Coming back again to get light!
I have a bundle of questions regarding DS.
How do you use a service without being yourself a service?
I understand that each service is managed by the scr and so need to be
activated at a time. If I have a class that need to do a reference to a
service but that I want to control instantiation, is this possible to
instantiate a service on demand (newInstance?) ?
How do you manage to deal with multiple instances of a service?
For example:
class dummy {
@Reference
private Service service1
@Reference
private Service service2
}
How to get service1 and service2 referring to 2 different classes?
How can we do this kind of idea (Completely false!!!):
@Component
class dummy {
@Reference
private Service service1 = new Service(); <= only the principle :)
@Reference
private Service service2 = new Service(); <= only the principle :)
}
Thanks.
--
View this message in context:
http://karaf.922171.n3.nabble.com/Multiple-bundles-dependencies-injection-pax-cdi-or-blueprint-tp4049756p4049937.html
Sent from the Karaf - User mailing list archive at Nabble.com.