Guys, what's the standard approach for registering a DS component/OSGi service in response to a service appearing in the container? Is ServiceTracker the way to go? I'm using Declarative Services and would like stick to DS if possible. Explanation of what I'm trying to accomplish below.
I'm using Felix with Gemini JPA which registers EntityManagerFactory as OSGi service per each persistence unit configuration. Since I need to open connections to multiple DBs with the same schema I end up having multiple EntityManagerFactories in the container. I'd like to map them to DAL classes one-by-one. So, assuming I have PersonReposity in DAL I'd like to have as many instances of it as EntityManagerFactories for the given schema. Is SCR able to do it? Cheers, Pawel

