felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Zhirkov ...@develdynamic.com>
Subject Getting a reference to a declarative service
Date Tue, 20 Jan 2015 10:53:19 GMT

I want to include more than one service into a bundle, so it seems like 
I have to make a use of declarative services.

I'm building a test bundle with maven + maven-bundle-plugin and 
generating the ds descriptor with maven-scr-plugin, so it looks like this:

<?xml version="1.0" encoding="UTF-8"?><components 
     <scr:component name="ru.multicabinet.gateway.ExampleDS">
         <implementation class="ru.multicabinet.gateway.ExampleDS"/>
         <service servicefactory="false">
             <provide interface="ru.multicabinet.gateway.SimpleI"/>
         <property name="service.pid" 

After installing the test bundle into my osgi container I'm trying to 
get a list of all services in the test bundle by calling 
bundle.getRegisteredServices(), but it'd always return null.

What I'm doing wrong? Maybe  I should use ServiceTracker to obtain a 
reference to ds service?


To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

View raw message