title: How to construct an OSGi service with dependencies and publish via DS
body: <p>My sample classes:</p>
  
  <pre><code>public class MyModel implements Model
  {
      :
      :
  }
  
  public class SingleModelProvider implements ModelProvider
  {
      public SingleModelProvider(Model providedModel, List actions)
      {
            :
      }
  }
  </code></pre>
  
  <p>The plan is to reuse the SingleModelProvider class in several bundles to provide different implementations of the ModelProvider.  What I need to accomplish in each bundle is to simply instantiate the SingleModelProvider with the appropriate parameters to the constructor.  A pretty simple scenario using any DI framework.  I would like to register the ModelProvider services using DS (Declarative Services) if possible without having to write the boilerplate code in an Activator.  </p>
  
  <p>Is this possible?</p>
  
  <p>I can't seem to find any documentation on how to accomplish this since the class declaration in DS does not seem to allow for constructor arguments (or setters for that matter).</p>
  
  <p>Do I use a factory?  I am not sure if that is worthwhile since it may make the case no simpler than using an Activator and publishing service manually.</p>