Oh! Thank you very much!

>Суббота, 18 июля 2015, 19:18 +02:00 от peter.kri...@aqute.biz:
>
>http://enroute.osgi.org/services/org.osgi.service.component.html
>
>
>Sent from my iPhone
>
>> On 18 Jul 2015, at 19:01, Alex Sviridov < ooo_satu...@mail.ru > wrote:
>> 
>> Thank you for your answer. Could you provide an example on my example - as 
>> all is in development process and I can find old information.
>> 
>> I am sure that the example will be very short but we will understand what 
>> you mean at 100%.
>> 
>> 
>>> Суббота, 18 июля 2015, 17:02 +01:00 от Neil Bartlett < njbartl...@gmail.com 
>>> >:
>>> 
>>> Hi Alex, you can use the @Reference annotation. 
>>> 
>>> Neil
>>> 
>>>> On Saturday, 18 July 2015 at 13:46, Alex Sviridov wrote:
>>>> I use org.apache.felix.framework-4.6.1.jar and a bundle 
>>>> org.apache.felix.scr-1.8.3-SNAPSHOT.jar
>>>> 
>>>> And I have two bundles - bundleA and bundleB. => totally I have three 
>>>> bundles (A,B,scr)
>>>> 
>>>> And in every bundle I have one declarative service. For creating DS I use 
>>>> annotations + maven bundle plugin.
>>>> 
>>>> How can I use connect one service to another other using DS annotations + 
>>>> maven bundle plugin. I mean:
>>>> 
>>>> BundleA   
>>>> #############################################################################################
>>>> import org.osgi.service.component.annotations.Component;
>>>> import org.osgi.service.component.annotations.ServiceScope;
>>>> 
>>>> @Component(
>>>>     immediate = false,
>>>>     property={"label=defaultA"},
>>>>      scope=ServiceScope.PROTOTYPE
>>>> )
>>>> public class ClassA implements InterfaceA{
>>>> ......
>>>> }
>>>> 
>>>> BundleB   
>>>> #############################################################################################
>>>> import org.osgi.service.component.annotations.Component;
>>>> import org.osgi.service.component.annotations.ServiceScope;
>>>> 
>>>> @Component(
>>>>     immediate = false,
>>>>     property={"label=defaultB"},
>>>>      scope=ServiceScope.PROTOTYPE
>>>> )
>>>> public class ClassB implements InterfaceB{
>>>> 
>>>>    private InterfaceA aService; // HOW CAN I MAKE OSGI "INJECT" HERE 
>>>> SERVICE A WITH LABEL=DEFAULTA???
>>>>   .....
>>>> }
>>>> 
>>>> 
>>>> 
>>>> -- 
>>>> Alex Sviridov
>> 
>> 
>> -- 
>> Alex Sviridov
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail:  users-unsubscr...@felix.apache.org
>For additional commands, e-mail:  users-h...@felix.apache.org
>


-- 
Alex Sviridov

Reply via email to