[jira] [Commented] (ARIES-1672) JPA API contract is required

2017-01-27 Thread Christian Schneider (JIRA)

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

Christian Schneider commented on ARIES-1672:


Now I get it. I thought the capability was related to implementing the OSGi JPA 
spec (which jpa container does). I agree the contract namespace needs to be 
added to the spec bundles. I am sure we can do this in geronimo. 


> JPA API contract is required
> 
>
> Key: ARIES-1672
> URL: https://issues.apache.org/jira/browse/ARIES-1672
> Project: Aries
>  Issue Type: Bug
>Reporter: Timothy Ward
>Assignee: Christian Schneider
>
> The OSGi JPA service spec requires the presence of an OSGi contract for the 
> JPA API. This will probably require Aries JPA to package up its own version 
> of the JPA API. Note that this will only be necessary to function as the 
> official RI, and we can still support using other public API bundles.
> Provide-Capability: osgi.contract;osgi.contract=JavaJPA;
> version:List="2.1,2,1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
> We could optionally choose not to support versions 2 or 1.



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


[jira] [Commented] (ARIES-1672) JPA API contract is required

2017-01-27 Thread Timothy Ward (JIRA)

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

Timothy Ward commented on ARIES-1672:
-

{quote} Shouldn't the capability be provided by the implementation bundle 
rather than the API ? I mean, it's like the extender capability to some degree, 
you just don't want it to be available by simply deploying the API bundle, but 
the whole RI.
{quote}

In general it is correct that capabilities should be provided by 
implementations, not by the API, but the contract namespace is a special one 
designed to cope with "non semantically versioned" APIs (e.g. Java EE specs). 
You can see a description of it here: 
https://www.osgi.org/portable-java-contract-definitions/

The contract definition is provided so that users of the API can import it 
reliably without using a version range. That way the  Java EE specs which make 
"major" version bumps can still be used safely (JPA, JAX-RS, Servlet...). The 
contract definitely applies to the API, and therefore should go on the API 
bundle, not the implementation (unless the implementation also exports the 
API). 

> JPA API contract is required
> 
>
> Key: ARIES-1672
> URL: https://issues.apache.org/jira/browse/ARIES-1672
> Project: Aries
>  Issue Type: Bug
>Reporter: Timothy Ward
>Assignee: Christian Schneider
>
> The OSGi JPA service spec requires the presence of an OSGi contract for the 
> JPA API. This will probably require Aries JPA to package up its own version 
> of the JPA API. Note that this will only be necessary to function as the 
> official RI, and we can still support using other public API bundles.
> Provide-Capability: osgi.contract;osgi.contract=JavaJPA;
> version:List="2.1,2,1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
> We could optionally choose not to support versions 2 or 1.



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


[jira] [Commented] (ARIES-1672) JPA API contract is required

2017-01-27 Thread Christian Schneider (JIRA)

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

Christian Schneider commented on ARIES-1672:


Why does the capability have to be on the bundle providing the spec? I would 
put the capability on the jpa container and provide the jpa spec through the 
existing spec bundles.

> JPA API contract is required
> 
>
> Key: ARIES-1672
> URL: https://issues.apache.org/jira/browse/ARIES-1672
> Project: Aries
>  Issue Type: Bug
>Reporter: Timothy Ward
>Assignee: Christian Schneider
>
> The OSGi JPA service spec requires the presence of an OSGi contract for the 
> JPA API. This will probably require Aries JPA to package up its own version 
> of the JPA API. Note that this will only be necessary to function as the 
> official RI, and we can still support using other public API bundles.
> Provide-Capability: osgi.contract;osgi.contract=JavaJPA;
> version:List="2.1,2,1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
> We could optionally choose not to support versions 2 or 1.



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


[jira] [Commented] (ARIES-1672) JPA API contract is required

2017-01-27 Thread Guillaume Nodet (JIRA)

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

Guillaume Nodet commented on ARIES-1672:


Shouldn't the capability be provided by the implementation bundle rather than 
the API ? I mean, it's like the extender capability to some degree, you just 
don't want it to be available by simply deploying the API bundle, but the whole 
RI.

> JPA API contract is required
> 
>
> Key: ARIES-1672
> URL: https://issues.apache.org/jira/browse/ARIES-1672
> Project: Aries
>  Issue Type: Bug
>Reporter: Timothy Ward
>Assignee: Christian Schneider
>
> The OSGi JPA service spec requires the presence of an OSGi contract for the 
> JPA API. This will probably require Aries JPA to package up its own version 
> of the JPA API. Note that this will only be necessary to function as the 
> official RI, and we can still support using other public API bundles.
> Provide-Capability: osgi.contract;osgi.contract=JavaJPA;
> version:List="2.1,2,1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
> We could optionally choose not to support versions 2 or 1.



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


[jira] [Commented] (ARIES-1672) JPA API contract is required

2017-01-27 Thread Timothy Ward (JIRA)

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

Timothy Ward commented on ARIES-1672:
-

The spec bundles do not provide the JPA contract capability. In order to comply 
with the specification the reference implementation must provide this 
capability. This is why I expect that Aries will need to either:

