title: OSGi Declarative Service - obtain ServiceReference in bind method
body: <p>I'm using Eclipse 3.7 with Eclipse Gemini JPA / DBAccess. I implemented a declarative ServiceComponent which references EntityManagerBuilderFactory. The bind method looks like this:</p>
  
  <pre><code>public void bindEntityManagerFactoryBuilder(EntityManagerFactoryBuilder emfBuilder) {
      emfFactoryBuilders.add(emfBuilder);
  }
  </code></pre>
  
  <p>However I need the ServiceReference to obtain the properties of this service, like:</p>
  
  <pre><code>    ServiceReference ref = ...
      String unitName = (String)ref.getProperty(EntityManagerFactoryBuilder.JPA_UNIT_NAME);
  </code></pre>
  
  <p>Do I have to search the ServiceRegistry for this ServiceReference, or is there a more elegant approach?</p>
  
  <p>cheers,
  Muki</p>