[ 
https://issues.apache.org/jira/browse/ARIES-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15797996#comment-15797996
 ] 

Timothy Ward commented on ARIES-1648:
-------------------------------------

The uses attributes are necessary for the resolver to do the correct wiring, 
even outside the framework uses constraints can ensure useful things. For 
example they can make sure that you don't end up with a second Aries JPA 
container which isn't in the same class space as the JPA provider!

> Aries JPA does not advertise EntityManagerFactoryBuilder or 
> EntityManagerFactory services
> -----------------------------------------------------------------------------------------
>
>                 Key: ARIES-1648
>                 URL: https://issues.apache.org/jira/browse/ARIES-1648
>             Project: Aries
>          Issue Type: Bug
>          Components: JPA
>    Affects Versions: jpa-2.5.0
>            Reporter: Timothy Ward
>            Assignee: Christian Schneider
>             Fix For: jpa-2.6.0
>
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to