a) Convince the Geronimo team to add the capability to their spec jars

or

b) Repackage the Geronimo Jars with the capability.

The "Reference Implementation" of Aries JPA would then be the spec API jar 
(including the capability) the Aries JPA container, and a JPA provider 
(probably EclipseLink).

Other users are obviously free to use Aries JPA in other ways, for example with 
another JPA provider, or with a different spec API jar that doesn't provide the 
capability.

> JPA API contract is required
> 
>
> Key: ARIES-1672
> URL: https://issues.apache.org/jira/browse/ARIES-1672
> Project: Aries
>  Issue Type: Bug
>Reporter: Timothy Ward
>Assignee: Christian Schneider
>
> The OSGi JPA service spec requires the presence of an OSGi contract for the 
> JPA API. This will probably require Aries JPA to package up its own version 
> of the JPA API. Note that this will only be necessary to function as the 
> official RI, and we can still support using other public API bundles.
> Provide-Capability: osgi.contract;osgi.contract=JavaJPA;
> version:List="2.1,2,1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
> We could optionally choose not to support versions 2 or 1.



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


[jira] [Commented] (ARIES-1672) JPA API contract is required

2017-01-27 Thread Christian Schneider (JIRA)

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

Christian Schneider commented on ARIES-1672:


I am currently not creating the spec bundles. Instead I use existing ones from 
maven central. Is that ok? 

> JPA API contract is required
> 
>
> Key: ARIES-1672
> URL: https://issues.apache.org/jira/browse/ARIES-1672
> Project: Aries
>  Issue Type: Bug
>Reporter: Timothy Ward
>Assignee: Christian Schneider
>
> The OSGi JPA service spec requires the presence of an OSGi contract for the 
> JPA API. This will probably require Aries JPA to package up its own version 
> of the JPA API. Note that this will only be necessary to function as the 
> official RI, and we can still support using other public API bundles.
> Provide-Capability: osgi.contract;osgi.contract=JavaJPA;
> version:List="2.1,2,1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
> We could optionally choose not to support versions 2 or 1.



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


[jira] [Commented] (ARIES-1672) JPA API contract is required

2017-01-27 Thread Timothy Ward (JIRA)

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

Timothy Ward commented on ARIES-1672:
-

> I don't think embedding the jpa spec packages makes sense.

I wasn't suggesting embedding the JPA API into the container bundle, just 
stating that the specification requires a bundle which provides the JPA API 
contract. My expectation is that Aries JPA will create a new bundle which does 
just that, rather than changing the container. The Aries JPA container bundle 
can choose to use the contract, or not, when importing the API if that is what 
the community wants.

> The jpa container is open to be used with spec version 2.0 or 2.1

This is fine, but only 2.1 is required by the specification. It's therefore up 
to you whether you choose to create one or two spec api bundles

> JPA API contract is required
> 
>
> Key: ARIES-1672
> URL: https://issues.apache.org/jira/browse/ARIES-1672
> Project: Aries
>  Issue Type: Bug
>Reporter: Timothy Ward
>Assignee: Christian Schneider
>
> The OSGi JPA service spec requires the presence of an OSGi contract for the 
> JPA API. This will probably require Aries JPA to package up its own version 
> of the JPA API. Note that this will only be necessary to function as the 
> official RI, and we can still support using other public API bundles.
> Provide-Capability: osgi.contract;osgi.contract=JavaJPA;
> version:List="2.1,2,1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
> We could optionally choose not to support versions 2 or 1.



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


[jira] [Commented] (ARIES-1672) JPA API contract is required

2017-01-25 Thread Christian Schneider (JIRA)

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

Christian Schneider commented on ARIES-1672:


I don't think embedding the jpa spec packages makes sense. In OSGi there is the 
general idea that the bundle that offers the service provides the spec. As the 
jpa related service PersistenceProvider is offered by the actual persistence 
provider I think it is a better solution that this provider bundle also embeds 
the spec.

There is a good reason for this. The jpa container is open to be used with spec 
version 2.0 or 2.1. If we provide one of these API packages in the bundle then 
we create duplicates of the api package as the provider might also embed it. If 
then at runtime both specs are available chances are high that a user bundle 
binds to the wrong package.

In any case I will adapt the Provide-Capability.


> JPA API contract is required
> 
>
> Key: ARIES-1672
> URL: https://issues.apache.org/jira/browse/ARIES-1672
> Project: Aries
>  Issue Type: Bug
>Reporter: Timothy Ward
>Assignee: Christian Schneider
>
> The OSGi JPA service spec requires the presence of an OSGi contract for the 
> JPA API. This will probably require Aries JPA to package up its own version 
> of the JPA API. Note that this will only be necessary to function as the 
> official RI, and we can still support using other public API bundles.
> Provide-Capability: osgi.contract;osgi.contract=JavaJPA;
> version:List="2.1,2,1";uses:="javax.persistence,javax.persistence.criteria,javax.persistence.metamodel,javax.persistence.spi"
> We could optionally choose not to support versions 2 or 1.



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