title: How to get osgi service by id with Spring?
body: <p>Spring noob here.</p>
  
  <p>I have an osgi service defined as follows in one of my bundles:</p>
  
  <pre><code>&lt;osgi:service id="myModelInterpreter" ref="myModelInterpreterService" interface="*.IModelInterpreter" /&gt;
  </code></pre>
  
  <p>I know I can access it from another bundle via the <a href="http://www.knopflerfish.org/releases/current/docs/javadoc/org/osgi/framework/BundleContext.html" rel="nofollow"><code>BundleContext</code></a> doing <code>getServiceReference</code> (passing down <code>IModelInterpreter.class.getName</code>) and then <code>getService</code>.</p>
  
  <p>Is there a way to get the service via the id (myModelInterpreter) instead of using the Interface (passed down as <code>IModelInterpreter.class.getName</code> to <code>getServiceReference</code>)?</p>
  
  <p>Any help appreciated.</p>