Description
The Aries JPA container provides an extender for persistence bundles. This extender results in the registration of EntityManagerFactory and/or EntityManagerFactoryBuilder services. These services are then used by clients to make use of JPA.
The problem is that there are no capabilities advertising this feature. Ideally there would be a Provide-Capability added automatically to every persistence bundle, but this is true for few, if any, persistence bundles, and also most persistence bundles do not make use of the org.osgi.service.jpa package, making the uses constraint impossible to apply.
Therefore the Provide Capability header should go on the Aries JPA container:
Provide-Capability: osgi.service;objectClass=javax.persistence.EntityManagerFactory;effective:=active;uses:=javax.persistence,osgi.service;objectClass=org.osgi.service.jpa.EntityManagerFactoryBuilder;effective:=active";uses:=org.osgi.service.jpa