Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 62414 invoked from network); 23 Jun 2010 20:31:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Jun 2010 20:31:19 -0000 Received: (qmail 32667 invoked by uid 500); 23 Jun 2010 20:31:19 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 32516 invoked by uid 500); 23 Jun 2010 20:31:18 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 32507 invoked by uid 99); 23 Jun 2010 20:31:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jun 2010 20:31:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jun 2010 20:31:15 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5NKUr06005674 for ; Wed, 23 Jun 2010 20:30:54 GMT Message-ID: <19912343.23761277325053821.JavaMail.jira@thor> Date: Wed, 23 Jun 2010 16:30:53 -0400 (EDT) From: "David Ezzio (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1610) Allow applications using OpenJPA 1.x to run with the JPA 2.0 jar on the classpath In-Reply-To: <1318847650.664751270235547175.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Ezzio updated OPENJPA-1610: --------------------------------- Attachment: OpenJPA-1610-patch-CN957329.diff Patch file for changes applied at CN 957329 on branch 1.1.x. > Allow applications using OpenJPA 1.x to run with the JPA 2.0 jar on the classpath > --------------------------------------------------------------------------------- > > Key: OPENJPA-1610 > URL: https://issues.apache.org/jira/browse/OPENJPA-1610 > Project: OpenJPA > Issue Type: Improvement > Components: jpa > Affects Versions: 1.1.1 > Reporter: David Ezzio > Assignee: David Ezzio > Fix For: 1.1.1 > > Attachments: OpenJPA-1610-patch-CN957329.diff, Patch930357n378.diff > > > OpenJPA 1.x does not support JPA 2.0, but there are runtime environments > where applications using OpenJPA 1.x must run with the JPA 2.0 jar > present in the classpath. > Although JPA 2.0 is upwardly compatible with JPA 1.0, JPA 2.0 introduced > some methods to existing JPA interfaces that conflict with existing > signatures in OpenJPA interfaces. These conflicts arise because > the OpenJPA interfaces extend the JPA interfaces that picked up the new > methods. > To avoid the linkage errors that would result from no changes to > OpenJPA, when applications using the offending methods run in such an > environment, the two offending methods should be changed in the OpenJPA > interfaces. > Applications deployed in such environments should be recompiled to avoid > any possibility of using the old methods. > The offending methods are > public T OpenJPAEntityManager.detach(T pc) > public Properties OpenJPAEntityManagerFactory.getProperties() > > The proposed fixes are designed to make recompilation and correction of > such applications as simple as possible. Such applications will compile > with either the JPA 2.0 or JPA 1.0 jar, but they should be compiled with > the JPA 1.0 jar to avoid mistakenly using interfaces or methods found > only in JPA 2.0. Any such coding mistakes will result in linkage errors > when the methods or interfaces are used at runtime. > The proposed fixes: > public T OpenJPAEntityManager.detachCopy(T pc) > public Map > public Properties OpenJPAEntityManagerFactory.getPropertiesAsProperties() > > The first two fixes follow the changes made in OpenJPA 2.x to address > these same conflicts. > The getPropertiesAsProperties method is provided as a convenience to > application developers who do not want to accept the different return > type of the redesigned getProperties method. However, the method > getPropertiesAsProperties is not currently found in the OpenJPA 2.x > interface. > It is estimated that a large proportion of OpenJPA 1.x enabled > applications are using the old detach method and that a small proportion > are using the old getProperties method. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.