From dev-return-16001-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Fri Apr 02 19:12:51 2010 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 41989 invoked from network); 2 Apr 2010 19:12:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Apr 2010 19:12:51 -0000 Received: (qmail 4154 invoked by uid 500); 2 Apr 2010 19:12:51 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 4096 invoked by uid 500); 2 Apr 2010 19:12:51 -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 4088 invoked by uid 99); 2 Apr 2010 19:12:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 19:12:51 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 19:12:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2B2A8234C1EF for ; Fri, 2 Apr 2010 19:12:27 +0000 (UTC) Message-ID: <1318847650.664751270235547175.JavaMail.jira@brutus.apache.org> Date: Fri, 2 Apr 2010 19:12:27 +0000 (UTC) From: "David Ezzio (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-1610) Allow applications using OpenJPA 1.x to run with the JPA 2.0 jar on the classpath 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 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 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