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:
public void bindEntityManagerFactoryBuilder(EntityManagerFactoryBuilder emfBuilder) {
emfFactoryBuilders.add(emfBuilder);
}
However I need the ServiceReference to obtain the properties of this service, like:
ServiceReference ref = ...
String unitName = (String)ref.getProperty(EntityManagerFactoryBuilder.JPA_UNIT_NAME);
Do I have to search the ServiceRegistry for this ServiceReference, or is there a more elegant approach?
cheers, Muki