I did something similar...I used a "manager" service to create multiple services for the same interface. The manager kept a reference to each service that it created so it could deactivate them as needed.
http://dev.day.com/docs/en/cq/current/developing/jmx-integration.html#Example: Monitoring Workflow Models Using JMX
I'm interested to hear what others have done too.
Gah, I guess I should have specified. I'm on CQ5.4, so I don't have JMX available to me. That documentation seems like I will need that, though I admit my knowledge of JMX is fairly limited.
Hi Ryan. You can do this by specifying the cardinality and policy attributes of the @Reference annotation and providing bind and unbind methods. For example, take a look at http://svn.apache.org/repos/asf/sling/trunk/bundles/servlets/post/src/main/java/org/apache /sling/servlets/post/impl/SlingPostServlet.java
As an alternative, you could use a ServiceTracker.
Perfect - that worked! Thanks Justin.