Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-beta
    • Component/s: None
    • Labels:
      None

      Description

      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 classes.
      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 sources
      generated a snapshot version of JPA API jar. OpenJPA Maven build scripts are accordingly
      updated [7] to link against this new jar.

      [1] http://jcp.org/aboutJava/communityprocess/edr/jsr317/index.html
      [2] http://n2.nabble.com/Updating-the-JPA-spec-jar-for-JPA-2.0-tt1482013.html
      [3] http://n2.nabble.com/JPA-2.0-development-plans...-tt1129341.html

      [4] https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-jpa_2.0_spec/
      [5] http://issues.apache.org/jira/browse/GERONIMO-4410
      [6] https://issues.apache.org/jira/browse/OPENJPA-766
      [7] https://issues.apache.org/jira/browse/OPENJPA-772

        Issue Links

          Activity

          Hide
          Milosz Tylenda added a comment -

          The [1] link points to the Early Draft. The Public Review Draft can be found here:

          [8] http://jcp.org/aboutJava/communityprocess/pr/jsr317/index.html

          Show
          Milosz Tylenda added a comment - The [1] link points to the Early Draft. The Public Review Draft can be found here: [8] http://jcp.org/aboutJava/communityprocess/pr/jsr317/index.html
          Hide
          Jeremy Bauer added a comment - - edited

          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".

          Show
          Jeremy Bauer added a comment - - edited 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".
          Hide
          Dianne Richards added a comment -

          The JPA 2.0 spec adds the following method to the EntityManagerFactoryInterface: Map<String,Object> getProperties(). The current openjpa OpenJPAEntityManagerFactory interface has the following method, which is incompatible: Properties getProperties(). I'me changing the current OpenJPAEntityManagerFactory interface in trunk under OPENJPA-849 to return a Map. This need to be documented to users since it will break apps that use this method.

          Show
          Dianne Richards added a comment - The JPA 2.0 spec adds the following method to the EntityManagerFactoryInterface: Map<String,Object> getProperties(). The current openjpa OpenJPAEntityManagerFactory interface has the following method, which is incompatible: Properties getProperties(). I'me changing the current OpenJPAEntityManagerFactory interface in trunk under OPENJPA-849 to return a Map. This need to be documented to users since it will break apps that use this method.
          Hide
          Albert Lee added a comment -

          JPA 1 defines only

          {READ, WRITE}

          LockModeType, but JPA 2.0 introduce

          {NONE, ...... other }

          new values.

          OpenJPA's fetch plan returns null when getLockMode() is called for the default value. However in JPA 2, the default value of NONE is returned. Per 2.0 spec, NONE is the default value in LockModeType attribute of the Query annotation. This may incur a compatibility concern.

          Show
          Albert Lee added a comment - JPA 1 defines only {READ, WRITE} LockModeType, but JPA 2.0 introduce {NONE, ...... other } new values. OpenJPA's fetch plan returns null when getLockMode() is called for the default value. However in JPA 2, the default value of NONE is returned. Per 2.0 spec, NONE is the default value in LockModeType attribute of the Query annotation. This may incur a compatibility concern.
          Hide
          Jeremy Bauer added a comment -

          Linking to compatibility JIRA

          Show
          Jeremy Bauer added a comment - Linking to compatibility JIRA
          Hide
          Jeremy Bauer added a comment -

          Complete

          Show
          Jeremy Bauer added a comment - Complete

            People

            • Assignee:
              Jeremy Bauer
              Reporter:
              Pinaki Poddar
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development