openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <>
Subject [jira] Commented: (OPENJPA-773) Upgrade to JPA 2
Date Thu, 27 Nov 2008 03:30:44 GMT


Jeremy Bauer commented on OPENJPA-773:

Attached patches to GERINIMO-4410 for the remainder of the spec API updates based on the 10/31/2008
JSR-317 draft.  They were committed by David Jencks under revision 718393.  Corresponding
OpenJPA updates were committed under 721073.  New methods were stubbed out and will throw
an UnsupportedOperationException containing the message:  "JPA 2.0 - Method not yet implemented".

One issue I ran into is that the javax.persistence.Query interface in the JPA 2.0 spec added
a method with the signature:  

public List getPositionalParameters()

OpenJPA's Query implementation class (org.apache.openjpa.persistence.QueryImpl) and OpenJPA
interface (org.apache.openjpa.persistence.OpenJPAQuery) contained a public method with this

public Object[] getPositionalParameters()

resulting in an incompatible method signature.  Having identically named, same parameter,
methods with different return types is not allowed in Java.

This method is only called in one location internally. So, for the time being the public method
signature on the OpenJPA class and interface have been changed and the method caller has been
modified to use the new method.  However, this is a public interface so, in my opinion,  the
change should be discussed and approved by the community.  Minimally, the change needs to
be documented.

> Upgrade to JPA 2
> ----------------
>                 Key: OPENJPA-773
>                 URL:
>             Project: OpenJPA
>          Issue Type: New Feature
>            Reporter: Pinaki Poddar
>            Assignee: Jeremy Bauer
>             Fix For: 2.0.0
> Here are few basic points on upgrading to JPA 2.0 API. This is an effort to consolidate
the ongoing discussion on this issue and some how-to steps for those who are involved in developing
JPA 2.0 features or writing tests.
> 1. A draft version of JPA 2.0 Specification is published on Oct 31, 2008 [1]
> 2. The source code of the new and modified JPA API is not available
> 3. OpenJPA community has decided
>     a) to develop its own version of JPA API Source code according to the spec [2].
>        This decision helps us to control our own destiny especially in terms of few implemented
>     b) JPA API 2.0 Source will reside in Geronimo Source Code repository [2].
>        Geronimo Developer Mr.David Jencks will commit the source on behalf of OpenJPA.
>     c) JPA 2.0 related development work will be carried out on OpenJPA trunk [3]
> Few basic steps on the process
> 1. Check out the JPA 2.0 API Source code from Geronimo SVN [4]
> 2. Modify or add the new API or Annotation
> 3. Create a patch and post the patch to Geronimo JIRA-4410 [5]
> 4. After David has committed the patch, add a test case to OpenJPA that exercises the
modified API
>    even if the implementation of the API is incomplete. Simply annotate the test class
>    with @AllowFailure. Please refer to [6] for further details.
> 5. One iteration of the above steps were followed to add new Criteria API. The new API
>    generated a snapshot version of JPA API jar. OpenJPA Maven build scripts are accordingly
>    updated [7] to link against this new jar.
> [1]
> [2]
> [3]
> [4]
> [5]
> [6]
> [7]

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message