From commits-return-9340-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 3 14:55:26 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9409A9CC2 for ; Fri, 3 Feb 2012 14:55:26 +0000 (UTC) Received: (qmail 53963 invoked by uid 500); 3 Feb 2012 14:55:26 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 53904 invoked by uid 500); 3 Feb 2012 14:55:25 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 53897 invoked by uid 99); 3 Feb 2012 14:55:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 14:55:25 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Fri, 03 Feb 2012 14:55:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q13Et0vL002687 for ; Fri, 3 Feb 2012 14:55:00 GMT Date: Fri, 3 Feb 2012 09:55:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <23076890.42990.1328280900025.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Documentation MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
From commits-return-9341-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 3 16:44:50 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E3F6D9832 for ; Fri, 3 Feb 2012 16:44:50 +0000 (UTC) Received: (qmail 5960 invoked by uid 500); 3 Feb 2012 16:44:50 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 5670 invoked by uid 500); 3 Feb 2012 16:44:50 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 5285 invoked by uid 99); 3 Feb 2012 16:44:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 16:44:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 16:44:49 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C797F2388A40 for ; Fri, 3 Feb 2012 16:44:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240240 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java Date: Fri, 03 Feb 2012 16:44:28 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120203164428.C797F2388A40@eris.apache.org> Author: ppoddar Date: Fri Feb 3 16:44:28 2012 New Revision: 1240240 URL: http://svn.apache.org/viewvc?rev=1240240&view=rev Log: OPENJPA-2099: Added toString() for debugging Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java?rev=1240240&r1=1240239&r2=1240240&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java Fri Feb 3 16:44:28 2012 @@ -109,4 +109,8 @@ public class BindParameter { public Object getKey() { return _key; } + + public String toString() { + return _key + ":" + getValue(); + } } From commits-return-9342-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 3 17:03:06 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A25E29F6A for ; Fri, 3 Feb 2012 17:03:06 +0000 (UTC) Received: (qmail 46757 invoked by uid 500); 3 Feb 2012 17:03:06 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 46688 invoked by uid 500); 3 Feb 2012 17:03:06 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 46681 invoked by uid 99); 3 Feb 2012 17:03:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 17:03:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 17:03:05 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EB92823888E4 for ; Fri, 3 Feb 2012 17:02:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240247 - /openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Date: Fri, 03 Feb 2012 17:02:44 -0000 To: commits@openjpa.apache.org From: jgrassel@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120203170244.EB92823888E4@eris.apache.org> Author: jgrassel Date: Fri Feb 3 17:02:44 2012 New Revision: 1240247 URL: http://svn.apache.org/viewvc?rev=1240247&view=rev Log: OPENJPA-1901: QueryCacheStoreQuery CachedObjectId is not Serializable Modified: openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Modified: openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java?rev=1240247&r1=1240246&r2=1240247&view=diff ============================================================================== --- openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java (original) +++ openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Fri Feb 3 17:02:44 2012 @@ -701,7 +701,7 @@ public class QueryCacheStoreQuery /** * Struct to recognize cached oids. */ - private static class CachedObjectId { + private static class CachedObjectId implements java.io.Serializable { public final Object oid; From commits-return-9343-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 3 18:34:52 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB69A9D74 for ; Fri, 3 Feb 2012 18:34:52 +0000 (UTC) Received: (qmail 4307 invoked by uid 500); 3 Feb 2012 18:34:52 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 4243 invoked by uid 500); 3 Feb 2012 18:34:52 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 4236 invoked by uid 99); 3 Feb 2012 18:34:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 18:34:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 18:34:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4C16E23889BB for ; Fri, 3 Feb 2012 18:34:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240284 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Date: Fri, 03 Feb 2012 18:34:31 -0000 To: commits@openjpa.apache.org From: jgrassel@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120203183431.4C16E23889BB@eris.apache.org> Author: jgrassel Date: Fri Feb 3 18:34:30 2012 New Revision: 1240284 URL: http://svn.apache.org/viewvc?rev=1240284&view=rev Log: OPENJPA-1901: QueryCacheStoreQuery CachedObjectId is not Serializable Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java?rev=1240284&r1=1240283&r2=1240284&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Fri Feb 3 18:34:30 2012 @@ -710,7 +710,7 @@ public class QueryCacheStoreQuery /** * Struct to recognize cached oids. */ - private static class CachedObjectId { + private static class CachedObjectId implements java.io.Serializable { public final Object oid; From commits-return-9344-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 3 19:09:55 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 887A59A17 for ; Fri, 3 Feb 2012 19:09:55 +0000 (UTC) Received: (qmail 49317 invoked by uid 500); 3 Feb 2012 19:09:55 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 49253 invoked by uid 500); 3 Feb 2012 19:09:55 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 49246 invoked by uid 99); 3 Feb 2012 19:09:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 19:09:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 19:09:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 569E423889BB for ; Fri, 3 Feb 2012 19:09:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240302 - in /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib: conf/ImmutableBooleanValue.java util/FlexibleThreadLocal.java Date: Fri, 03 Feb 2012 19:09:31 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120203190931.569E423889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ppoddar Date: Fri Feb 3 19:09:30 2012 New Revision: 1240302 URL: http://svn.apache.org/viewvc?rev=1240302&view=rev Log: OPENJPA-2099: relax thread and bind parameter affinity. allow immutable value at construction Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ImmutableBooleanValue.java openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ImmutableBooleanValue.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ImmutableBooleanValue.java?rev=1240302&r1=1240301&r2=1240302&view=diff ============================================================================== --- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ImmutableBooleanValue.java (original) +++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ImmutableBooleanValue.java Fri Feb 3 19:09:30 2012 @@ -31,6 +31,12 @@ public class ImmutableBooleanValue exten super(prop); } + public ImmutableBooleanValue(String prop, boolean value) { + super(prop); + set(value); + } + + public void set(boolean value) { if (_dirty) { if (value != get().booleanValue()) Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java?rev=1240302&r1=1240301&r2=1240302&view=diff ============================================================================== --- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java (original) +++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java Fri Feb 3 19:09:30 2012 @@ -22,7 +22,13 @@ import java.util.HashMap; import java.util.Map; /** - * A thread-specific storage similar to {@link ThreadLocal}. + * A thread-specific storage similar to {@link ThreadLocal} that + * heuristically relaxes the affinity of a value to a thread. + *
+ * A thread t1 can {@linkplain #set(Object) set} a value, while + * a different thread t2 can {@linkplain #get() access} the same + * value, if t1 and t2 are {@link #isEquivalent(Thread, Thread) + * equivalent}. * * @author Pinaki Poddar * @since 2.2.0 @@ -41,12 +47,16 @@ public class FlexibleThreadLocal { if (_values.containsKey(current)) { return _values.get(current); } else { - for (Map.Entry e : _values.entrySet()) { - if (isEquivalent(e.getKey(), current)) - return e.getValue(); + if (_values.size() == 1) { + return _values.values().iterator().next(); + } else { + for (Map.Entry e : _values.entrySet()) { + if (isEquivalent(e.getKey(), current)) + return e.getValue(); + } } - } - return null; + throw new RuntimeException(current + " is not a known thread. Known threads are " + _values); + } } /** @@ -58,11 +68,17 @@ public class FlexibleThreadLocal { /** * Affirms if the two given thread are equivalent. - * Equivalence takes asymmetric equality in account. + * Two threads are equivalent if the they are identical (of course), + * or they belong to the same thread group or they are equal. + * The equality can be defined asymmetrically by the + * thread implementation. For example, a child thread (as done in Slice) + * can equal its parent thread which is a native thread. But the parent + * (native) thread is not equal to the child thread. */ protected boolean isEquivalent(Thread a, Thread b) { if (a == b) return true; - if (a == null || b== null) return false; + if (a.getThreadGroup() == b.getThreadGroup()) return true; + if (a == null || b == null) return false; return a.equals(b) || b.equals(a); } From commits-return-9345-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 3 19:14:21 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 331E59B90 for ; Fri, 3 Feb 2012 19:14:21 +0000 (UTC) Received: (qmail 55407 invoked by uid 500); 3 Feb 2012 19:14:21 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 55391 invoked by uid 500); 3 Feb 2012 19:14:20 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 55384 invoked by uid 99); 3 Feb 2012 19:14:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 19:14:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 19:14:19 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E6CF6238889B for ; Fri, 3 Feb 2012 19:13:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240304 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java Date: Fri, 03 Feb 2012 19:13:59 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120203191359.E6CF6238889B@eris.apache.org> Author: ppoddar Date: Fri Feb 3 19:13:59 2012 New Revision: 1240304 URL: http://svn.apache.org/viewvc?rev=1240304&view=rev Log: OPENJPA-2099: Rollback toString() because DB2 error not investigated Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java?rev=1240304&r1=1240303&r2=1240304&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java Fri Feb 3 19:13:59 2012 @@ -109,8 +109,4 @@ public class BindParameter { public Object getKey() { return _key; } - - public String toString() { - return _key + ":" + getValue(); - } } From commits-return-9346-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 3 21:13:51 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B1B1699BB for ; Fri, 3 Feb 2012 21:13:51 +0000 (UTC) Received: (qmail 44824 invoked by uid 500); 3 Feb 2012 21:13:51 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 44766 invoked by uid 500); 3 Feb 2012 21:13:51 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 44759 invoked by uid 99); 3 Feb 2012 21:13:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 21:13:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 21:13:48 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D845D238899C for ; Fri, 3 Feb 2012 21:13:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240341 - /openjpa/branches/2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Date: Fri, 03 Feb 2012 21:13:27 -0000 To: commits@openjpa.apache.org From: jgrassel@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120203211327.D845D238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jgrassel Date: Fri Feb 3 21:13:27 2012 New Revision: 1240341 URL: http://svn.apache.org/viewvc?rev=1240341&view=rev Log: OPENJPA-1901: QueryCacheStoreQuery CachedObjectId is not Serializable Modified: openjpa/branches/2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Modified: openjpa/branches/2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java?rev=1240341&r1=1240340&r2=1240341&view=diff ============================================================================== --- openjpa/branches/2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java (original) +++ openjpa/branches/2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Fri Feb 3 21:13:27 2012 @@ -710,7 +710,7 @@ public class QueryCacheStoreQuery /** * Struct to recognize cached oids. */ - private static class CachedObjectId { + private static class CachedObjectId implements java.io.Serializable { public final Object oid; From commits-return-9347-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 00:35:21 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA1A6988C for ; Sat, 4 Feb 2012 00:35:21 +0000 (UTC) Received: (qmail 61458 invoked by uid 500); 4 Feb 2012 00:35:21 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 61398 invoked by uid 500); 4 Feb 2012 00:35:21 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 61389 invoked by uid 99); 4 Feb 2012 00:35:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 00:35:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 00:35:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 14FE5238897D for ; Sat, 4 Feb 2012 00:35:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240416 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java Date: Sat, 04 Feb 2012 00:35:00 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120204003500.14FE5238897D@eris.apache.org> Author: ppoddar Date: Sat Feb 4 00:34:59 2012 New Revision: 1240416 URL: http://svn.apache.org/viewvc?rev=1240416&view=rev Log: OPENJPA-2099: disable the feature temporarily Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java?rev=1240416&r1=1240415&r2=1240416&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java Sat Feb 4 00:34:59 2012 @@ -353,7 +353,7 @@ public class JDBCConfigurationImpl identifierUtilPlugin.setString(aliases[0]); identifierUtilPlugin.setInstantiatingGetter("getIdentifierUtilInstance"); - cacheSelect = new ImmutableBooleanValue("jdbc.CachesSelect"); + cacheSelect = new ImmutableBooleanValue("jdbc.CachesSelect", false); addValue(cacheSelect); cacheSelect.setDefault("false"); From commits-return-9348-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 00:35:48 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C2509895 for ; Sat, 4 Feb 2012 00:35:48 +0000 (UTC) Received: (qmail 61603 invoked by uid 500); 4 Feb 2012 00:35:48 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 61545 invoked by uid 500); 4 Feb 2012 00:35:48 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 61538 invoked by uid 99); 4 Feb 2012 00:35:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 00:35:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 00:35:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B33A423889B8 for ; Sat, 4 Feb 2012 00:35:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240417 - /openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestImmutableValue.java Date: Sat, 04 Feb 2012 00:35:26 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120204003526.B33A423889B8@eris.apache.org> Author: ppoddar Date: Sat Feb 4 00:35:26 2012 New Revision: 1240417 URL: http://svn.apache.org/viewvc?rev=1240417&view=rev Log: OPENJPA-2099: Test for immutable value Added: openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestImmutableValue.java (with props) Added: openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestImmutableValue.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestImmutableValue.java?rev=1240417&view=auto ============================================================================== --- openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestImmutableValue.java (added) +++ openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestImmutableValue.java Sat Feb 4 00:35:26 2012 @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.lib.util; + +import org.apache.openjpa.lib.conf.ImmutableBooleanValue; + +import junit.framework.TestCase; + +/** + * Tests behavior of immutable boolean value. + * + * @author Pinaki Poddar + * + */ +public class TestImmutableValue extends TestCase { + + public void testDefaultValueIsFalse() { + ImmutableBooleanValue value = new ImmutableBooleanValue("a"); + assertEquals(Boolean.FALSE, value.get()); + } + + public void testValueCanBeSetOnce() { + ImmutableBooleanValue value = new ImmutableBooleanValue("a"); + value.set(true); + assertEquals(Boolean.TRUE, value.get()); + } + + public void testSameValueCanBeSetMoreThanOnce() { + ImmutableBooleanValue value = new ImmutableBooleanValue("a"); + value.set(true); + assertEquals(Boolean.TRUE, value.get()); + value.set(true); + assertEquals(Boolean.TRUE, value.get()); + } + + public void testDifferentValueCanNotBeSetMoreThanOnce() { + ImmutableBooleanValue value = new ImmutableBooleanValue("a"); + value.set(true); + assertEquals(Boolean.TRUE, value.get()); + try { + value.set(false); + fail("Expected IllegalStateException"); + } catch (IllegalStateException e) { + // expected exception + } + assertEquals(Boolean.TRUE, value.get()); + } + + public void testInitializedAsTrue() { + ImmutableBooleanValue value = new ImmutableBooleanValue("a", true); + assertEquals(Boolean.TRUE, value.get()); + } + + public void testInitializedAsFalse() { + ImmutableBooleanValue value = new ImmutableBooleanValue("a", false); + assertEquals(Boolean.FALSE, value.get()); + } + + public void testInitializedValueCanNotBeMutated() { + ImmutableBooleanValue value = new ImmutableBooleanValue("a", true); + assertEquals(Boolean.TRUE, value.get()); + try { + value.set(false); + fail("Expected IllegalStateException"); + } catch (IllegalStateException e) { + // expected exception + } + assertEquals(Boolean.TRUE, value.get()); + } +} Propchange: openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestImmutableValue.java ------------------------------------------------------------------------------ svn:eol-style = native From commits-return-9349-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 00:44:49 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B1309B2E for ; Sat, 4 Feb 2012 00:44:49 +0000 (UTC) Received: (qmail 69843 invoked by uid 500); 4 Feb 2012 00:44:49 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 69800 invoked by uid 500); 4 Feb 2012 00:44:48 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 69793 invoked by uid 99); 4 Feb 2012 00:44:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 00:44:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 00:44:47 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DE3F5238899C for ; Sat, 4 Feb 2012 00:44:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240419 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java Date: Sat, 04 Feb 2012 00:44:27 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120204004427.DE3F5238899C@eris.apache.org> Author: ppoddar Date: Sat Feb 4 00:44:27 2012 New Revision: 1240419 URL: http://svn.apache.org/viewvc?rev=1240419&view=rev Log: OPENJPA-2099: Remove generics Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java?rev=1240419&r1=1240418&r2=1240419&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java Sat Feb 4 00:44:27 2012 @@ -52,7 +52,7 @@ public class BindParameter { private final Column _column; // key of this parameter private final Object _key; - private FlexibleThreadLocal _values = new FlexibleThreadLocal(); + private FlexibleThreadLocal _values = new FlexibleThreadLocal(); /** * Constructs a parameter with given key, column and user flag. From commits-return-9350-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 03:07:26 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 526619E48 for ; Sat, 4 Feb 2012 03:07:26 +0000 (UTC) Received: (qmail 97492 invoked by uid 500); 4 Feb 2012 03:07:26 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 97365 invoked by uid 500); 4 Feb 2012 03:07:17 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 97357 invoked by uid 99); 4 Feb 2012 03:07:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 03:07:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 03:07:06 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E1C492388900 for ; Sat, 4 Feb 2012 03:06:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240448 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ openjpa-lib/src/test/java/org/apache/op... Date: Sat, 04 Feb 2012 03:06:46 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120204030646.E1C492388900@eris.apache.org> Author: ppoddar Date: Sat Feb 4 03:06:46 2012 New Revision: 1240448 URL: http://svn.apache.org/viewvc?rev=1240448&view=rev Log: OPENJPA-2099: Remove hard references from thread local Added: openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestFlexibleThreadLocal.java (with props) Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java?rev=1240448&r1=1240447&r2=1240448&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java Sat Feb 4 03:06:46 2012 @@ -353,7 +353,7 @@ public class JDBCConfigurationImpl identifierUtilPlugin.setString(aliases[0]); identifierUtilPlugin.setInstantiatingGetter("getIdentifierUtilInstance"); - cacheSelect = new ImmutableBooleanValue("jdbc.CachesSelect", false); + cacheSelect = new ImmutableBooleanValue("jdbc.CachesSelect"); addValue(cacheSelect); cacheSelect.setDefault("false"); Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java?rev=1240448&r1=1240447&r2=1240448&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Sat Feb 4 03:06:46 2012 @@ -54,9 +54,7 @@ import org.apache.openjpa.jdbc.sql.SQLFa import org.apache.openjpa.jdbc.sql.Select; import org.apache.openjpa.jdbc.sql.SelectExecutor; import org.apache.openjpa.jdbc.sql.Union; -import org.apache.openjpa.kernel.BrokerImpl; import org.apache.openjpa.kernel.FetchConfiguration; -import org.apache.openjpa.kernel.FinderCache; import org.apache.openjpa.kernel.LockManager; import org.apache.openjpa.kernel.OpenJPAStateManager; import org.apache.openjpa.kernel.PCState; @@ -87,43 +85,107 @@ import org.apache.openjpa.util.StoreExce import org.apache.openjpa.util.UserException; /** - * StoreManager plugin that uses JDBC to store persistent data in a + * StoreManager plugin that uses JDBC to load and store persistent data in a * relational data store. + *
+ * This important design construct builds {@link SelectExecutor select} + * structures required to fetch persistent entity from a JDBC database. + * The preparation of a select structure requires extensively consulting + * mapping metadata of persistent types. The result of the select execution + * as database record is used to populate the persistent attributes. + *
+ * The logic of preparing the select and loading its resultant data are + * triggered by this class, but actually carried out by individual field + * mapping strategies. This design allows excellent flexibility in terms + * of extending behavior by the strategies. + *
+ * This instance is operating under a context i.e. a object management kernel. + * Loading data requires the references to other entities be resolved. + * This class delegates reference resolution to this operating context + * which may call back to this instance itself to load the reference data. + *
+ * This class is aware of transaction and database connection. The database + * connections are wrapped with reference counting. Transaction could be + * optimistic or pessimistic which broadly translates to connection-less + * and connected with respect to database connection. + *
+ * Since version 2.2.0, this critical construct has undergone a major + * conceptual change. This construct now is capable of reusing select statements + * based on {@link JDBCConfiguration#getSelectCacheEnabled() configuration. + * The select instances used by this class are now {@link ClassMapping#getSelect() + * obtained} from the (stateful) mapping metadata instead of a stateless + * {@link SQLFactory factory}. This allows individual mapping metadata for + * a persistent type to maintain a select instance for reuse instead of + * creating yet another cache of selects indexed by their mapping metadata. + *
+ * A reusable select is populated at the first execution and executed subsequently by + * only binding parameters that are specific to a single instance. In concurrent + * execution environment, it is required to ensure that a) the preparation and first + * execution is guarded by synchronized monitor and b) subsequent executions do not + * pay synchronization cost as after first execution a select becomes + * structurally immutable. + *
+ * This construct has factored out the methods that executes a select to incorporate + * such a threading model. + *
+ * Of course, such structurally immutable select assumes that {@link FetchConfiguration + * fetch plan} is invariant as well. However, this construct does not validate + * that assumption at all. As of version 2.2.0, the invariance of fetch plan is not + * validated when select cache is activated. * * @author Abe White + * @author Pinaki Poddar * @nojavadoc */ public class JDBCStoreManager implements StoreManager, JDBCStore { - private static final Localizer _loc = Localizer.forPackage - (JDBCStoreManager.class); + private static final Localizer _loc = Localizer.forPackage(JDBCStoreManager.class); - private StoreContext _ctx = null; - private JDBCConfiguration _conf = null; - private DBDictionary _dict = null; - private SQLFactory _sql = null; - private JDBCLockManager _lm = null; - private DataSource _ds = null; - private RefCountConnection _conn = null; - private boolean _active = false; - private Log _log = null; + private StoreContext _ctx; + private JDBCConfiguration _conf; + private DBDictionary _dict; + private JDBCLockManager _lm; + private DataSource _ds; + private RefCountConnection _conn; + private boolean _active; + private Log _log; // track the pending statements so we can cancel them private Set _stmnts = Collections.synchronizedSet(new HashSet()); + /** + * Gets the operating context i.e. the object management kernel + * of this store manager. + */ public StoreContext getContext() { return _ctx; } + /** + * Sets the operating context i.e. the object management kernel + * of this store manager. + *
+ * The context is set before all other operation. + */ public void setContext(StoreContext ctx) { setContext(ctx, (JDBCConfiguration) ctx.getConfiguration()); } + /** + * Sets the operating context i.e. the object management kernel + * of this store manager with the given configuration which may + * differ from the configuration of the context. This separation + * of configuration allows multiple store manager with different + * configuration (e.g. connected to different databases as in Slice) + * operating under the same object management kernel and hence + * under the same transaction. + *
+ * The context is set before all other operation. + */ public void setContext(StoreContext ctx, JDBCConfiguration conf) { _ctx = ctx; _conf = conf; _dict = _conf.getDBDictionaryInstance(); - _sql = _conf.getSQLFactoryInstance(); _log = _conf.getLog(JDBCConfiguration.LOG_DIAG); LockManager lm = ctx.getLockManager(); @@ -141,15 +203,7 @@ public class JDBCStoreManager implements } private final DataSource getDataSource(StoreContext ctx) { - DataSource ds; - - if(useConnectionFactory2(ctx)) { - ds = _conf.getDataSource2(ctx); - } - else { - ds = _conf.getDataSource(ctx); - } - return ds; + return (useConnectionFactory2(ctx)) ? _conf.getDataSource2(ctx) : _conf.getDataSource(ctx); } public JDBCConfiguration getConfiguration() { @@ -161,7 +215,7 @@ public class JDBCStoreManager implements } public SQLFactory getSQLFactory() { - return _sql; + return _conf.getSQLFactoryInstance(); } public JDBCLockManager getLockManager() { @@ -172,17 +226,36 @@ public class JDBCStoreManager implements return (JDBCFetchConfiguration) _ctx.getFetchConfiguration(); } + /** + * Begins an optimistic transaction. An optimistic transaction does + * not retain a connection and hence this method is a no-op. + */ public void beginOptimistic() { } + /** + * Rolls back an optimistic transaction. An optimistic transaction does + * not retain a connection and hence this method is a no-op. + */ public void rollbackOptimistic() { } + /** + * Affirms if the store manager transaction is managed by an external + * agency. + */ + public boolean isManaged() { + return _ctx.isManaged() && _conf.isConnectionFactoryModeManaged(); + } + + /** + * Begins a transaction by setting auto-commit to false, if necessary + * in non-managed transaction environment. + */ public void begin() { _active = true; try { - if ((!_ctx.isManaged() || !_conf.isConnectionFactoryModeManaged()) - && _conn.getAutoCommit()) + if (!isManaged() && _conn.getAutoCommit()) _conn.setAutoCommit(false); } catch (SQLException se) { _active = false; @@ -190,9 +263,12 @@ public class JDBCStoreManager implements } } + /** + * Commits the transaction in non-managed environment. + */ public void commit() { try { - if (!_ctx.isManaged() || !_conf.isConnectionFactoryModeManaged()) + if (!isManaged()) _conn.commit(); } catch (SQLException se) { try { @@ -205,15 +281,16 @@ public class JDBCStoreManager implements } } + /** + * Rolls back the transaction in non-managed environment. + */ public void rollback() { // already rolled back ourselves? if (!_active) return; try { - if (_conn != null - && (!_ctx.isManaged() || !_conf - .isConnectionFactoryModeManaged())) + if (_conn != null && !isManaged()) _conn.rollback(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); @@ -222,29 +299,54 @@ public class JDBCStoreManager implements } } + /** + * Retains the connection for later transactions. + */ public void retainConnection() { connect(false); _conn.setRetain(true); } + /** + * Releases the retained connection, if any. + */ public void releaseConnection() { if (_conn != null) _conn.setRetain(false); } + /** + * Gets the client view of the connection as a reference counted + * connection. + */ public Object getClientConnection() { return new ClientConnection(getConnection()); } + /** + * Gets a reference counted connection. + */ public Connection getConnection() { connect(true); return _conn; } + /** + * Gets the data source used by this manager. + * @return + */ protected DataSource getDataSource() { return _ds; } + /** + * Affirms if the given instance exists in the data store. + * Requires to execute a SQL select with primary key identifier + * of the given instance. + * + * @param sm the instance whose data store existence is to be determined. + * @param context the context in which this query is executed + */ public boolean exists(OpenJPAStateManager sm, Object context) { // add where conditions on base class to avoid joins if subclass // doesn't use oid as identifier @@ -252,54 +354,88 @@ public class JDBCStoreManager implements return exists(mapping, sm.getObjectId(), context); } - public boolean isCached(List oids, BitSet edata) { - // JDBCStoreManager doesn't store oids in memory. - return false; - } - + /** + * Executes a SQL select with primary key to ascertain existence + * of the given instance. + * + * @param mapping the mapping metadata. The where condition is applied + * to the least-derived type of this metadata to avoid joins if subclass + * does not use the given oid as identifer. + * @param oid the primary key identifier + * @param context the execution context (not used) + * @return true if the instance exists in the data store. + */ private boolean exists(ClassMapping mapping, Object oid, Object context) { // add where conditions on base class to avoid joins if subclass // doesn't use oid as identifier - while (mapping.getJoinablePCSuperclassMapping() != null) - mapping = mapping.getJoinablePCSuperclassMapping(); + mapping = getBaseMapping(mapping); Select sel = mapping.getSelect(); - - sel.wherePrimaryKey(oid, mapping, this); - if (_log.isTraceEnabled()) { - _log.trace("exists: oid="+oid+" "+mapping.getDescribedType()); - } try { - return sel.getCount(this) != 0; + if (requiresLocking(sel)) { + synchronized (sel) { + sel.wherePrimaryKey(oid, mapping, this); + return sel.getCount(this) != 0; + } + } else { + sel.wherePrimaryKey(oid, mapping, this); + return sel.getCount(this) != 0; + } } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } } + /** + * Affirms the in-memory version is same as the version of the given instance. + */ public boolean syncVersion(OpenJPAStateManager sm, Object context) { - ClassMapping mapping = (ClassMapping) sm.getMetaData(); try { - return mapping.getVersion().checkVersion(sm, this, true); + return ((ClassMapping) sm.getMetaData()).getVersion().checkVersion(sm, this, true); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict, getReadLockLevel()); } } + /** + * Affirms if this manager has cached the instances given by the + * list of identifiers. + *
+ * Always returns false as this manager does not have any instance + * caching capability. + */ + public boolean isCached(List oids, BitSet edata) { + // JDBCStoreManager doesn't store oids in memory. + return false; + } + + /** + * Gets the lock level of the current fetch configuration. + * + * @return -1 if no fetch configuration is available. + */ private int getReadLockLevel() { JDBCFetchConfiguration fetch = getFetchConfiguration(); - if (fetch != null) { - return fetch.getReadLockLevel(); - } - return -1; + return (fetch != null) ? fetch.getReadLockLevel() : -1; } + /** + * Compares the two given versions. + */ public int compareVersion(OpenJPAStateManager state, Object v1, Object v2) { - ClassMapping mapping = (ClassMapping) state.getMetaData(); - return mapping.getVersion().compareVersion(v1, v2); + return ((ClassMapping) state.getMetaData()).getVersion().compareVersion(v1, v2); } - public boolean initialize(OpenJPAStateManager sm, PCState state, - FetchConfiguration fetch, Object context) { - ConnectionInfo info = (ConnectionInfo) context; + /** + * Initializes the persistent state of the given instance to the given state. + * + * @param sm the instance to be populated + * @param state life cycle state to be set on the given instance + * @param fetch fetch configuration to be used + * @param context {@link ConnectionInfo information} about an existing connection. + * Could be null if this initialization is non-recursive. + */ + public boolean initialize(OpenJPAStateManager sm, PCState state, FetchConfiguration fetch, Object ctx) { + ConnectionInfo info = (ConnectionInfo) ctx; try { return initializeState(sm, state, (JDBCFetchConfiguration) fetch, info); } catch (ClassNotFoundException cnfe) { @@ -312,9 +448,16 @@ public class JDBCStoreManager implements /** * Initialize a newly-loaded instance. + * + * @param sm the instance to be populated + * @param state life cycle state to be set on the given instance + * @param fetch fetch configuration to be used + * @param info {@link ConnectionInfo information} about an existing connection. + * If non-null, then this information carries the database result and exact + * metadata of the instance to be loaded. */ protected boolean initializeState(OpenJPAStateManager sm, PCState state, - JDBCFetchConfiguration fetch, ConnectionInfo info) + JDBCFetchConfiguration fetch, ConnectionInfo info) throws ClassNotFoundException, SQLException { Object oid = sm.getObjectId(); ClassMapping mapping = (ClassMapping) sm.getMetaData(); @@ -378,8 +521,8 @@ public class JDBCStoreManager implements if (mappedByFieldMapping != null && mappedByObject != null) if (mappedByObject instanceof OpenJPAId && mapping.getExtraFieldDataIndex(mappedByFieldMapping.getIndex()) != -1) { - // The inverse relation can not be set since we are eagerly loading this sm for - // an owner that is still in the process of initializing itself. + // The inverse relation can not be set since we are eagerly loading this instance + // for an owner that is still in the process of initializing itself. // Remember owner oid by setIntermediate(). // The inverse relation is set later by setInverseRelation() when the owner is fully // initialized. @@ -408,8 +551,13 @@ public class JDBCStoreManager implements } } - private void setInverseRelation(OpenJPAStateManager owner, - ClassMapping mapping, Result res) { + /** + * Sets inverse relation between eager collection members and the given owner. + * @param owner an instance with eager -to-many relation + * @param mapping mapping metadata of the given owner + * @param res result carrying the eager results + */ + private void setInverseRelation(OpenJPAStateManager owner, ClassMapping mapping, Result res) { FieldMapping[] fms = mapping.getFieldMappings(); // At this point, the owner is fully initialized. @@ -422,60 +570,62 @@ public class JDBCStoreManager implements Object coll = owner.fetchObject(fms[i].getIndex()); if (coll instanceof Map) coll = ((Map)coll).values(); - if (coll instanceof Collection && - ((Collection) coll).size() > 0) { - // Found eagerly loaded collection. - // Publisher (1) <==> (M) Magazine - // publisher has a EAGER OneToMany relation - // magazine has a EAGER or LAZY ManyToOne publisher - // For each member (Magazine) in the collection, - // set its inverse relation (Publisher). - for (Iterator itr = ((Collection) coll).iterator(); - itr.hasNext();) { - PersistenceCapable pc = (PersistenceCapable) itr.next(); - if (pc == null) { - continue; - } - OpenJPAStateManager sm = (OpenJPAStateManager) pc.pcGetStateManager(); - ClassMapping cm = - (ClassMapping) _conf.getMetaDataRepositoryInstance().getCachedMetaData(pc.getClass()); - FieldMapping[] fmd = cm.getFieldMappings(); - for (int j = 0; j < fmd.length; j++) { - // don't check the oids for basic fields. - if (fmd[j].isTypePC()) { - Object oid = sm.getIntermediate(fmd[j].getIndex()); - // if oid was setIntermediate() previously and it is the same as the owner,generate - // then set the inverse relation - if (oid != null && oid.equals(owner.getObjectId())) { - sm.storeObject(fmd[j].getIndex(), owner.getPersistenceCapable()); - break; - } - } - } - } + if (coll instanceof Collection && !((Collection) coll).isEmpty()) { + setInverseRelation(owner, (Collection)coll); } } } } - - protected void setMappedBy(OpenJPAStateManager sm, - FieldMapping mappedByFieldMapping, Object mappedByObject) { - ClassMapping mapping = (ClassMapping) sm.getMetaData(); - FieldMapping[] fms = mapping.getFieldMappings(); - for (int i = 0; i < fms.length; i++) { - if (fms[i] == mappedByFieldMapping) { - sm.storeObject(fms[i].getIndex(), mappedByObject); - return; + + /** + * Sets inverse relation between given owner and given collection members. + *
+ * Example: Publisher (1) <---> (M) Magazine
+ * Publisher has eager OneToMany relation to Magazine
+ * Magazine has a eager or lazy ManyToOne relation to Publisher
+ * For each member (Magazine) in the given collection, set the member's inverse + * relation to the Publisher. + */ + private void setInverseRelation(OpenJPAStateManager owner, Collection coll) { + for (Iterator itr = ((Collection) coll).iterator(); itr.hasNext();) { + Object member = itr.next(); + if (member instanceof PersistenceCapable) { + PersistenceCapable pc = (PersistenceCapable) member; + + OpenJPAStateManager sm = (OpenJPAStateManager) pc.pcGetStateManager(); + ClassMapping cm = (ClassMapping)sm.getMetaData(); + FieldMapping[] fmd = cm.getFieldMappings(); + for (int j = 0; j < fmd.length; j++) { + if (fmd[j].isTypePC()) { + Object oid = sm.getIntermediate(fmd[j].getIndex()); + if (oid != null && oid.equals(owner.getObjectId())) { + sm.storeObject(fmd[j].getIndex(), owner.getPersistenceCapable()); + break; + } + } + } } } } /** + * Sets the given mappedBy instance to the given instance to the field that + * corresponds to the other end of relation for the given field. + * @param sm an instance whose field is to be set + * @param mappedByFieldMapping + * @param mappedBy + */ + protected void setMappedBy(OpenJPAStateManager sm, FieldMapping mappedByFieldMapping, Object mappedBy) { + ClassMapping mapping = (ClassMapping) sm.getMetaData(); + if (mappedByFieldMapping == mapping.getFieldMapping(mappedByFieldMapping.getIndex())) + sm.storeObject(mappedByFieldMapping.getIndex(), mappedBy); + } + + /** * This method is to provide override for non-JDBC or JDBC-like * implementation of getting version from the result set. */ - protected void getVersion(ClassMapping mapping, OpenJPAStateManager sm, - Result res) throws SQLException { + protected void getVersion(ClassMapping mapping, OpenJPAStateManager sm, Result res) throws SQLException { mapping.getVersion().afterLoad(sm, this); } @@ -484,9 +634,7 @@ public class JDBCStoreManager implements * implementation of checking whether the result set is empty or not. */ protected boolean isEmptyResult(Result res) throws SQLException { - if (res != null && !res.next()) - return true; - return false; + return (res != null && !res.next()); } /** @@ -517,78 +665,159 @@ public class JDBCStoreManager implements } /** + * Executes a SQL select statement to obtain the database result for the given instance. + * + * @param sm the instance whose database data is to be selected + * @param mapping mapping metadata for the given instance + * @param fetch the fetch configuration + * @param subs subclass joining style indicator. See Select * Select the data for the given instance and return the result. Return * null if there is no data in the current fetch groups to select. */ - private Result getInitializeStateResult(OpenJPAStateManager sm, - ClassMapping mapping, JDBCFetchConfiguration fetch, int subs) + private Result getInitializeStateResult(OpenJPAStateManager sm, ClassMapping mapping, + JDBCFetchConfiguration fetch, int subs) throws SQLException { - FinderQueryImpl fq = getFinder(mapping, fetch); - if (fq != null) - return fq.execute(sm, this, fetch); Select sel = mapping.getSelect(); - if (!select(sel, mapping, subs, sm, null, fetch, - JDBCFetchConfiguration.EAGER_JOIN, true, false)) - return null; + if (requiresLocking(sel)) { + synchronized (sel) { + return getInitializeStateResult(sel, sm, mapping, subs, fetch, JDBCFetchConfiguration.EAGER_JOIN); + } + } else { + return getInitializeStateResult(sel, sm, mapping, subs, fetch, JDBCFetchConfiguration.EAGER_JOIN); + } + } + + /** + * Sets the given select with the primary identifier of the given instance and executes + * it to obtain the result used to populate the given instance. + *
+ * This method is factored to introduce thread guard for reused selects. + * + * @param sel + * @param sm + * @param mapping + * @param subs + * @param fetch + * @param join + * @return + * @throws SQLException + */ + private Result getInitializeStateResult(Select sel, OpenJPAStateManager sm, ClassMapping mapping, + int subs, JDBCFetchConfiguration fetch, int join) throws SQLException { + if (!select(sel, mapping, subs, sm, null, fetch, join, true, false)) + return null; sel.wherePrimaryKey(sm.getObjectId(), mapping, this); sel.setExpectedResultCount(1, false); - if (_log.isTraceEnabled()) { - _log.trace("getInitializeStateResult: oid="+sm.getObjectId()+" "+mapping.getDescribedType()); - } - Result result = sel.execute(this, fetch); - cacheFinder(mapping, sel, fetch); - return result; + return sel.execute(this, fetch); } /** * Select a union of the data for the given instance from possible concrete * mappings and return the result. + *
+ * This method if factored out to ensure that union statement is populated + * and executed with synchronization for the first time provided the union + * statement is cached and later reused, but subsequent execution of the + * same union statement does not pay any synchronization cost. */ private Result getInitializeStateUnionResult(final OpenJPAStateManager sm, ClassMapping mapping, final ClassMapping[] mappings, final JDBCFetchConfiguration fetch) throws SQLException { - FinderQueryImpl fq = getFinder(mapping, fetch); - if (fq != null) - return fq.execute(sm, this, fetch); - final JDBCStoreManager store = this; - final int eager = Math.min(fetch.getEagerFetchMode(), - JDBCFetchConfiguration.EAGER_JOIN); Union union = mapping.getUnion(mappings.length); + if (requiresLocking(union)) { + synchronized (union) { + return getInitializeStateUnionResult(union, sm, mapping, mappings, fetch); + } + } else { + return getInitializeStateUnionResult(union, sm, mapping, mappings, fetch); + } + } + + /** + * Executes the given union to obtain the database record for the given instance. + * + * @param union an union to be executed to obtain the database record of the given instance. + * @param sm the instance for whom a union statement is executed + * @param mapping the mapping metadata of the given instance + * @param mappings any other independently joinable metadata + * @param fetch fetch configuration + * @return the selected database result + * @throws SQLException when things go wrong + */ + private Result getInitializeStateUnionResult(final Union union, final OpenJPAStateManager sm, + ClassMapping mapping, final ClassMapping[] mappings, + final JDBCFetchConfiguration fetch) throws SQLException { + final JDBCStoreManager store = this; + final int eager = Math.min(fetch.getEagerFetchMode(), JDBCFetchConfiguration.EAGER_JOIN); union.setExpectedResultCount(1, false); if (fetch.getSubclassFetchMode(mapping) != EagerFetchModes.EAGER_JOIN) union.abortUnion(); union.select(new Union.Selector() { public void select(Select sel, int i) { - sel.select(mappings[i], Select.SUBS_ANY_JOINABLE, store, fetch, - eager); + sel.select(mappings[i], Select.SUBS_ANY_JOINABLE, store, fetch, eager); sel.wherePrimaryKey(sm.getObjectId(), mappings[i], store); } }); - Result result = union.execute(this, fetch); - cacheFinder(mapping, union, fetch); - return result; + return union.execute(this, fetch); } /** - * Select primary key data to make sure the given instance exists, locking - * if needed. + * Gets the mapping for the least derived type of the given mapping. */ - private boolean selectPrimaryKey(OpenJPAStateManager sm, - ClassMapping mapping, JDBCFetchConfiguration fetch) - throws SQLException { - // select pks from base class record to ensure it exists and lock - // it if needed + ClassMapping getBaseMapping(ClassMapping mapping) { ClassMapping base = mapping; - while (base.getJoinablePCSuperclassMapping() != null) + while (base.getJoinablePCSuperclassMapping() != null) { base = base.getJoinablePCSuperclassMapping(); + } + return base; + } + /** + * Select primary key data to make sure the given instance exists, locking + * if needed. + *
+ * Creates or reuses a select. If selects are cached, then ensures that + * first preparation and execution is synchronized, but the subsequent + * executions are unsynchronized. + */ + private boolean selectPrimaryKey(OpenJPAStateManager sm, ClassMapping mapping, JDBCFetchConfiguration fetch) + throws SQLException { Select sel = mapping.getSelect(); + if (requiresLocking(sel)) { + synchronized (sel) { + return selectPrimaryKey(sel, sm, mapping, fetch); + } + } else { + return selectPrimaryKey(sel, sm, mapping, fetch); + } + } + + /** + * Affirms if the given select needs to be populated and executed with + * thread synchronization guard. + */ + private boolean requiresLocking(SelectExecutor sel) { + return !sel.isReadOnly() && _conf.getSelectCacheEnabled(); + } + + /** + * Executes the given Select to find whether the given object exists. + * This method is factored out to be executed with synchronization + * at first execution when select caching is turned on by configuration. + * @param sel a select to execute to find existence of the given oject + * @param sm the given object + * @param mapping the mapping for the given object + * @param fetch fetch configuration determines if locking is required + * @return true if the object exists + * @throws SQLException when things go wrong + * @see #selectPrimaryKey(OpenJPAStateManager, ClassMapping, JDBCFetchConfiguration) + */ + private boolean selectPrimaryKey(Select sel, OpenJPAStateManager sm, ClassMapping mapping, + JDBCFetchConfiguration fetch) throws SQLException { + ClassMapping base = getBaseMapping(mapping); sel.select(base.getPrimaryKeyColumns()); sel.wherePrimaryKey(sm.getObjectId(), base, this); - if (_log.isTraceEnabled()) { - _log.trace("selectPrimaryKey: oid="+sm.getObjectId()+" "+mapping.getDescribedType()); - } Result exists = sel.execute(this, fetch); try { if (isEmptyResult(exists)) @@ -628,48 +857,69 @@ public class JDBCStoreManager implements // if the instance is hollow and there's a customized // get by id method, use it - if (sm.getLoaded().length() == 0 - && mapping.customLoad(sm, this, null, jfetch)) + if (sm.getLoaded().length() == 0 && mapping.customLoad(sm, this, null, jfetch)) { removeLoadedFields(sm, fields); - - //### select is kind of a big object, and in some cases we don't - //### use it... would it be worth it to have a small shell select - //### object that only creates a real select when actually used? - + } Select sel = mapping.getSelect(); - if (select(sel, mapping, Select.SUBS_EXACT, sm, fields, jfetch, + + if (requiresLocking(sel)) { + synchronized (sel) { + if (selectAndLoad(sel, mapping, sm, fields, jfetch, lockLevel) == Boolean.FALSE) + return false; + } + } else { + if (selectAndLoad(sel, mapping, sm, fields, jfetch, lockLevel) == Boolean.FALSE) + return false; + } + + // now allow the fields to load themselves individually too + FieldMapping[] fms = mapping.getFieldMappings(); + for (int i = 0; i < fms.length; i++) { + if (fields.get(i) && !sm.getLoaded().get(i)) { + fms[i].load(sm, this, jfetch.traverseJDBC(fms[i])); + } + } + mapping.getVersion().afterLoad(sm, this); + return true; + } catch (ClassNotFoundException cnfe) { + throw new StoreException(cnfe); + } catch (SQLException se) { + throw SQLExceptions.getStore(se, _dict, lockLevel); + } + } + + /** + * Populates the given select, executes it and loads the resultant data into the given instance. + * @param sel + * @param mapping + * @param sm + * @param fields + * @param jfetch + * @param lockLevel + * @return false if the instance does not exist anymore. true if it were loaded. + * null if select is not required + * @throws SQLException + */ + private Boolean selectAndLoad(Select sel, ClassMapping mapping, OpenJPAStateManager sm, BitSet fields, + JDBCFetchConfiguration jfetch, int lockLevel) throws SQLException { + if (select(sel, mapping, Select.SUBS_EXACT, sm, fields, jfetch, EagerFetchModes.EAGER_JOIN, true, false)) { sel.wherePrimaryKey(sm.getObjectId(), mapping, this); if (_log.isTraceEnabled()) { _log.trace("load: "+mapping.getDescribedType()+" oid: "+sm.getObjectId()); } - res = sel.execute(this, jfetch, lockLevel); + Result res = sel.execute(this, jfetch, lockLevel); try { if (isEmptyResult(res)) return false; load(mapping, sm, jfetch, res); + return true; } finally { res.close(); } } + return null; - // now allow the fields to load themselves individually too - FieldMapping[] fms = mapping.getFieldMappings(); - for (int i = 0; i < fms.length; i++) - if (fields.get(i) && !sm.getLoaded().get(i)) { - if (_log.isTraceEnabled()) { - _log.trace("load field: '"+ fms[i].getName() + "' for oid="+sm.getObjectId() - +" "+mapping.getDescribedType()); - } - fms[i].load(sm, this, jfetch.traverseJDBC(fms[i])); - } - mapping.getVersion().afterLoad(sm, this); - return true; - } catch (ClassNotFoundException cnfe) { - throw new StoreException(cnfe); - } catch (SQLException se) { - throw SQLExceptions.getStore(se, _dict, lockLevel); - } } /** @@ -681,26 +931,20 @@ public class JDBCStoreManager implements fields.clear(i); } - public Collection loadAll(Collection sms, PCState state, int load, + public Collection loadAll(Collection sms, PCState state, int load, FetchConfiguration fetch, Object context) { return ImplHelper.loadAll(sms, this, state, load, fetch, context); } - public void beforeStateChange(OpenJPAStateManager sm, PCState fromState, - PCState toState) { + public void beforeStateChange(OpenJPAStateManager sm, PCState fromState, PCState toState) { } - public Collection flush(Collection sms) { + public Collection flush(Collection sms) { try { if (_conn != null && _conn.getInnermostDelegate().isReadOnly()) _conn.setReadOnly(false); } catch (SQLException e) { } - if (_log.isTraceEnabled()) { - for (OpenJPAStateManager sm: (Collection)sms) { - _log.trace("flush: "+sm.getPCState().getClass().getName() + " for oid="+sm.getObjectId()); - } - } return _conf.getUpdateManagerInstance().flush(sms, this); } @@ -717,8 +961,8 @@ public class JDBCStoreManager implements } try { - for (Iterator itr = stmnts.iterator(); itr.hasNext();) - ((Statement) itr.next()).cancel(); + for (Statement stmnt : stmnts) + stmnt.cancel(); return true; } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); @@ -731,8 +975,7 @@ public class JDBCStoreManager implements return ApplicationIds.assign(sm, this, preFlush); // datastore identity - Object val = ImplHelper.generateIdentityValue(_ctx, meta, - JavaTypes.LONG); + Object val = ImplHelper.generateIdentityValue(_ctx, meta, JavaTypes.LONG); if (val == null && meta.getIdentityStrategy() != ValueStrategies.NATIVE) return false; if (val == null) @@ -752,9 +995,7 @@ public class JDBCStoreManager implements } public Class getManagedType(Object oid) { - if (oid instanceof Id) - return ((Id) oid).getType(); - return null; + return (oid instanceof Id) ? ((Id) oid).getType() : null; } public Class getDataStoreIdType(ClassMetaData meta) { @@ -815,18 +1056,11 @@ public class JDBCStoreManager implements _log.trace("executeExtent: "+mappings[i].getDescribedType()); sel.logEagerRelations(); } - BitSet paged = selectExtent(sel, mappings[i], jfetch, - subclasses); - if (paged == null) - rops[i] = new InstanceResultObjectProvider(sel, - mappings[i], this, jfetch); - else - rops[i] = new PagingResultObjectProvider(sel, - mappings[i], this, jfetch, paged, Long.MAX_VALUE); + BitSet paged = selectExtent(sel, mappings[i], jfetch, subclasses); + rops[i] = (paged == null) ? new InstanceResultObjectProvider(sel, mappings[i], this, jfetch) + : new PagingResultObjectProvider(sel, mappings[i], this, jfetch, paged, Long.MAX_VALUE); } - if (rops.length == 1) - return rops[0]; - return new MergedResultObjectProvider(rops); + return (rops.length == 1) ? rops[0] : new MergedResultObjectProvider(rops); } // perform a union on all independent classes @@ -845,8 +1079,7 @@ public class JDBCStoreManager implements return new PagingResultObjectProvider(union, mappings, JDBCStoreManager.this, jfetch, paged, Long.MAX_VALUE); } - return new InstanceResultObjectProvider(union, mappings[0], this, - jfetch); + return new InstanceResultObjectProvider(union, mappings[0], this, jfetch); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } @@ -859,15 +1092,12 @@ public class JDBCStoreManager implements JDBCFetchConfiguration fetch, boolean subclasses) { int subs = (subclasses) ? Select.SUBS_JOINABLE : Select.SUBS_NONE; // decide between paging and standard iteration - BitSet paged = PagingResultObjectProvider.getPagedFields(sel, mapping, - this, fetch, JDBCFetchConfiguration.EAGER_PARALLEL, - Long.MAX_VALUE); + BitSet paged = PagingResultObjectProvider.getPagedFields(sel, mapping, this, fetch, + JDBCFetchConfiguration.EAGER_PARALLEL, Long.MAX_VALUE); if (paged == null) - sel.selectIdentifier(mapping, subs, this, fetch, - JDBCFetchConfiguration.EAGER_PARALLEL); + sel.selectIdentifier(mapping, subs, this, fetch, JDBCFetchConfiguration.EAGER_PARALLEL); else - sel.selectIdentifier(mapping, subs, this, fetch, - JDBCFetchConfiguration.EAGER_JOIN); + sel.selectIdentifier(mapping, subs, this, fetch, JDBCFetchConfiguration.EAGER_JOIN); return paged; } @@ -875,14 +1105,13 @@ public class JDBCStoreManager implements ExpressionParser ep = QueryLanguages.parserForLanguage(language); if (ep != null) { return new JDBCStoreQuery(this, ep); - } - if (QueryLanguages.LANG_SQL.equals(language)) { + } else if (QueryLanguages.LANG_SQL.equals(language)) { return new SQLStoreQuery(this); - } - if (QueryLanguages.LANG_PREPARED_SQL.equals(language)) { + } else if (QueryLanguages.LANG_PREPARED_SQL.equals(language)) { return new PreparedSQLStoreQuery(this); + } else { + return null; } - return null; } public StoreQuery newQuery(String language) { @@ -904,10 +1133,9 @@ public class JDBCStoreManager implements } public Seq getDataStoreIdSequence(ClassMetaData meta) { - if (meta.getIdentityStrategy() == ValueStrategies.NATIVE - || meta.getIdentityStrategy() == ValueStrategies.NONE) - return _conf.getSequenceInstance(); - return null; + return (meta.getIdentityStrategy() == ValueStrategies.NATIVE + || meta.getIdentityStrategy() == ValueStrategies.NONE) + ? _conf.getSequenceInstance() : null; } public Seq getValueSequence(FieldMetaData fmd) { @@ -961,13 +1189,9 @@ public class JDBCStoreManager implements /** * Find the object with the given oid. */ - public Object find(Object oid, ValueMapping vm, - JDBCFetchConfiguration fetch) { + public Object find(Object oid, ValueMapping vm, JDBCFetchConfiguration fetch) { if (oid == null) return null; - if (_log.isTraceEnabled()) { - _log.trace("find: oid="+oid+" "+vm.getDeclaredTypeMapping().getDescribedType()); - } Object pc = _ctx.find(oid, fetch, null, null, 0); if (pc == null && vm != null) { OrphanedKeyAction action = _conf.getOrphanedKeyActionInstance(); @@ -979,16 +1203,13 @@ public class JDBCStoreManager implements /** * Load the object in the current row of the given result. */ - public Object load(ClassMapping mapping, JDBCFetchConfiguration fetch, - BitSet exclude, Result result) throws SQLException { + public Object load(ClassMapping mapping, JDBCFetchConfiguration fetch, BitSet exclude, Result result) + throws SQLException { if (!mapping.isMapped()) - throw new InvalidStateException(_loc.get("virtual-mapping", - mapping)); + throw new InvalidStateException(_loc.get("virtual-mapping", mapping)); // get the object id for the row; base class selects pk columns - ClassMapping base = mapping; - while (base.getJoinablePCSuperclassMapping() != null) - base = base.getJoinablePCSuperclassMapping(); + ClassMapping base = getBaseMapping(mapping); Object oid = base.getObjectId(this, result, null, true, null); if (oid == null) return null; @@ -1023,15 +1244,11 @@ public class JDBCStoreManager implements * Load the given state manager with data from the result set. Only * mappings originally selected will be loaded. */ - private void load(ClassMapping mapping, OpenJPAStateManager sm, - JDBCFetchConfiguration fetch, Result res) throws SQLException { + private void load(ClassMapping mapping, OpenJPAStateManager sm, JDBCFetchConfiguration fetch, Result res) + throws SQLException { FieldMapping eagerToMany = load(mapping, sm, fetch, res, null); if (eagerToMany != null) { - if (_log.isTraceEnabled()) { - _log.trace("Loading eager toMany: "+eagerToMany.getName()+" for "+mapping); - } - eagerToMany.loadEagerJoin(sm, this, fetch.traverseJDBC(eagerToMany), - res); + eagerToMany.loadEagerJoin(sm, this, fetch.traverseJDBC(eagerToMany), res); } if (_active && _lm != null && res.isLocking()) _lm.loadedForUpdate(sm); @@ -1049,11 +1266,11 @@ public class JDBCStoreManager implements // load superclass data; base class loads version ClassMapping parent = mapping.getJoinablePCSuperclassMapping(); - if (parent != null) + if (parent != null) { eagerToMany = load(parent, sm, fetch, res, eagerToMany); - else if (sm.getVersion() == null) + } else if (sm.getVersion() == null) { mapping.getVersion().load(sm, this, res); - + } // load unloaded fields FieldMapping[] fms = mapping.getDefinedFieldMappings(); Object eres, processed; @@ -1069,11 +1286,9 @@ public class JDBCStoreManager implements if (eagerToMany == null && fms[i].isEagerSelectToMany()) eagerToMany = fms[i]; else - fms[i].loadEagerJoin(sm, this, - fetch.traverseJDBC(fms[i]), res); + fms[i].loadEagerJoin(sm, this, fetch.traverseJDBC(fms[i]), res); } else if (eres != null) { - processed = fms[i].loadEagerParallel(sm, this, - fetch.traverseJDBC(fms[i]), eres); + processed = fms[i].loadEagerParallel(sm, this, fetch.traverseJDBC(fms[i]), eres); if (processed != eres) res.putEager(fms[i], processed); } else { @@ -1118,7 +1333,7 @@ public class JDBCStoreManager implements return true; // add class conditions so that they're cloned for any batched selects boolean joinedSupers = false; - if(needClassCondition(mapping, subs, sm)) { + if (needClassCondition(mapping, subs, sm)) { joinedSupers = getJoinedSupers(sel, mapping, subs, outer); } @@ -1132,7 +1347,7 @@ public class JDBCStoreManager implements // the joins needed by these selects don't get in the WHERE clause // of the batched selects int seld = selectBaseMappings(sel, mapping, mapping, sm, fields, - fetch, eager, eagerToMany, ident, joinedSupers); + fetch, eager, eagerToMany, ident, joinedSupers); // select eager to-many relations last because during load they // advance the result set and could exhaust it, so no other mappings @@ -1155,35 +1370,29 @@ public class JDBCStoreManager implements } private boolean needClassCondition(ClassMapping mapping, int subs, OpenJPAStateManager sm) { - boolean retVal = false; - if(sm == null || sm.getPCState() == PCState.TRANSIENT) { - if(subs == Select.SUBS_JOINABLE || subs == Select.SUBS_NONE) { - retVal = true; - } - else { - if (mapping.getDiscriminator() != null - && SuperclassDiscriminatorStrategy.class.isInstance(mapping.getDiscriminator().getStrategy()) - && mapping.getMappingRepository().getConfiguration().getCompatibilityInstance() - .getSuperclassDiscriminatorStrategyByDefault()) { - retVal = true; - } + if (sm == null || sm.getPCState() == PCState.TRANSIENT) { + if (subs == Select.SUBS_JOINABLE || subs == Select.SUBS_NONE) { + return true; + } else { + return (mapping.getDiscriminator() != null + && SuperclassDiscriminatorStrategy.class.isInstance(mapping.getDiscriminator().getStrategy()) + && _conf.getCompatibilityInstance().getSuperclassDiscriminatorStrategyByDefault()); } } - return retVal; + return false; } /** * Mark the fields of this mapping as reserved so that eager fetches can't * get into infinite recursive situations. */ - private FieldMapping createEagerSelects(Select sel, ClassMapping mapping, - OpenJPAStateManager sm, BitSet fields, JDBCFetchConfiguration fetch, - int eager) { + private FieldMapping createEagerSelects(Select sel, ClassMapping mapping, OpenJPAStateManager sm, + BitSet fields, JDBCFetchConfiguration fetch, int eager) { if (mapping == null || eager == JDBCFetchConfiguration.EAGER_NONE) return null; FieldMapping eagerToMany = createEagerSelects(sel, - mapping.getJoinablePCSuperclassMapping(), sm, fields, fetch, eager); + mapping.getJoinablePCSuperclassMapping(), sm, fields, fetch, eager); FieldMapping[] fms = mapping.getDefinedFieldMappings(); boolean inEagerJoin = sel.hasEagerJoin(false); @@ -1229,10 +1438,8 @@ public class JDBCStoreManager implements // finally, try parallel if (eager == EagerFetchModes.EAGER_PARALLEL - && (sels = fms[i].supportsSelect(sel, Select.EAGER_PARALLEL, sm, - this, fetch)) != 0) - sel.eagerClone(fms[i], Select.EAGER_PARALLEL, - fms[i].isEagerSelectToMany(), sels); + && (sels = fms[i].supportsSelect(sel, Select.EAGER_PARALLEL, sm, this, fetch)) != 0) + sel.eagerClone(fms[i], Select.EAGER_PARALLEL, fms[i].isEagerSelectToMany(), sels); } return eagerToMany; } @@ -1244,8 +1451,7 @@ public class JDBCStoreManager implements OpenJPAStateManager sm, BitSet fields, JDBCFetchConfiguration fetch) { if (fields != null) return fields.get(fm.getIndex()); - if (sm != null && sm.getPCState() != PCState.TRANSIENT - && sm.getLoaded().get(fm.getIndex())) + if (sm != null && sm.getPCState() != PCState.TRANSIENT && sm.getLoaded().get(fm.getIndex())) return false; return fetch.requiresFetch(fm) == FetchConfiguration.FETCH_LOAD; } @@ -1265,14 +1471,12 @@ public class JDBCStoreManager implements * @return > 0 if the select is required, 0 if data was * selected but is not required, and < 0 if nothing was selected */ - private int selectBaseMappings(Select sel, ClassMapping mapping, - ClassMapping orig, OpenJPAStateManager sm, BitSet fields, - JDBCFetchConfiguration fetch, int eager, FieldMapping eagerToMany, + private int selectBaseMappings(Select sel, ClassMapping mapping, ClassMapping orig, OpenJPAStateManager sm, + BitSet fields, JDBCFetchConfiguration fetch, int eager, FieldMapping eagerToMany, boolean ident, boolean joined) { ClassMapping parent = mapping.getJoinablePCSuperclassMapping(); if (parent == null && !mapping.isMapped()) - throw new InvalidStateException(_loc.get("virtual-mapping", mapping. - getDescribedType())); + throw new InvalidStateException(_loc.get("virtual-mapping", mapping.getDescribedType())); int seld = -1; int pseld = -1; @@ -1296,23 +1500,18 @@ public class JDBCStoreManager implements seld = 1; // if no instance or no version, select version - if ((sm == null || sm.getVersion() == null) - && mapping.getVersion().select(sel, orig)) + if ((sm == null || sm.getVersion() == null) && mapping.getVersion().select(sel, orig)) seld = 1; - } else { - // recurse on parent - pseld = selectBaseMappings(sel, parent, orig, sm, fields, - fetch, eager, eagerToMany, ident, joined); + } else { // recurse on parent + pseld = selectBaseMappings(sel, parent, orig, sm, fields, fetch, eager, eagerToMany, ident, joined); } - // select the mappings in the given fields set, or based on fetch - // configuration if no fields given + // select the mappings in the given fields set, or based on fetch configuration if no fields given FieldMapping[] fms = mapping.getDefinedFieldMappings(); SelectExecutor esel; int fseld; for (int i = 0; i < fms.length; i++) { - // skip eager to-many select; we do that separately in calling - // method + // skip eager to-many select; we do that separately in calling method if (fms[i] == eagerToMany) continue; @@ -1320,31 +1519,24 @@ public class JDBCStoreManager implements esel = sel.getEager(fms[i]); if (esel != null) { if (esel == sel) - fms[i].selectEagerJoin(sel, sm, this, - fetch.traverseJDBC(fms[i]), eager); + fms[i].selectEagerJoin(sel, sm, this, fetch.traverseJDBC(fms[i]), eager); else - fms[i].selectEagerParallel(esel, sm, this, - fetch.traverseJDBC(fms[i]), eager); + fms[i].selectEagerParallel(esel, sm, this, fetch.traverseJDBC(fms[i]), eager); seld = Math.max(0, seld); } else if (requiresSelect(fms[i], sm, fields, fetch)) { - fseld = fms[i].select(sel, sm, this, - fetch.traverseJDBC(fms[i]), eager); + fseld = fms[i].select(sel, sm, this, fetch.traverseJDBC(fms[i]), eager); seld = Math.max(fseld, seld); } else if (optSelect(fms[i], sel, sm, fetch)) { - fseld = fms[i].select(sel, sm, this, - fetch.traverseJDBC(fms[i]), EagerFetchModes.EAGER_NONE); + fseld = fms[i].select(sel, sm, this, fetch.traverseJDBC(fms[i]), EagerFetchModes.EAGER_NONE); - // don't upgrade seld to > 0 based on these fields, since - // they're not in the calculated field set + // don't upgrade seld to > 0 based on these fields, since they're not in the calculated field set if (fseld >= 0 && seld < 0) seld = 0; } } - // in certain circumstances force join to superclass table to avoid - // SQL generation error. - if ( eagerToMany != null && pseld < 0 && !joined - && parent != null ) { + // in certain circumstances force join to superclass table to avoid SQL generation error. + if (eagerToMany != null && pseld < 0 && !joined && parent != null) { FieldMapping[] pfms = parent.getDefinedFieldMappings(); for (int i = 0; i < pfms.length; i++) { if (pfms[i] == eagerToMany ) { @@ -1354,8 +1546,7 @@ public class JDBCStoreManager implements } } - // join to parent table if the parent / any ancestors have selected - // anything + // join to parent table if the parent / any ancestors have selected anything if (!joined && pseld >= 0 && parent.getTable() != mapping.getTable()) sel.where(mapping.joinSuperclass(sel.newJoins(), false)); @@ -1369,9 +1560,8 @@ public class JDBCStoreManager implements * optimization. */ private boolean optSelect(FieldMapping fm, Select sel, OpenJPAStateManager sm, JDBCFetchConfiguration fetch) { - boolean dfg = - fetch.getIgnoreDfgForFkSelect() || - !fm.isInDefaultFetchGroup() && !fm.isDefaultFetchGroupExplicit(); + boolean dfg = fetch.getIgnoreDfgForFkSelect() || + !fm.isInDefaultFetchGroup() && !fm.isDefaultFetchGroupExplicit(); return dfg && (sm == null || sm.getPCState() == PCState.TRANSIENT || !sm.getLoaded().get(fm.getIndex())) && fm.supportsSelect(sel, Select.TYPE_TWO_PART, sm, this, fetch) > 0; @@ -1386,8 +1576,9 @@ public class JDBCStoreManager implements * @param sm the instance being selected for, or null if none * @param fetch the fetch configuration */ - private void selectSubclassMappings(Select sel, ClassMapping mapping, - OpenJPAStateManager sm, JDBCFetchConfiguration fetch) { + private void selectSubclassMappings(Select sel, ClassMapping mapping, + OpenJPAStateManager sm, JDBCFetchConfiguration fetch) { + loadSubclasses(mapping); ClassMapping[] subMappings = mapping.getJoinablePCSubclassMappings(); if (subMappings.length == 0) @@ -1403,10 +1594,9 @@ public class JDBCStoreManager implements FieldMapping[] fms; boolean joined; boolean canJoin = _dict.joinSyntax != JoinSyntaxes.SYNTAX_TRADITIONAL - && fetch.getSubclassFetchMode(mapping) != fetch.EAGER_NONE; + && fetch.getSubclassFetchMode(mapping) != JDBCFetchConfiguration.EAGER_NONE; for (int i = 0; i < subMappings.length; i++) { - if (!subMappings[i].supportsEagerSelect(sel, sm, this, mapping, - fetch)) + if (!subMappings[i].supportsEagerSelect(sel, sm, this, mapping, fetch)) continue; // initialize so that if we can't join, we pretend we already have @@ -1417,8 +1607,7 @@ public class JDBCStoreManager implements if (fetch.requiresFetch(fms[j]) != FetchConfiguration.FETCH_LOAD && ((!fms[j].isInDefaultFetchGroup() && fms[j].isDefaultFetchGroupExplicit()) - || fms[j].supportsSelect(sel, Select.TYPE_TWO_PART, sm, this, - fetch) <= 0)) + || fms[j].supportsSelect(sel, Select.TYPE_TWO_PART, sm, this, fetch) <= 0)) continue; // if we can join to the subclass, do so; much better chance @@ -1441,10 +1630,8 @@ public class JDBCStoreManager implements * Helper method to join from class to its subclass. Recursive to allow * for multiple hops, starting from the base class. */ - private static Joins joinSubclass(Select sel, ClassMapping base, - ClassMapping sub, Joins joins) { - if (sub == base || sub.getTable() == base.getTable() - || sel.isSelected(sub.getTable())) + private static Joins joinSubclass(Select sel, ClassMapping base, ClassMapping sub, Joins joins) { + if (sub == base || sub.getTable() == base.getTable() || sel.isSelected(sub.getTable())) return null; // recurse first so we go least->most derived @@ -1465,8 +1652,7 @@ public class JDBCStoreManager implements return; // if the subclass list is set, no need to load subs - if (mapping.getRepository().getPersistentTypeNames(false, - _ctx.getClassLoader()) != null) { + if (mapping.getRepository().getPersistentTypeNames(false, _ctx.getClassLoader()) != null) { dsc.setSubclassesLoaded(true); return; } @@ -1494,22 +1680,6 @@ public class JDBCStoreManager implements _stmnts.remove(stmnt); } - FinderQueryImpl getFinder(ClassMapping mapping, FetchConfiguration fetch) { - FinderCache cache = getFinderCache(); - return cache == null - ? null : (FinderQueryImpl)cache.get(mapping, fetch); - } - - boolean cacheFinder(ClassMapping mapping, SelectExecutor select, - FetchConfiguration fetch) { - FinderCache cache = getFinderCache(); - return cache != null && cache.cache(mapping, select, fetch) != null; - } - - FinderCache getFinderCache() { - return (((BrokerImpl)getContext()).getCacheFinderQuery()) - ? getConfiguration().getFinderCacheInstance() : null; - } /** * Connection returned to client code. Makes sure its wrapped connection ref count is decremented on finalize. @@ -1595,27 +1765,24 @@ public class JDBCStoreManager implements } protected Statement createStatement(boolean wrap) throws SQLException { - return new CancelStatement(super.createStatement(false), - RefCountConnection.this); + return new CancelStatement(super.createStatement(false), RefCountConnection.this); } protected Statement createStatement(int rsType, int rsConcur, boolean wrap) throws SQLException { - return new CancelStatement(super.createStatement(rsType, rsConcur, - false), RefCountConnection.this); + return new CancelStatement(super.createStatement(rsType, rsConcur, false), RefCountConnection.this); } protected PreparedStatement prepareStatement(String sql, boolean wrap) throws SQLException { - return new CancelPreparedStatement(super.prepareStatement(sql, - false), RefCountConnection.this); + return new CancelPreparedStatement(super.prepareStatement(sql, false), RefCountConnection.this); } - protected PreparedStatement prepareStatement(String sql, int rsType, - int rsConcur, boolean wrap) throws SQLException { - return new CancelPreparedStatement(super.prepareStatement(sql, - rsType, rsConcur, false), RefCountConnection.this); + protected PreparedStatement prepareStatement(String sql, int rsType, int rsConcur, boolean wrap) + throws SQLException { + return new CancelPreparedStatement(super.prepareStatement(sql, rsType, rsConcur, false), + RefCountConnection.this); } } @@ -1716,11 +1883,9 @@ public class JDBCStoreManager implements * Statement type that adds and removes itself from the set of active * statements so that it can be canceled. */ - private class CancelPreparedStatement extends - DelegatingPreparedStatement { + private class CancelPreparedStatement extends DelegatingPreparedStatement { - public CancelPreparedStatement(PreparedStatement stmnt, - Connection conn) { + public CancelPreparedStatement(PreparedStatement stmnt, Connection conn) { super(stmnt, conn); } Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java?rev=1240448&r1=1240447&r2=1240448&view=diff ============================================================================== --- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java (original) +++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java Sat Feb 4 03:06:46 2012 @@ -18,52 +18,53 @@ */ package org.apache.openjpa.lib.util; -import java.util.HashMap; import java.util.Map; +import org.apache.openjpa.lib.util.concurrent.ConcurrentReferenceHashMap; + + /** * A thread-specific storage similar to {@link ThreadLocal} that * heuristically relaxes the affinity of a value to a thread. *
* A thread t1 can {@linkplain #set(Object) set} a value, while * a different thread t2 can {@linkplain #get() access} the same - * value, if t1 and t2 are {@link #isEquivalent(Thread, Thread) + * value, if t1 and t2 are {@link #eq(Object, Object) * equivalent}. * * @author Pinaki Poddar * @since 2.2.0 */ -public class FlexibleThreadLocal { - private final Map _values = new HashMap(); +public class FlexibleThreadLocal extends ConcurrentReferenceHashMap { + + /** + * Must not hold hard reference to the threads used as keys. + */ + public FlexibleThreadLocal() { + super(ReferenceMap.WEAK, ReferenceMap.HARD); + } /** - * Gets the value associated with the calling thread or its - * {@link #isEquivalent(Thread, Thread) equivalent}. + * Gets the value associated with the calling thread or its equivalent. * - * @see #isEquivalent(Thread, Thread) + * @see #eq(Object, Object) */ - public T get() { + public Object get() { Thread current = Thread.currentThread(); - if (_values.containsKey(current)) { - return _values.get(current); + if (containsKey(current)) { + return super.get(current); } else { - if (_values.size() == 1) { - return _values.values().iterator().next(); - } else { - for (Map.Entry e : _values.entrySet()) { - if (isEquivalent(e.getKey(), current)) - return e.getValue(); - } - } - throw new RuntimeException(current + " is not a known thread. Known threads are " + _values); + if (size() == 1) + return ((Map.Entry)entrySet().iterator().next()).getValue(); + throw new RuntimeException(current + " is not a known thread. Known threads are " + keySet()); } } /** * Associates the value to the current thread. */ - public T set(T t) { - return _values.put(Thread.currentThread(), t); + public void set(Object t) { + super.put(Thread.currentThread(), t); } /** @@ -75,11 +76,14 @@ public class FlexibleThreadLocal { * can equal its parent thread which is a native thread. But the parent * (native) thread is not equal to the child thread. */ - protected boolean isEquivalent(Thread a, Thread b) { + @Override + protected boolean eq(Object a, Object b) { if (a == b) return true; - if (a.getThreadGroup() == b.getThreadGroup()) return true; if (a == null || b == null) return false; + if (a instanceof Thread && b instanceof Thread) + if (((Thread)a).getThreadGroup() == ((Thread)b).getThreadGroup()) + return true; return a.equals(b) || b.equals(a); } - + } Added: openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestFlexibleThreadLocal.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestFlexibleThreadLocal.java?rev=1240448&view=auto ============================================================================== --- openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestFlexibleThreadLocal.java (added) +++ openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestFlexibleThreadLocal.java Sat Feb 4 03:06:46 2012 @@ -0,0 +1,110 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agEmployee_Last_Name to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.lib.util; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; + +import junit.framework.Assert; +import junit.framework.TestCase; + +public class TestFlexibleThreadLocal extends TestCase { + private static final int MAX_THREAD = 10; + + public void testCorrectValuesAreRetrievedWhenThreadsAreInSameGroup() throws Exception { + ExecutorService threadPool = Executors.newCachedThreadPool(); + List> futures = new ArrayList>(); + for (int i = 0; i < MAX_THREAD; i++) { + Future f = threadPool.submit(new User()); + futures.add(f); + } + waitForTermination(futures); + threadPool.shutdown(); + threadPool.awaitTermination(10, TimeUnit.SECONDS); + } + + public void testCorrectValuesAreRetrievedWhenThreadsAreNotInSameGroup() throws Exception { + Thread[] threads = new Thread[MAX_THREAD]; + for (int i = 0; i < MAX_THREAD; i++) { + threads[i] = new Thread(new User()); + threads[i].start(); + } + waitForTermination(threads); + } + + + void waitForTermination(Thread[] threads) { + for (int i = 0; i < MAX_THREAD; i++) { + try { + threads[i].join(); + threads[i].interrupt(); + } catch (Exception e) { + e.printStackTrace(); + fail(e.toString()); + } + } + } + + void waitForTermination(List> futures) { + for (Future f : futures) { + try { + f.get(); + } catch (Exception e) { + e.printStackTrace(); + fail(e.toString()); + } + } + } + +} + +/** + * Sets and gets random values in a flexible thread local. + * + */ +class User implements Runnable { + private static final Random _rng = new Random(); + Integer[] randoms = new Integer[20]; + static final FlexibleThreadLocal test = new FlexibleThreadLocal(); + + public User() { + for (int i = 0; i < randoms.length; i++) { + randoms[i] = _rng.nextInt(); + } + } + + @Override + public void run() { + for (int i = 0; i < randoms.length; i++) { + test.set(randoms[i]); + try { + Thread.sleep(10); + } catch (InterruptedException e) { + e.printStackTrace(); + } + Assert.assertEquals(Thread.currentThread() + " item " + i, randoms[i], test.get()); + } + } + +} Propchange: openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestFlexibleThreadLocal.java ------------------------------------------------------------------------------ svn:eol-style = native From commits-return-9351-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 03:11:37 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 536739EE5 for ; Sat, 4 Feb 2012 03:11:37 +0000 (UTC) Received: (qmail 505 invoked by uid 500); 4 Feb 2012 03:11:37 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 384 invoked by uid 500); 4 Feb 2012 03:11:28 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 99749 invoked by uid 99); 4 Feb 2012 03:11:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 03:11:23 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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; Sat, 04 Feb 2012 03:11:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q143B0BQ020703 for ; Sat, 4 Feb 2012 03:11:00 GMT Date: Fri, 3 Feb 2012 22:11:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <10342773.42997.1328325060167.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
From commits-return-9352-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 03:21:40 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B3999199 for ; Sat, 4 Feb 2012 03:21:40 +0000 (UTC) Received: (qmail 13676 invoked by uid 500); 4 Feb 2012 03:21:38 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 13613 invoked by uid 500); 4 Feb 2012 03:21:29 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 13606 invoked by uid 99); 4 Feb 2012 03:21:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 03:21:26 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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; Sat, 04 Feb 2012 03:21:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q143L0o5020774 for ; Sat, 4 Feb 2012 03:21:00 GMT Date: Fri, 3 Feb 2012 22:21:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <29808598.42999.1328325660106.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
From commits-return-9353-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 03:35:27 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA0F99FAA for ; Sat, 4 Feb 2012 03:35:26 +0000 (UTC) Received: (qmail 21479 invoked by uid 500); 4 Feb 2012 03:35:26 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 21359 invoked by uid 500); 4 Feb 2012 03:35:26 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 21259 invoked by uid 99); 4 Feb 2012 03:35:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 03:35:25 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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; Sat, 04 Feb 2012 03:35:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q143Z0so020872 for ; Sat, 4 Feb 2012 03:35:00 GMT Date: Fri, 3 Feb 2012 22:35:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <10358296.43001.1328326500070.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
From commits-return-9354-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 03:49:30 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BBE809202 for ; Sat, 4 Feb 2012 03:49:30 +0000 (UTC) Received: (qmail 31392 invoked by uid 500); 4 Feb 2012 03:49:30 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 31330 invoked by uid 500); 4 Feb 2012 03:49:28 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 31317 invoked by uid 99); 4 Feb 2012 03:49:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 03:49:26 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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; Sat, 04 Feb 2012 03:49:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q143n0K3021973 for ; Sat, 4 Feb 2012 03:49:00 GMT Date: Fri, 3 Feb 2012 22:49:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <20437772.43003.1328327340021.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
From commits-return-9355-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 04:10:32 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B91909300 for ; Sat, 4 Feb 2012 04:10:32 +0000 (UTC) Received: (qmail 34270 invoked by uid 500); 4 Feb 2012 04:10:31 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 34253 invoked by uid 500); 4 Feb 2012 04:10:27 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 34147 invoked by uid 99); 4 Feb 2012 04:10:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 04:10:25 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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; Sat, 04 Feb 2012 04:10:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q144A0Sa022149 for ; Sat, 4 Feb 2012 04:10:00 GMT Date: Fri, 3 Feb 2012 23:10:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <21597747.43005.1328328600107.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
From commits-return-9356-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 18:10:24 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6E8CD95DA for ; Sat, 4 Feb 2012 18:10:24 +0000 (UTC) Received: (qmail 53596 invoked by uid 500); 4 Feb 2012 18:10:24 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 53557 invoked by uid 500); 4 Feb 2012 18:10:23 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 53550 invoked by uid 99); 4 Feb 2012 18:10:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 18:10:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 18:10:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6D37123889F7 for ; Sat, 4 Feb 2012 18:09:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240572 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Date: Sat, 04 Feb 2012 18:09:58 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120204180958.6D37123889F7@eris.apache.org> Author: ppoddar Date: Sat Feb 4 18:09:57 2012 New Revision: 1240572 URL: http://svn.apache.org/viewvc?rev=1240572&view=rev Log: OPENJPA-2099: account for detached state manager Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java?rev=1240572&r1=1240571&r2=1240572&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Sat Feb 4 18:09:57 2012 @@ -593,7 +593,7 @@ public class JDBCStoreManager implements PersistenceCapable pc = (PersistenceCapable) member; OpenJPAStateManager sm = (OpenJPAStateManager) pc.pcGetStateManager(); - ClassMapping cm = (ClassMapping)sm.getMetaData(); + ClassMapping cm = (ClassMapping)_conf.getMetaDataRepositoryInstance().getCachedMetaData(pc.getClass()); FieldMapping[] fmd = cm.getFieldMappings(); for (int j = 0; j < fmd.length; j++) { if (fmd[j].isTypePC()) { From commits-return-9357-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 18:37:59 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B297F99AB for ; Sat, 4 Feb 2012 18:37:59 +0000 (UTC) Received: (qmail 83115 invoked by uid 500); 4 Feb 2012 18:37:59 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 83052 invoked by uid 500); 4 Feb 2012 18:37:59 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 83045 invoked by uid 99); 4 Feb 2012 18:37:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 18:37:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.8] (HELO aegis.apache.org) (140.211.11.8) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 18:37:56 +0000 Received: from aegis (localhost [127.0.0.1]) by aegis.apache.org (Postfix) with ESMTP id 88444C011A for ; Sat, 4 Feb 2012 18:37:15 +0000 (UTC) Date: Sat, 4 Feb 2012 18:37:15 +0000 (UTC) From: Apache Jenkins Server To: commits@openjpa.apache.org Message-ID: <790172317.4481328380635541.JavaMail.hudson@aegis> Subject: Build failed in Jenkins: OpenJPA-trunk #635 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Jenkins-Job: OpenJPA-trunk X-Jenkins-Result: FAILURE See Changes: [ppoddar] OPENJPA-2099: account for detached state manager ------------------------------------------ [...truncated 142 lines...] Running org.apache.openjpa.lib.graph.TestDepthFirstAnalysis Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec Running org.apache.openjpa.lib.xml.TestDocTypeReader Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.04 sec Running org.apache.openjpa.lib.rop.TestListResultList Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec Running org.apache.openjpa.lib.util.TestImmutableValue Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec Running org.apache.openjpa.lib.rop.TestMergedResultObjectProvider Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.04 sec Running org.apache.openjpa.lib.conf.test.TestConfigurationImpl 2 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionProperties" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 2 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionURL" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 3 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionUserName" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 3 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionDriverName" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 4 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionPassword" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 4 WARN [main] openjpa.Runtime - The configuration property named "openjpa.DynamicEnhancementAgent" was not recognized and will be ignored. 1 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionProperties" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 1 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionURL" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 2 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionUserName" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 2 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionDriverName" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 3 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionPassword" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 4 WARN [main] openjpa.Runtime - The configuration property named "openjpa.DynamicEnhancementAgent" was not recognized and will be ignored. 0 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionProperties" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 1 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionURL" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 1 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionUserName" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 2 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionDriverName" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 2 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionPassword" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 3 WARN [main] openjpa.Runtime - The configuration property named "openjpa.DynamicEnhancementAgent" was not recognized and will be ignored. 0 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionProperties" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 1 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionURL" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 1 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionUserName" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 1 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionDriverName" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 1 WARN [main] openjpa.Runtime - The configuration property named "openjpa.ConnectionPassword" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.objectKey". 2 WARN [main] openjpa.Runtime - The configuration property named "openjpa.DynamicEnhancementAgent" was not recognized and will be ignored. Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.055 sec Running org.apache.openjpa.lib.rop.TestOrderedMergedResultObjectProvider Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.082 sec Running org.apache.openjpa.lib.identifier.TestIdentifiers Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec Running org.apache.openjpa.lib.util.TestPropertiesParser Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.069 sec Running org.apache.openjpa.lib.util.TestMultiClassLoader Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec Running org.apache.openjpa.lib.util.TestTemporaryClassLoader Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec Running org.apache.openjpa.lib.util.TestReferenceSet Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec Running org.apache.openjpa.lib.rop.TestSimpleResultList Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec Running org.apache.openjpa.lib.rop.TestSoftRandomAccessResultList Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec Running org.apache.openjpa.lib.util.TestSimpleRegex Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec Running org.apache.openjpa.lib.util.TestAbstractEventManager Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec Running org.apache.openjpa.lib.util.TestOptions Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec Running org.apache.openjpa.lib.util.TestFlexibleThreadLocal Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.425 sec Running org.apache.openjpa.lib.util.TestUUIDGenerator Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.384 sec Running org.apache.openjpa.lib.util.TestParameterTemplate Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec Running org.apache.openjpa.lib.xml.TestXMLWriter Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec Running org.apache.openjpa.lib.rop.TestWindowResultList Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec Running org.apache.openjpa.lib.util.svn.TestSVNUtils Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec Running org.apache.openjpa.lib.rop.TestRangeResultObjectProvider Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec Running org.apache.openjpa.lib.util.concurrent.TestNullSafeConcurrentHashMap Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.135 sec Results : Tests run: 276, Failures: 0, Errors: 0, Skipped: 0 [JENKINS] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: [INFO] [jar:jar {execution: default-jar}] [INFO] [jar:test-jar {execution: attach-tests}] [INFO] Building jar: [INFO] [ianal:verify-legal-files {execution: default}] [INFO] Checking legal files in: openjpa-lib-2.2.0-SNAPSHOT.jar [INFO] Checking legal files in: openjpa-lib-2.2.0-SNAPSHOT-tests.jar [INFO] [apache-rat:check {execution: default}] [INFO] Exclude: **/.*/** [INFO] Exclude: **/target/**/* [INFO] [install:install {execution: default-install}] [INFO] Installing to /home/hudson/.m2/repository/org/apache/openjpa/openjpa-lib/2.2.0-SNAPSHOT/openjpa-lib-2.2.0-SNAPSHOT.jar [INFO] Installing to /home/hudson/.m2/repository/org/apache/openjpa/openjpa-lib/2.2.0-SNAPSHOT/openjpa-lib-2.2.0-SNAPSHOT-tests.jar [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk/modules/org.apache.openjpa$openjpa-lib/builds/2012-02-04_18-34-35/archive/org.apache.openjpa/openjpa-lib/2.2.0-SNAPSHOT/openjpa-lib-2.2.0-SNAPSHOT.pom [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk/modules/org.apache.openjpa$openjpa-lib/builds/2012-02-04_18-34-35/archive/org.apache.openjpa/openjpa-lib/2.2.0-SNAPSHOT/openjpa-lib-2.2.0-SNAPSHOT.jar [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk/modules/org.apache.openjpa$openjpa-lib/builds/2012-02-04_18-34-35/archive/org.apache.openjpa/openjpa-lib/2.2.0-SNAPSHOT/openjpa-lib-2.2.0-SNAPSHOT-tests.jar [INFO] ------------------------------------------------------------------------ [INFO] Building OpenJPA Kernel [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting file set: (included: [**], excluded: []) [INFO] [buildnumber:create {execution: default}] [INFO] [enforcer:enforce {execution: default}] [INFO] [javacc:jjtree-javacc {execution: jjtree-javacc-jpql}] Java Compiler Compiler Version 4.0 (Tree Builder) (type "jjtree" with no arguments for help) Reading from file . . . File " does not exist. Will create one. Annotated grammar generated successfully in Java Compiler Compiler Version 4.0 (Parser Generator) (type "javacc" with no arguments for help) Reading from file . . . Warning: Choice conflict in (...)* construct at line 939, column 17. Expansion nested within construct and expansion following construct have common prefixes, one of which is: "+" Consider using a lookahead of 2 or more for nested expansion. Warning: Choice conflict in (...)* construct at line 948, column 17. Expansion nested within construct and expansion following construct have common prefixes, one of which is: "*" Consider using a lookahead of 2 or more for nested expansion. File "TokenMgrError.java" does not exist. Will create one. Warning: ParseException.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you. File "Token.java" does not exist. Will create one. File "JavaCharStream.java" does not exist. Will create one. Parser generated with 0 errors and 3 warnings. [INFO] Processed 1 grammar [INFO] [checkstyle:checkstyle {execution: default}] [INFO] Starting audit... Audit done. [WARNING] Unable to locate Source XRef to link to - DISABLED [INFO] [remote-resources:process {execution: default}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 15 resources [INFO] Copying 3 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 496 source files to [INFO] [antrun:run {execution: add-was-interfaces}] [INFO] Executing tasks [INFO] Executed tasks [INFO] [antrun:run {execution: generate-standard-sco-proxies}] [INFO] Executing tasks org.apache.openjpa.util.java$sql$Date$proxy org.apache.openjpa.util.java$sql$Time$proxy org.apache.openjpa.util.java$sql$Timestamp$proxy org.apache.openjpa.util.java$util$ArrayList$proxy org.apache.openjpa.util.java$util$Date$proxy org.apache.openjpa.util.java$util$GregorianCalendar$proxy org.apache.openjpa.util.java$util$HashMap$proxy org.apache.openjpa.util.java$util$HashSet$proxy org.apache.openjpa.util.java$util$Hashtable$proxy org.apache.openjpa.util.java$util$LinkedList$proxy org.apache.openjpa.util.java$util$Properties$proxy org.apache.openjpa.util.java$util$TreeMap$proxy org.apache.openjpa.util.java$util$TreeSet$proxy org.apache.openjpa.util.java$util$Vector$proxy org.apache.openjpa.util.java$util$EnumMap$proxy org.apache.openjpa.util.java$util$IdentityHashMap$proxy org.apache.openjpa.util.java$util$LinkedHashMap$proxy org.apache.openjpa.util.java$util$LinkedHashSet$proxy org.apache.openjpa.util.java$util$PriorityQueue$proxy [INFO] Executed tasks [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory [INFO] Copying 3 resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Compiling 10 source files to [WARNING] DEPRECATED [systemProperties]: Use systemPropertyVariables instead. [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.apache.openjpa.meta.TestMemberProvider Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec Running org.apache.openjpa.meta.TestJavaTypes Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec Running org.apache.openjpa.conf.TestSpecification Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec Running org.apache.openjpa.enhance.TestPCSubclassNameConversion Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec Running org.apache.openjpa.meta.TestAccessCode Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec Running org.apache.openjpa.enhance.TestGetDeclaredMethod Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec Running org.apache.openjpa.util.TestProxyManager Tests run: 41, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.279 sec Running org.apache.openjpa.ee.TestOSGiManagedRuntime Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec Running org.apache.openjpa.util.TestResultShape Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec Running org.apache.openjpa.ee.TestWASManagedRuntime Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec Results : Tests run: 72, Failures: 0, Errors: 0, Skipped: 0 [JENKINS] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: [INFO] [jar:jar {execution: default-jar}] [INFO] [jar:test-jar {execution: attach-tests}] [INFO] Building jar: [INFO] [ianal:verify-legal-files {execution: default}] [INFO] Checking legal files in: openjpa-kernel-2.2.0-SNAPSHOT.jar [INFO] Checking legal files in: openjpa-kernel-2.2.0-SNAPSHOT-tests.jar [INFO] [apache-rat:check {execution: default}] [INFO] Exclude: **/.*/** [INFO] Exclude: **/target/**/* [INFO] [install:install {execution: default-install}] [INFO] Installing to /home/hudson/.m2/repository/org/apache/openjpa/openjpa-kernel/2.2.0-SNAPSHOT/openjpa-kernel-2.2.0-SNAPSHOT.jar [INFO] Installing to /home/hudson/.m2/repository/org/apache/openjpa/openjpa-kernel/2.2.0-SNAPSHOT/openjpa-kernel-2.2.0-SNAPSHOT-tests.jar [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk/modules/org.apache.openjpa$openjpa-kernel/builds/2012-02-04_18-34-35/archive/org.apache.openjpa/openjpa-kernel/2.2.0-SNAPSHOT/openjpa-kernel-2.2.0-SNAPSHOT.pom [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk/modules/org.apache.openjpa$openjpa-kernel/builds/2012-02-04_18-34-35/archive/org.apache.openjpa/openjpa-kernel/2.2.0-SNAPSHOT/openjpa-kernel-2.2.0-SNAPSHOT.jar [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk/modules/org.apache.openjpa$openjpa-kernel/builds/2012-02-04_18-34-35/archive/org.apache.openjpa/openjpa-kernel/2.2.0-SNAPSHOT/openjpa-kernel-2.2.0-SNAPSHOT-tests.jar [INFO] ------------------------------------------------------------------------ [INFO] Building OpenJPA JDBC [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting file set: (included: [**], excluded: []) [INFO] [buildnumber:create {execution: default}] [INFO] [enforcer:enforce {execution: default}] [INFO] [checkstyle:checkstyle {execution: default}] [INFO] Starting audit... :596: Line is longer than 120 characters. Audit done. [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk/modules/org.apache.openjpa$openjpa-jdbc/builds/2012-02-04_18-34-35/archive/org.apache.openjpa/openjpa-jdbc/2.2.0-SNAPSHOT/openjpa-jdbc-2.2.0-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] An error has occurred in Checkstyle report generation. Embedded error: There are 1 checkstyle errors. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 minutes 5 seconds [INFO] Finished at: Sat Feb 04 18:37:12 UTC 2012 [INFO] Final Memory: 79M/439M [INFO] ------------------------------------------------------------------------ channel stopped From commits-return-9358-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 18:47:12 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 426B79EB6 for ; Sat, 4 Feb 2012 18:47:12 +0000 (UTC) Received: (qmail 92643 invoked by uid 500); 4 Feb 2012 18:47:11 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 92611 invoked by uid 500); 4 Feb 2012 18:47:11 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 92604 invoked by uid 99); 4 Feb 2012 18:47:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 18:47:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 18:47:08 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0B1C223888E4 for ; Sat, 4 Feb 2012 18:46:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240589 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Date: Sat, 04 Feb 2012 18:46:47 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120204184648.0B1C223888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ppoddar Date: Sat Feb 4 18:46:47 2012 New Revision: 1240589 URL: http://svn.apache.org/viewvc?rev=1240589&view=rev Log: OPENJPA-2099: checkstyle error Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java?rev=1240589&r1=1240588&r2=1240589&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Sat Feb 4 18:46:47 2012 @@ -593,7 +593,8 @@ public class JDBCStoreManager implements PersistenceCapable pc = (PersistenceCapable) member; OpenJPAStateManager sm = (OpenJPAStateManager) pc.pcGetStateManager(); - ClassMapping cm = (ClassMapping)_conf.getMetaDataRepositoryInstance().getCachedMetaData(pc.getClass()); + ClassMapping cm = (ClassMapping)_conf.getMetaDataRepositoryInstance() + .getCachedMetaData(pc.getClass()); FieldMapping[] fmd = cm.getFieldMappings(); for (int j = 0; j < fmd.length; j++) { if (fmd[j].isTypePC()) { From commits-return-9359-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sat Feb 4 20:06:39 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 411C49C87 for ; Sat, 4 Feb 2012 20:06:39 +0000 (UTC) Received: (qmail 42745 invoked by uid 500); 4 Feb 2012 20:06:39 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 42695 invoked by uid 500); 4 Feb 2012 20:06:38 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 42687 invoked by uid 99); 4 Feb 2012 20:06:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 20:06:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.8] (HELO aegis.apache.org) (140.211.11.8) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 20:06:35 +0000 Received: from aegis (localhost [127.0.0.1]) by aegis.apache.org (Postfix) with ESMTP id 08D01C011A for ; Sat, 4 Feb 2012 20:06:15 +0000 (UTC) Date: Sat, 4 Feb 2012 20:06:15 +0000 (UTC) From: Apache Jenkins Server To: commits@openjpa.apache.org Message-ID: <1591978765.4521328385975020.JavaMail.hudson@aegis> In-Reply-To: <790172317.4481328380635541.JavaMail.hudson@aegis> References: <790172317.4481328380635541.JavaMail.hudson@aegis> Subject: Jenkins build is back to normal : OpenJPA-trunk #636 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Jenkins-Job: OpenJPA-trunk X-Jenkins-Result: SUCCESS X-Virus-Checked: Checked by ClamAV on apache.org See From commits-return-9360-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 6 02:34:31 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 590D19EB0 for ; Mon, 6 Feb 2012 02:34:31 +0000 (UTC) Received: (qmail 87510 invoked by uid 500); 6 Feb 2012 02:34:30 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 87448 invoked by uid 500); 6 Feb 2012 02:34:25 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 87441 invoked by uid 99); 6 Feb 2012 02:34:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 02:34:22 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Mon, 06 Feb 2012 02:34:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q162Y0n6000179 for ; Mon, 6 Feb 2012 02:34:00 GMT Date: Sun, 5 Feb 2012 21:34:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <9108144.43268.1328495640216.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Apache Nexus Release Process (1.2.x-2.1.x) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
From commits-return-9361-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 6 15:58:03 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 468BE902A for ; Mon, 6 Feb 2012 15:58:03 +0000 (UTC) Received: (qmail 30905 invoked by uid 500); 6 Feb 2012 15:58:03 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 30861 invoked by uid 500); 6 Feb 2012 15:58:02 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 30854 invoked by uid 99); 6 Feb 2012 15:58:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 15:58:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 15:58:01 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9579523889E0 for ; Mon, 6 Feb 2012 15:57:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1241052 - /openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/meta/localizer.properties Date: Mon, 06 Feb 2012 15:57:41 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120206155741.9579523889E0@eris.apache.org> Author: kwsutter Date: Mon Feb 6 15:57:41 2012 New Revision: 1241052 URL: http://svn.apache.org/viewvc?rev=1241052&view=rev Log: OPENJPA-2076. The ASL message that is inserted into the generated metamodel code should not be translated. Added a comment to indicate this. Modified: openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/meta/localizer.properties Modified: openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/meta/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/meta/localizer.properties?rev=1241052&r1=1241051&r2=1241052&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/meta/localizer.properties (original) +++ openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/meta/localizer.properties Mon Feb 6 15:57:41 2012 @@ -61,6 +61,7 @@ meta-field-not-param: Encountered field meta-field-less-param: Encountered field "{2} {1}" in "{0}". This field has \ less than two parameters and is not recognized as a canonical field. type-wrong-category:"{0}" categorized as "{1}" should be a "{2}" +# Do not translate mmg-asl-header mmg-asl-header: Licensed to the Apache Software Foundation (ASF) under one \ or more contributor license agreements. See the NOTICE file distributed \ with this work for additional information regarding copyright ownership.\ From commits-return-9362-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 6 22:03:32 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B70319D73 for ; Mon, 6 Feb 2012 22:03:32 +0000 (UTC) Received: (qmail 10205 invoked by uid 500); 6 Feb 2012 22:03:32 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 10150 invoked by uid 500); 6 Feb 2012 22:03:32 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 10143 invoked by uid 99); 6 Feb 2012 22:03:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 22:03:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 22:03:25 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id ACC9D23888CD for ; Mon, 6 Feb 2012 22:03:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1241207 - in /openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/conf/ openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ openjpa-kernel/src/main/java/org/apache/openjpa/util/ openjpa-persistence-jdbc/src/main/ant/ openjp... Date: Mon, 06 Feb 2012 22:03:03 -0000 To: commits@openjpa.apache.org From: jrbauer@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120206220303.ACC9D23888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jrbauer Date: Mon Feb 6 22:03:02 2012 New Revision: 1241207 URL: http://svn.apache.org/viewvc?rev=1241207&view=rev Log: OPENJPA-2120 Add option for optimizing copy operations for qualifying id classes. Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Device.java (with props) openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/DeviceId.java (with props) openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Hardware.java (with props) openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/HardwareId.java (with props) openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Software.java (with props) openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/SoftwareId.java (with props) openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/TestOptimizeIdCopy.java (with props) openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/optidcpy_persistence.xml (with props) Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java?rev=1241207&r1=1241206&r2=1241207&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java Mon Feb 6 22:03:02 2012 @@ -1918,5 +1918,37 @@ public interface OpenJPAConfiguration */ public void setPostLoadOnMerge(Boolean postLoadOnMerge); + /** + * Whether to attempt to optimize id class copy operations during the + * enhancement process. Optimization is only applicable for simple id classes + * that have a constructor with the proper construction parameters and + * direct assignments to fields within the id class during construction. + * If the optimization cannot occur, the enhancer will fallback to the + * noraml behavior. + * @since 2.2.0 + */ + public boolean getOptimizeIdCopy(); + + /** + * Whether to attempt to optimize id class copy operations during the + * enhancement process. Optimization is only applicable for simple id classes + * that have a constructor with the proper construction parameters and + * direct assignments to fields within the id class during construction. + * If the optimization cannot occur, the enhancer will fallback to the + * normal behavior. + * @since 2.2.0 + */ + public void setOptimizeIdCopy(boolean optimizeIds); + + /** + * Whether to attempt to optimize id class copy operations during the + * enhancement process. Optimization is only applicable for simple id classes + * that have a constructor with the proper construction parameters and + * direct assignments to fields within the id class during construction. + * If the optimization cannot occur, the enhancer will fallback to the + * normal behavior. + * @since 2.2.0 + */ + public void setOptimizeIdCopy(Boolean optimizeIds); } Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java?rev=1241207&r1=1241206&r2=1241207&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java Mon Feb 6 22:03:02 2012 @@ -177,6 +177,7 @@ public class OpenJPAConfigurationImpl public ObjectValue instrumentationManager; public PluginListValue instrumentationProviders; public BooleanValue postLoadOnMerge; + public BooleanValue optimizeIdCopy; // custom values public BrokerFactoryValue brokerFactoryPlugin; @@ -402,6 +403,10 @@ public class OpenJPAConfigurationImpl postLoadOnMerge.setDefault("false"); postLoadOnMerge.set(false); + optimizeIdCopy = addBoolean("OptimizeIdCopy"); + optimizeIdCopy.setDefault("false"); + optimizeIdCopy.set(false); + autoClear = addInt("AutoClear"); aliases = new String[] { "datastore", @@ -1856,5 +1861,18 @@ public class OpenJPAConfigurationImpl setPostLoadOnMerge(postLoadOnMerge.booleanValue()); } + public boolean getOptimizeIdCopy() { + return optimizeIdCopy.get(); + } + + public void setOptimizeIdCopy(boolean optimizeId) { + optimizeIdCopy.set(optimizeId); + } + + public void setOptimizeIdCopy(Boolean optimizeId) { + if (optimizeId != null) { + setOptimizeIdCopy(optimizeId.booleanValue()); + } + } } Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=1241207&r1=1241206&r2=1241207&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java Mon Feb 6 22:03:02 2012 @@ -69,6 +69,7 @@ import org.apache.openjpa.meta.FieldMeta import org.apache.openjpa.meta.JavaTypes; import org.apache.openjpa.meta.MetaDataRepository; import org.apache.openjpa.meta.ValueStrategies; +import org.apache.openjpa.util.ApplicationIds; import org.apache.openjpa.util.GeneralException; import org.apache.openjpa.util.InternalException; import org.apache.openjpa.util.BigDecimalId; @@ -102,6 +103,7 @@ import serp.bytecode.LoadInstruction; import serp.bytecode.LookupSwitchInstruction; import serp.bytecode.MethodInstruction; import serp.bytecode.Project; +import serp.bytecode.PutFieldInstruction; import serp.bytecode.TableSwitchInstruction; import serp.bytecode.ClassInstruction; import serp.util.Strings; @@ -212,6 +214,8 @@ public class PCEnhancer { private boolean _isAlreadySubclassed = false; private boolean _bcsConfigured = false; + private boolean _optimizeIdCopy = false; // whether to attempt optimizing id copy + /** * Constructor. Supply configuration and type to enhance. This will look * up the metadata for type from conf's @@ -280,6 +284,8 @@ public class PCEnhancer { } else _repos = repos; _meta = _repos.getMetaData(type.getType(), loader, false); + + configureOptimizeIdCopy(); } /** @@ -2010,11 +2016,52 @@ public class PCEnhancer { // id. = pc.; FieldMetaData[] fmds = getCreateSubclass() ? _meta.getFields() : _meta.getDeclaredFields(); - Class type; + Class type; String name; Field field; Method setter; boolean reflect; + // If optimizeIdCopy is enabled and not a field manager method, try to + // optimize the copyTo by using a public constructor instead of reflection + if (_optimizeIdCopy && !fieldManager) { + ArrayList pkfields = optimizeIdCopy(oidType, fmds); + if (pkfields != null) { + // search for a constructor on the IdClass that can be used + // to construct the IdClass + int parmOrder[] = getIdClassConstructorParmOrder(oidType, pkfields, fmds); + if (parmOrder != null) { + // found a matching constructor. parm array is constructor parm order + code.anew().setType(oidType); + code.dup(); + // build the parm list in order + Class[] clsArgs = new Class[parmOrder.length]; + for (int i = 0; i < clsArgs.length; i++) { + int parmIndex = parmOrder[i]; + clsArgs[i] = fmds[parmIndex].getObjectIdFieldType(); + loadManagedInstance(code, false); + addGetManagedValueCode(code, fmds[parmIndex]); + } + // invoke the public constructor to create a new local id + code.invokespecial().setMethod(oidType, "", void.class, clsArgs); + int ret = code.getNextLocalsIndex(); + code.astore().setLocal(ret); + + // swap out the app id with the new one + code.aload().setLocal(1); + code.checkcast().setType(ObjectId.class); + code.aload().setLocal(ret); + code.invokestatic().setMethod(ApplicationIds.class, + "setAppId", void.class, new Class[] { ObjectId.class, + Object.class }); + code.vreturn(); + + code.calculateMaxStack(); + code.calculateMaxLocals(); + return; + } + } + } + for (int i = 0; i < fmds.length; i++) { if (!fmds[i].isPrimaryKey()) continue; @@ -2428,17 +2475,28 @@ public class PCEnhancer { if (Modifier.isPublic(field.getModifiers())) code.getfield().setField(field); else { - // Reflection.getXXX(oid, Reflection.findField(...)); - code.classconstant().setClass(oidType); - code.constant().setValue(name); - code.constant().setValue(true); - code.invokestatic().setMethod(Reflection.class, - "findField", Field.class, new Class[] { - Class.class, String.class, boolean.class }); - code.invokestatic().setMethod - (getReflectionGetterMethod(type, Field.class)); - if (!type.isPrimitive() && type != Object.class) - code.checkcast().setType(type); + boolean usedFastOid = false; + if (_optimizeIdCopy) { + // If fastOids, ignore access type and try to use a public getter + getter = Reflection.findGetter(oidType, name, false); + if (getter != null && Modifier.isPublic(getter.getModifiers())) { + usedFastOid = true; + code.invokevirtual().setMethod(getter); + } + } + if (!usedFastOid) { + // Reflection.getXXX(oid, Reflection.findField(...)); + code.classconstant().setClass(oidType); + code.constant().setValue(name); + code.constant().setValue(true); + code.invokestatic().setMethod(Reflection.class, + "findField", Field.class, new Class[] { + Class.class, String.class, boolean.class }); + code.invokestatic().setMethod + (getReflectionGetterMethod(type, Field.class)); + if (!type.isPrimitive() && type != Object.class) + code.checkcast().setType(type); + } } } else { getter = Reflection.findGetter(oidType, name, true); @@ -4823,4 +4881,116 @@ public class PCEnhancer { } return false; } + + /** + * Read the optimizedIdCopy value from the config (if available) + */ + private void configureOptimizeIdCopy() { + if (_repos != null && _repos.getConfiguration() != null) { + _optimizeIdCopy = _repos.getConfiguration().getOptimizeIdCopy(); + } + } + + /* + * Cycles through all primary keys verifying whether they can and should + * be used for faster oid copy. The field must be private and must + * not have a public setter. If this is the case, the list of pk fields is + * returned. If not, returns null. + */ + private ArrayList optimizeIdCopy(Class oidType, FieldMetaData[] fmds) { + // collect all object id fields and verify they + // a) have a private field + // b) do not have a public setter + ArrayList pkFields = new ArrayList(); + // build list of primary key fields + for (int i = 0; i < fmds.length; i++) { + if (!fmds[i].isPrimaryKey()) + continue; + // optimizing copy with PC type not (yet) supported + if (fmds[i].getDeclaredTypeCode() == JavaTypes.PC) { + return null; + } + String name = fmds[i].getName(); + Field fld = Reflection.findField(oidType, name, false); + if (fld == null || Modifier.isPublic(fld.getModifiers())) { + return null; + } + Method setter = Reflection.findSetter(oidType, name, false); + if (setter == null || !Modifier.isPublic(setter.getModifiers())) { + pkFields.add(i); + } else { + return null; + } + } + return pkFields.size() > 0 ? pkFields : null; + } + + /* + * Cycles through all constructors of an IdClass and examines the instructions to find + * a matching constructor for the provided pk fields. If a match is found, it returns + * the order (relative to the field metadata) of the constructor parameters. If a match + * is not found, returns null. + */ + private int[] getIdClassConstructorParmOrder(Class oidType, ArrayList pkfields, + FieldMetaData[] fmds) { + Project project = new Project(); + BCClass bc = project.loadClass(oidType); + BCMethod[] methods = bc.getDeclaredMethods(""); + if (methods == null || methods.length == 0) { + return null; + } + + int parmOrder[] = new int[pkfields.size()]; + for (BCMethod method : methods) { + // constructor must be public + if (!method.isPublic()) { + continue; + } + Class[] parmTypes = method.getParamTypes(); + // make sure the constructors have the same # of parms as + // the number of pk fields + if (parmTypes.length != pkfields.size()) { + continue; + } + + int parmOrderIndex = 0; + Code code = method.getCode(false); + Instruction[] ins = code.getInstructions(); + for (int i = 0; i < ins.length; i++) { + if (ins[i] instanceof PutFieldInstruction) { + PutFieldInstruction pfi = (PutFieldInstruction)ins[i]; + for (int j = 0; j < pkfields.size(); j++) { + int fieldNum = pkfields.get(j); + // Compare the field being set with the current pk field + String parmName = fmds[fieldNum].getName(); + Class parmType = fmds[fieldNum].getType(); + if (parmName.equals(pfi.getFieldName())) { + // backup and examine the load instruction parm + if (i > 0 && ins[i-1] instanceof LoadInstruction) { + LoadInstruction li = (LoadInstruction)ins[i-1]; + // Get the local index from the instruction. This will be the index + // of the constructor parameter. must be less than or equal to the + // max parm index to prevent from picking up locals that could have + // been produced within the constructor. Also make sure the parm type + // matches the fmd type + int parm = li.getLocal(); + if (parm <= pkfields.size() && parmTypes[parm-1].equals(parmType)) { + parmOrder[parmOrderIndex] = fieldNum; + parmOrderIndex++; + } + } else { + // Some other instruction found. can't make a determination of which local/parm + // is being used on the putfield. + break; + } + } + } + } + } + if (parmOrderIndex == pkfields.size()) { + return parmOrder; + } + } + return null; + } } Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java?rev=1241207&r1=1241206&r2=1241207&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java Mon Feb 6 22:03:02 2012 @@ -576,6 +576,14 @@ public class ApplicationIds { } /** + * Sets the underlying id of an ObjectId. Should only + * be used with simple (idclass) types. + */ + public static void setAppId(ObjectId id, Object newId) { + id.setId(newId); + } + + /** * Helper class used to transfer pk values to/from application oids. */ private static class PrimaryKeyFieldManager Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml?rev=1241207&r1=1241206&r2=1241207&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml (original) +++ openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml Mon Feb 6 22:03:02 2012 @@ -31,12 +31,12 @@ - - + + - - - + + + @@ -83,7 +83,8 @@ - + + @@ -99,17 +100,17 @@ - + - + - + @@ -132,15 +133,24 @@ - + - - + + + + + + + + + + + Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Device.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Device.java?rev=1241207&view=auto ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Device.java (added) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Device.java Mon Feb 6 22:03:02 2012 @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.enhance.ids; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.IdClass; +import javax.persistence.Table; + +@Entity +@Table(name="ID_DEVTBL") +@IdClass(DeviceId.class) +public class Device { + + @Id + @Column(name="DEV_ID") + private int id; + + @Id + @Column(name="DEV_TYPE") + private int type; + + @Column(name="DEV_DESC") + private String description; + + public Device() { + + } + + public void setId(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + public void setType(int type) { + this.type = type; + } + + public int getType() { + return type; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } +} Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Device.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/DeviceId.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/DeviceId.java?rev=1241207&view=auto ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/DeviceId.java (added) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/DeviceId.java Mon Feb 6 22:03:02 2012 @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.enhance.ids; + +public class DeviceId { + + public static boolean[] usedConstructor = new boolean[3]; + + private int id; + + private int type; + + public DeviceId() { + usedConstructor[0] = true; + } + + @SuppressWarnings("unused") + private DeviceId(int i, int t) { + usedConstructor[1] = true; + id = i; + type = t; + } + + public DeviceId(int i) { + usedConstructor[2] = true; + id = i; + } + + public int getId() { + return id; + } + + public int getType() { + return type; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof DeviceId) { + DeviceId did = (DeviceId)obj; + return did.getId() == getId() && + did.getType() == getType(); + } + return false; + } + + @Override + public int hashCode() { + return getId() + getType(); + } +} Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/DeviceId.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Hardware.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Hardware.java?rev=1241207&view=auto ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Hardware.java (added) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Hardware.java Mon Feb 6 22:03:02 2012 @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.enhance.ids; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.IdClass; +import javax.persistence.Table; + +@Table(name="ID_HWTBL") +@IdClass(HardwareId.class) +@Entity +public class Hardware { + + @Id + private String serial; + + @Id + private String model; + + private String description; + + public Hardware() { + } + + public void setSerial(String serial) { + this.serial = serial; + } + + public String getSerial() { + return serial; + } + + public void setModel(String model) { + this.model = model; + } + + public String getModel() { + return model; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } +} Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Hardware.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/HardwareId.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/HardwareId.java?rev=1241207&view=auto ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/HardwareId.java (added) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/HardwareId.java Mon Feb 6 22:03:02 2012 @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.enhance.ids; + +public class HardwareId { + + public static boolean[] usedConstructor = new boolean[2]; + + private String serial; + + private String model; + + public HardwareId() { + } + + // Parms out of order + public HardwareId(String model, String serial) { + usedConstructor[0] = true; + this.serial = serial; + this.model = model; + } + + public HardwareId(String model,int serial) { + usedConstructor[1] = true; + this.model = model; + this.serial = Integer.toString(serial); + } + + public String getSerial() { + return serial; + } + + public String getModel() { + return model; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof HardwareId) { + HardwareId hid = (HardwareId)obj; + return hid.getModel().equals(getModel()) && + hid.getSerial().equals(getSerial()); + } + return false; + } + + @Override + public int hashCode() { + return getSerial().hashCode() + getModel().hashCode(); + } +} Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/HardwareId.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Software.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Software.java?rev=1241207&view=auto ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Software.java (added) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Software.java Mon Feb 6 22:03:02 2012 @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.enhance.ids; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.IdClass; +import javax.persistence.Table; + +@Entity +@Table(name="ID_SWTBL") +@IdClass(SoftwareId.class) +public class Software { + + @Id + private Integer idInteger; + + @Id + private int idInt; + + @Id + private String idString; + + public Software() { + + } + + public void setIdInteger(Integer idInteger) { + this.idInteger = idInteger; + } + + public Integer getIdInteger() { + return idInteger; + } + + public void setIdInt(int idInt) { + this.idInt = idInt; + } + + public int getIdInt() { + return idInt; + } + + public void setIdString(String idString) { + this.idString = idString; + } + + public String getIdString() { + return idString; + } + +} Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/Software.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/SoftwareId.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/SoftwareId.java?rev=1241207&view=auto ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/SoftwareId.java (added) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/SoftwareId.java Mon Feb 6 22:03:02 2012 @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.enhance.ids; + +public class SoftwareId { + + public static boolean[] usedConstructor = new boolean[3]; + + private Integer idInteger; + + private int idInt; + + private String idString; + + public SoftwareId() { + + } + + public SoftwareId(int idint) { + usedConstructor[0] = true; + idInt = idint; + } + + public SoftwareId(Integer idinteger, int idint) { + usedConstructor[1] = true; + idInteger = idinteger; + idInt = idint; + } + + public SoftwareId(Integer idinteger, int idint, String idstring) { + usedConstructor[2] = true; + idInteger = idinteger; + idInt = idint; + idString =idstring; + } + public Integer getIdInteger() { + return idInteger; + } + + public int getIdInt() { + return idInt; + } + + public String getIdString() { + return idString; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof SoftwareId) { + SoftwareId swid = (SoftwareId)obj; + return swid.getIdInt() == getIdInt() && + swid.getIdInteger().equals(getIdInteger()) && + swid.getIdString().equals(getIdString()); + } + return false; + } + + @Override + public int hashCode() { + return getIdInt() + getIdInteger().hashCode() + getIdString().hashCode(); + } + +} Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/SoftwareId.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/TestOptimizeIdCopy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/TestOptimizeIdCopy.java?rev=1241207&view=auto ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/TestOptimizeIdCopy.java (added) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/TestOptimizeIdCopy.java Mon Feb 6 22:03:02 2012 @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.enhance.ids; + +import java.util.List; +import java.util.Random; + +import javax.persistence.EntityManager; +import javax.persistence.TypedQuery; + +import org.apache.openjpa.persistence.test.SingleEMFTestCase; + +/** + * Verifies the use of the openjpa.OptimizeIdCopy configuration parameter. This parameter + * changes the behavior of the enhancer and thus, must be set before enhancement occurs. There + * is special enhancement task in main/ant/enhancer.xml to ensure this value is set + * during the enhancement process for the entities used by this test. + */ +public class TestOptimizeIdCopy extends SingleEMFTestCase { + + @Override + public void setUp() { + setUp(Device.class,Hardware.class,Software.class, CLEAR_TABLES); + } + + /* + * Verifies that constructor-based Id optimization occurs during Id copy. Asserts + * only the proper/expected public constructor is called during the id copy operation. + */ + public void testIdOptimization() { + EntityManager em = emf.createEntityManager(); + + // Add a software entity + Software sw = new Software(); + int id = new Random().nextInt(); + sw.setIdInt(id); + sw.setIdInteger(10); + sw.setIdString("StringIdVal"); + + em.getTransaction().begin(); + em.persist(sw); + em.getTransaction().commit(); + em.clear(); + + TypedQuery swq = em.createQuery("select sw from Software sw", Software.class); + List swl = swq.getResultList(); + assertTrue("Software result list > 0", swl.size() > 0); + // Id copy optimization should have used the 3rd constructor + assertFalse("First constructor was not used", SoftwareId.usedConstructor[0]); + assertFalse("Second constructor was not used", SoftwareId.usedConstructor[1]); + assertTrue("Third (correct) constructor was used", SoftwareId.usedConstructor[2]); + em.close(); + } + + /* + * Verifies that constructor based optimization functions even if parms + * are different than field order + */ + public void testIdOptimizationConstructorOutOfOrder() { + EntityManager em = emf.createEntityManager(); + + Hardware hw = new Hardware(); + String id = "Model" + (new Random().nextInt()); + hw.setModel("Model" + id); + hw.setSerial("123XYZ"); + + em.getTransaction().begin(); + em.persist(hw); + em.getTransaction().commit(); + em.clear(); + + TypedQuery hwq = em.createQuery("select hw from Hardware hw", Hardware.class); + List hwl = hwq.getResultList(); + assertTrue("Hardware result list > 0", hwl.size() > 0); + // Id copy optimization should have used the first constructor + assertTrue("First (correct) constructor was used", HardwareId.usedConstructor[0]); + assertFalse("Second constructor was not used", HardwareId.usedConstructor[1]); + em.close(); + } + + /* + * Verifies that classes without a proper constructor do not get optimized + */ + public void testNoOptimization() { + EntityManager em = emf.createEntityManager(); + + int id = new Random().nextInt(); + Device d = new Device(); + d.setId(id); + d.setType(10); + + em.getTransaction().begin(); + em.persist(d); + em.getTransaction().commit(); + em.clear(); + + TypedQuery dq = em.createQuery("select d from Device d", Device.class); + List dl = dq.getResultList(); + assertTrue("Device result list > 0", dl.size() > 0); + // Only the first, default constructor should have been called + assertTrue("First (default) constructor was used", DeviceId.usedConstructor[0]); + assertFalse("Second constructor was not used", DeviceId.usedConstructor[1]); + assertFalse("Third constructor was not used", DeviceId.usedConstructor[2]); + em.close(); + } +} Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/ids/TestOptimizeIdCopy.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/optidcpy_persistence.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/optidcpy_persistence.xml?rev=1241207&view=auto ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/optidcpy_persistence.xml (added) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/optidcpy_persistence.xml Mon Feb 6 22:03:02 2012 @@ -0,0 +1,38 @@ + + + + + + + This PU + + org.apache.openjpa.enhance.ids.Device + org.apache.openjpa.enhance.ids.Hardware + org.apache.openjpa.enhance.ids.Software + + + + + \ No newline at end of file Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/optidcpy_persistence.xml ------------------------------------------------------------------------------ svn:eol-style = native From commits-return-9363-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 6 22:14:23 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 590A29531 for ; Mon, 6 Feb 2012 22:14:23 +0000 (UTC) Received: (qmail 30837 invoked by uid 500); 6 Feb 2012 22:14:23 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 30779 invoked by uid 500); 6 Feb 2012 22:14:22 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 30772 invoked by uid 99); 6 Feb 2012 22:14:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 22:14:22 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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; Mon, 06 Feb 2012 22:14:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q16ME0ei000460 for ; Mon, 6 Feb 2012 22:14:00 GMT Date: Mon, 6 Feb 2012 17:14:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <7568134.43438.1328566440211.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
From commits-return-9364-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 7 15:44:50 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C29F09FDF for ; Tue, 7 Feb 2012 15:44:50 +0000 (UTC) Received: (qmail 7184 invoked by uid 500); 7 Feb 2012 15:44:50 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 7126 invoked by uid 500); 7 Feb 2012 15:44:50 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 7119 invoked by uid 99); 7 Feb 2012 15:44:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 15:44:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 15:44:48 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E84822388A2C for ; Tue, 7 Feb 2012 15:44:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1241492 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java Date: Tue, 07 Feb 2012 15:44:28 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120207154428.E84822388A2C@eris.apache.org> Author: kwsutter Date: Tue Feb 7 15:44:28 2012 New Revision: 1241492 URL: http://svn.apache.org/viewvc?rev=1241492&view=rev Log: OPENJPA-2099. Temporarily disabling openjpa.CachesSelect property while cutting the 2.2.0 release. Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java?rev=1241492&r1=1241491&r2=1241492&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java Tue Feb 7 15:44:28 2012 @@ -356,6 +356,7 @@ public class JDBCConfigurationImpl cacheSelect = new ImmutableBooleanValue("jdbc.CachesSelect"); addValue(cacheSelect); cacheSelect.setDefault("false"); + cacheSelect.set(false); // Disable openjpa.CachesSelect until openjpa-2099 is complete // this static initializer is to get past a weird // ClassCircularityError that happens only under IBM's From commits-return-9365-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 7 16:24:16 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 52DE39344 for ; Tue, 7 Feb 2012 16:24:16 +0000 (UTC) Received: (qmail 28327 invoked by uid 500); 7 Feb 2012 16:24:16 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 28265 invoked by uid 500); 7 Feb 2012 16:24:15 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 28258 invoked by uid 99); 7 Feb 2012 16:24:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 16:24:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 16:24:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D7F8723888E4 for ; Tue, 7 Feb 2012 16:23:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1241509 - in /openjpa/trunk/openjpa-project/src/doc/manual: ref_guide_caching.xml ref_guide_conf.xml Date: Tue, 07 Feb 2012 16:23:51 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120207162351.D7F8723888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ppoddar Date: Tue Feb 7 16:23:51 2012 New Revision: 1241509 URL: http://svn.apache.org/viewvc?rev=1241509&view=rev Log: OPENJPA-2099: doc for openjpa.jdbc.CachesSelect option Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml?rev=1241509&r1=1241508&r2=1241509&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml (original) +++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml Tue Feb 7 16:23:51 2012 @@ -1351,4 +1351,29 @@ for a JPQL query. +
+ Select Cache + + caching + Select Cache + + + OpenJPA generates SQL SELECT statements to fetch database records and populates the persistent entity states + from the result data. Under certain assumptions, these select statements are invariant for an entity + or its relations except that their binding parameters vary between executions. In version 2.2.0, OpenJPA + allows these select statements be reused. Such reuse avoids the cost of regenerating these statements in + every execution. + + + This facility can be activated by openjpa.jdbc.CachesSelect configuration + property. This property accepts boolean value of true or + false. By default, the property value is false. + The property value can be changed once and only once. + + + The assumption that a select statement for a persistent entity is invariant holds only if the fetch plan + is not dynamically modified. OpenJPA runtime currently makes no attempt to ensure that the assumption + is held true i.e. the application is not modifying the fetch plan dynamically. + +
Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml?rev=1241509&r1=1241508&r2=1241509&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml (original) +++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml Tue Feb 7 16:23:51 2012 @@ -3427,6 +3427,43 @@ levels are equivalent. Lock levels The following properties apply exclusively to the OpenJPA JDBC back-end. + +
+ + openjpa.jdbc.CachesSelect + + + + Select Cache + + + + + caching + + + Select Cache + + + +Property name: +openjpa.jdbc.CachesSelect + + +Resource adaptor config-property: +CachesSelect + + +Default: false. + + +Description: A plugin string (see +) describing the options to reuse SQL SELECT +statements generated to load persistent entity and its relations. +See for details. + +
+
openjpa.jdbc.ConnectionDecorators From commits-return-9366-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 7 18:05:45 2012 Return-Path: <commits-return-9366-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F23599284 for <apmail-openjpa-commits-archive@www.apache.org>; Tue, 7 Feb 2012 18:05:44 +0000 (UTC) Received: (qmail 71503 invoked by uid 500); 7 Feb 2012 18:05:44 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 71443 invoked by uid 500); 7 Feb 2012 18:05:44 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 71436 invoked by uid 99); 7 Feb 2012 18:05:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 18:05:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.8] (HELO aegis.apache.org) (140.211.11.8) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 18:05:43 +0000 Received: from aegis (localhost [127.0.0.1]) by aegis.apache.org (Postfix) with ESMTP id 7D503C00A0 for <commits@openjpa.apache.org>; Tue, 7 Feb 2012 18:05:23 +0000 (UTC) Date: Tue, 7 Feb 2012 18:05:23 +0000 (UTC) From: Apache Jenkins Server <jenkins@builds.apache.org> To: commits@openjpa.apache.org Message-ID: <1029474086.111328637923511.JavaMail.hudson@aegis> Subject: Jenkins build is back to normal : OpenJPA-trunk #640 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Jenkins-Job: OpenJPA-trunk X-Jenkins-Result: SUCCESS See <https://builds.apache.org/job/OpenJPA-trunk/640/changes> From commits-return-9367-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 8 00:52:57 2012 Return-Path: <commits-return-9367-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 019CC91E3 for <apmail-openjpa-commits-archive@www.apache.org>; Wed, 8 Feb 2012 00:52:57 +0000 (UTC) Received: (qmail 57532 invoked by uid 500); 8 Feb 2012 00:52:56 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 57472 invoked by uid 500); 8 Feb 2012 00:52:56 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 57465 invoked by uid 99); 8 Feb 2012 00:52:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 00:52:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 00:52:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1BE84238897D for <commits@openjpa.apache.org>; Wed, 8 Feb 2012 00:52:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1241719 - in /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance: AsmAdaptor.java PCClassFileTransformer.java Date: Wed, 08 Feb 2012 00:52:33 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120208005233.1BE84238897D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwsutter Date: Wed Feb 8 00:52:32 2012 New Revision: 1241719 URL: http://svn.apache.org/viewvc?rev=1241719&view=rev Log: OPENJPA-2122. The conditional to check for the proper Java 7 major version (51) was incorrect. I also updated how we invoked the ASM hook so that the Trace message in the finally block would output the correct number of bytes. Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java?rev=1241719&r1=1241718&r2=1241719&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java Wed Feb 8 00:52:32 2012 @@ -74,7 +74,7 @@ public final class AsmAdaptor { } public static byte[] toByteArray(BCClass bc, byte[] returnBytes) throws IOException { - if (returnBytes.length >= 8 && (returnBytes[6] << 8 + returnBytes[7]) >= Java7_MajorVersion) { + if (bc.getMajorVersion() >= Java7_MajorVersion) { returnBytes = toJava7ByteArray(bc, returnBytes); } return returnBytes; Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java?rev=1241719&r1=1241718&r2=1241719&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java Wed Feb 8 00:52:32 2012 @@ -30,6 +30,8 @@ import org.apache.openjpa.lib.util.Local import org.apache.openjpa.lib.util.Options; import org.apache.openjpa.meta.MetaDataRepository; import org.apache.openjpa.util.GeneralException; + +import serp.bytecode.BCClass; import serp.bytecode.Project; import serp.bytecode.lowlevel.ConstantPoolTable; @@ -150,8 +152,9 @@ public class PCClassFileTransformer if (enhancer.run() == PCEnhancer.ENHANCE_NONE) return null; - returnBytes = enhancer.getPCBytecode().toByteArray(); - return AsmAdaptor.toByteArray(enhancer.getPCBytecode(), returnBytes); + BCClass pcb = enhancer.getPCBytecode(); + returnBytes = AsmAdaptor.toByteArray(pcb, pcb.toByteArray()); + return returnBytes; } catch (Throwable t) { _log.warn(_loc.get("cft-exception-thrown", className), t); if (t instanceof RuntimeException) From commits-return-9368-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 8 20:22:27 2012 Return-Path: <commits-return-9368-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BEB0298EC for <apmail-openjpa-commits-archive@www.apache.org>; Wed, 8 Feb 2012 20:22:27 +0000 (UTC) Received: (qmail 63004 invoked by uid 500); 8 Feb 2012 20:22:27 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 62927 invoked by uid 500); 8 Feb 2012 20:22:27 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 62892 invoked by uid 99); 8 Feb 2012 20:22:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 20:22:26 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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, 08 Feb 2012 20:22:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q18KM0i9022051 for <commits@openjpa.apache.org>; Wed, 8 Feb 2012 20:22:01 GMT Date: Wed, 8 Feb 2012 15:22:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <21598625.43952.1328732520025.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org <html> <head> <base href=3D"https://cwiki.apache.org/confluence"> <link rel=3D"stylesheet" href=3D"/confluence/s/2042/9/5/_/style= s/combined.css?spaceKey=3Dopenjpa&forWysiwyg=3Dtrue" type=3D"text/css"> </head> <body style=3D"background: white;" bgcolor=3D"white" class=3D"email-body"> <div id=3D"pageContent"> <div id=3D"notificationFormat"> <div class=3D"wiki-content"> <div class=3D"email"> <h2><a href=3D"https://cwiki.apache.org/confluence/display/openjpa/Rele= ase+Setup">Release Setup</a></h2> <h4>Page <b>edited</b> by <a href=3D"https://cwiki.apache.o= rg/confluence/display/~allee8285@gmail.com">Albert Lee</a> </h4> <br/> <h4>Changes (1)</h4> =20 =20 <div id=3D"page-diffs"> <table class=3D"diff" cellpadding=3D"0" cellspacing=3D"= 0"> =20 <tr><td class=3D"diff-snipped" >...<br></td></tr> <tr><td class=3D"diff-unchanged" >default-preference-list SHA51= 2 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed = <br>{code} <br></td></tr> <tr><td class=3D"diff-added-lines" style=3D"background-color: #= dfd;">** If you are using an existing gpg certificate, update your current = certificate with the above preference using: <br>{code:none} <br>leealber@j= padev:~/.gnupg$ gpg --edit-key Albert Lee <br>Secret key is available. <br>= <br>pub 1024D/8007117F created: 2007-11-05 expires: never usage: = SC <br> trust: ultimate validity: ultimate <br>s= ub 2048g/8D910F8A created: 2007-11-05 expires: never usage: E <= br>[ultimate] (1). Albert Lee (CODE SIGNING KEY) <allee8285@apache.org&g= t; <br> <br>Invalid command (try "help") <br> <br>Command> sh= owpref <br>[ultimate] (1). Albert Lee (CODE SIGNING KEY) <allee8285@apac= he.org> <br> Cipher: AES256, AES192, AES, CAST5, 3DES <br> Diges= t: SHA512, SHA384, SHA256, SHA224, SHA1 <br> Compression: ZLIB, BZIP2, = ZIP, Uncompressed <br> Features: MDC, Keyserver no-modify <br> <br>Comm= and> setpref SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZ= IP2 ZIP Uncompressed <br>Set preference list to: <br> Cipher: AES256, A= ES192, AES, CAST5, 3DES <br> Digest: SHA512, SHA384, SHA256, SHA224, SH= A1 <br> Compression: ZLIB, BZIP2, ZIP, Uncompressed <br> Features: = MDC, Keyserver no-modify <br>Really update the preferences? (y/N) y <br> <b= r>pub 1024D/8007117F created: 2007-11-05 expires: never usage: SC = <br> trust: ultimate validity: ultimate <br>sub = 2048g/8D910F8A created: 2007-11-05 expires: never usage: E <br>= [ultimate] (1). Albert Lee (CODE SIGNING KEY) <allee8285@apache.org> = <br> <br>Command>{code} <br></td></tr> <tr><td class=3D"diff-unchanged" >{info} <br># Generate a key-p= air with gpg, using default key kind ("DSA and Elgamal") and ELG-= E keys size (2048). <br></td></tr> <tr><td class=3D"diff-snipped" >...<br></td></tr> =20 </table> </div> <h4>Full Content</h4> <div class=3D"notificationGreySide"> <p>These setup steps only need to be performed on a particular mach= ine once.</p> <div class=3D'panelMacro'><table class=3D'infoMacro'><colgroup><col width= =3D'24'><col></colgroup><tr><td valign=3D'top'><img src=3D"/confluence/imag= es/icons/emoticons/information.gif" width=3D"16" height=3D"16" align=3D"abs= middle" alt=3D"" border=3D"0"></td><td>Developers using Linux workstations = can skip over the references to Cygwin. If using Windows, install cygwin, = including <b>Utils/gnupg</b> and <b>Net/openssh</b> packages.</td></tr></ta= ble></div> <h3><a name=3D"ReleaseSetup-CreateandinstallaSSHkey"></a>Create and install= a SSH key</h3> <ol> =09<li>Open a shell window. If using Windows, open a cygwin window.</li> =09<li>Use ssh-keygen to create an SSH key. <div class=3D'panelMacro'><table class=3D'noteMacro'><colgroup><col width= =3D'24'><col></colgroup><tr><td valign=3D'top'><img src=3D"/confluence/imag= es/icons/emoticons/warning.gif" width=3D"16" height=3D"16" align=3D"absmidd= le" alt=3D"" border=3D"0"></td><td><ul> =09<li>ssh-keygen dsa key type only accept 1024 bits; use rsa / 4096 bits i= nstead.</li> </ul> </td></tr></table></div> <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none"> $ ssh-keygen -t rsa -b 4096 </pre> </div></div> <p>Program defaults should be fine. No passphrase is required for the ssh = key generation. The keys will be saved in ~/.ssh/id_rsa (private) and ~/.s= sh/id_rsa.pub (public).</p> <div class=3D'panelMacro'><table class=3D'infoMacro'><colgroup><col width= =3D'24'><col></colgroup><tr><td valign=3D'top'><img src=3D"/confluence/imag= es/icons/emoticons/information.gif" width=3D"16" height=3D"16" align=3D"abs= middle" alt=3D"" border=3D"0"></td><td>See <a href=3D"http://www.networknew= z.com/networknewz-10-20030707AuthenticatingbyPublicKeyOpenSSH.html" class= =3D"external-link" rel=3D"nofollow">Authenticating By Public Key (OpenSSH)<= /a> for a good description on why and how to perform this task.</td></tr></= table></div></li> =09<li><tt>scp</tt> your SSH public key ~/.ssh/id_rsa.pub created in last s= tep to ~/id_rsa.pub on people.apache.org. <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none">=20 $ cd ~/.ssh $ scp id_rsa.pub <your userid>@people.apache.org:id_rsa.pub=20 $ You will be prompted for your password. </pre> </div></div></li> =09<li>Use ssh to login to people.apache.org <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none"> $ cd ~ $ ssh <your userid>@people.apache.org </pre> </div></div> <p>At this point, you will still be prompted for your password.</p></li> =09<li>Create a ~/.ssh folder in your home directory on people.apache.org a= nd change its file mode to 700. <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none"> $ mkdir ~/.ssh $ chmod 700 ~/.ssh </pre> </div></div></li> =09<li>Move or append ~/id_rsa.pub to ~/.ssh/authorized_keys and change its= file mode to 600. <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none"> $ mv ~/id_rsa.pub ~/.ssh/authorized_keys or $ cat ~/id_rsa.pub >> ~/.ssh/authorized_keys $ chmod 600 ~/.ssh/authorized_keys </pre> </div></div> <div class=3D'panelMacro'><table class=3D'infoMacro'><colgroup><col width= =3D'24'><col></colgroup><tr><td valign=3D'top'><img src=3D"/confluence/imag= es/icons/emoticons/information.gif" width=3D"16" height=3D"16" align=3D"abs= middle" alt=3D"" border=3D"0"></td><td><ul> =09<li>Each public key in the <tt>authorized_keys</tt> spans only one line. =09<ul> =09=09<li>For example: "<tt>ssh-dss AAAAB3NzaC1kc3MAAA ..... agBmmfZ9uAbSqA= =3D=3D dsa-key-20071107</tt>"</li> =09</ul> =09</li> =09<li>'#' in the first column is a comment line.</li> </ul> </td></tr></table></div></li> =09<li>Exit out of this ssh session.</li> =09<li>Start a new ssh session. No login should be required this time due = to the private ssh key on your local box matching up with the public ssh ke= y in your home directory (~/.ssh). <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none"> $ ssh <your userid>@people.apache.org </pre> </div></div>=20 <div class=3D'panelMacro'><table class=3D'infoMacro'><colgroup><col width= =3D'24'><col></colgroup><tr><td valign=3D'top'><img src=3D"/confluence/imag= es/icons/emoticons/information.gif" width=3D"16" height=3D"16" align=3D"abs= middle" alt=3D"" border=3D"0"></td><td>If you are still prompted for a pass= word, then you have not set up the ssh keys properly. Review the steps abo= ve and ensure that all of the steps were followed properly. Or, maybe the = instructions are still not quite right and they still need some adjusting. = In that case, please update the instructions accordingly. <img class=3D"e= moticon" src=3D"/confluence/images/icons/emoticons/smile.gif" height=3D"20"= width=3D"20" align=3D"absmiddle" alt=3D"" border=3D"0"/></td></tr></table>= </div></li> </ol> <h3><a name=3D"ReleaseSetup-CreateaGPGkey"></a>Create a GPG key</h3> <ol> =09<li>Open a shell window. If using Windows, open a cygwin window. <div class=3D'panelMacro'><table class=3D'infoMacro'><colgroup><col width= =3D'24'><col></colgroup><tr><td valign=3D'top'><img src=3D"/confluence/imag= es/icons/emoticons/information.gif" width=3D"16" height=3D"16" align=3D"abs= middle" alt=3D"" border=3D"0"></td><td><ul> =09<li>The generated keys are stored in: =09<ul> =09=09<li>*nix - $HOME/.gnupg</li> =09=09<li>Windows XP - %HOME%\Application Data\gnupg</li> =09=09<li>Windows 7 - C:\ProgramData\GNU\etc\gnupg</li> =09</ul> =09</li> =09<li>"gpg --version" shows the GnuPG's home location.</li> =09<li>Follow the latest steps and guides on the ASF website at <a href=3D"= http://www.apache.org/dev/openpgp.html#generate-key" class=3D"external-link= " rel=3D"nofollow">http://www.apache.org/dev/openpgp.html#generate-key</a> = as you need to disable using SHA1 and new keys should be 4096 bits. Append = the following text to gpg.conf. <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none"> personal-digest-preferences SHA512 cert-digest-algo SHA512 default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5= ZLIB BZIP2 ZIP Uncompressed </pre> </div></div> =09<ul> =09=09<li>If you are using an existing gpg certificate, update your current= certificate with the above preference using: <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none"> leealber@jpadev:~/.gnupg$ gpg --edit-key Albert Lee Secret key is available. pub 1024D/8007117F created: 2007-11-05 expires: never usage: SC = =20 trust: ultimate validity: ultimate sub 2048g/8D910F8A created: 2007-11-05 expires: never usage: E = =20 [ultimate] (1). Albert Lee (CODE SIGNING KEY) <allee8285@apache.org> Invalid command (try "help") Command> showpref [ultimate] (1). Albert Lee (CODE SIGNING KEY) <allee8285@apache.org> Cipher: AES256, AES192, AES, CAST5, 3DES Digest: SHA512, SHA384, SHA256, SHA224, SHA1 Compression: ZLIB, BZIP2, ZIP, Uncompressed Features: MDC, Keyserver no-modify Command> setpref SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLI= B BZIP2 ZIP Uncompressed Set preference list to: Cipher: AES256, AES192, AES, CAST5, 3DES Digest: SHA512, SHA384, SHA256, SHA224, SHA1 Compression: ZLIB, BZIP2, ZIP, Uncompressed Features: MDC, Keyserver no-modify Really update the preferences? (y/N) y pub 1024D/8007117F created: 2007-11-05 expires: never usage: SC = =20 trust: ultimate validity: ultimate sub 2048g/8D910F8A created: 2007-11-05 expires: never usage: E = =20 [ultimate] (1). Albert Lee (CODE SIGNING KEY) <allee8285@apache.org> Command></pre> </div></div></li> =09</ul> =09</li> </ul> </td></tr></table></div></li> =09<li>Generate a key-pair with gpg, using default key kind ("DSA and Elgam= al") and ELG-E keys size (2048). <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none"> $ gpg --gen-key </pre> </div></div> <p>The program's default values should be fine. For the "Real Name" enter = your full name (ie. Stan Programmer). For the "e-mail address" enter your = apache address (ie. sprogrammer@apache.org). You will also be required to = enter a "passphrase" for the GPG key generation. Keep track of this as you= will need this for the Release processing.</p> <div class=3D'panelMacro'><table class=3D'infoMacro'><colgroup><col width= =3D'24'><col></colgroup><tr><td valign=3D'top'><img src=3D"/confluence/imag= es/icons/emoticons/information.gif" width=3D"16" height=3D"16" align=3D"abs= middle" alt=3D"" border=3D"0"></td><td><ul> =09<li>Save the content in this subdirectory to a safe media. This contains= your private key used to sign all the release materials.</li> </ul> </td></tr></table></div></li> =09<li>Backup your cygwin home directory to another media</li> =09<li>Append your public key to <tt><a href=3D"https://svn.apache.org/repo= s/asf/openjpa/KEYS" class=3D"external-link" rel=3D"nofollow">https://svn.ap= ache.org/repos/asf/openjpa/KEYS</a></tt> and <tt><a href=3D"http://www.apac= he.org/dist/openjpa/KEYS" class=3D"external-link" rel=3D"nofollow">http://w= ww.apache.org/dist/openjpa/KEYS</a></tt>. See the commands describe at the = beginning of this KEYS file to perform this task. The gpg key-pair is used = to sign the published artifacts for the releases. <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-none"> $ ( gpg --list-sigs <Real Name> && gpg --armor --export <R= eal Name> ) >> KEYS </pre> </div></div> <div class=3D'panelMacro'><table class=3D'infoMacro'><colgroup><col width= =3D'24'><col></colgroup><tr><td valign=3D'top'><img src=3D"/confluence/imag= es/icons/emoticons/information.gif" width=3D"16" height=3D"16" align=3D"abs= middle" alt=3D"" border=3D"0"></td><td><ul> =09<li>The <tt><a href=3D"https://svn.apache.org/repos/asf/openjpa/KEYS" cl= ass=3D"external-link" rel=3D"nofollow">https://svn.apache.org/repos/asf/ope= njpa/KEYS</a></tt> file is updated via normal svn commit procedures. <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-java"> svn co https:<span class=3D"code-comment">//svn.apache.org/repos/asf/openjp= a --depth empty </span>cd openjpa svn up KEYS ( gpg --list-sigs <Real Name> && gpg --armor --export <Rea= l Name> ) >> KEYS svn commit KEYS --message <span class=3D"code-quote">"update gpg <span clas= s=3D"code-keyword">public</span> key <span class=3D"code-keyword">for</span= > ME."</span> </pre> </div></div></li> =09<li>The one under www.apache.org/dist/ has to be manually updated. <div class=3D"code panel" style=3D"border-width: 1px;"><div class=3D"codeCo= ntent panelContent"> <pre class=3D"code-java"> scp yourid@people.apache.org:/www/www.apache.org/dist/openjpa/KEYS KEYS </pre> </div></div></li> </ul> </td></tr></table></div></li> =09<li>Submit your public key to a key server. E.g. <a href=3D"http://pgp.s= urfnet.nl:11371/" class=3D"external-link" rel=3D"nofollow">http://pgp.surfn= et.nl:11371/</a> or <a href=3D"http://pgp.mit.edu/" class=3D"external-link"= rel=3D"nofollow">http://pgp.mit.edu/</a></li> =09<li>Following the instructions in <a href=3D"http://people.apache.org/~h= enkp/trust/" class=3D"external-link" rel=3D"nofollow">http://people.apache.= org/~henkp/trust/</a> and ask multiple (at least 3) current Apache committe= rs to sign your public key.</li> </ol> <h3><a name=3D"ReleaseSetup-UpdateMavensettingsforourservers"></a>Update Ma= ven settings for our servers</h3> <ol> =09<li>Create a settings.xml under .m2 <div class=3D'table-wrap'> <table class=3D'confluenceTable'><tbody> <tr> <td class=3D'confluenceTd'> </td> <td class=3D'confluenceTd'> <div class=3D"code panel" style=3D"border-style= : solid;border-width: 1px;"><div class=3D"codeHeader panelHeader" style=3D"= border-bottom-width: 1px;border-bottom-style: solid;"><b>settings.xml</b></= div><div class=3D"codeContent panelContent"> <pre class=3D"code-xml"> <settings xmlns=3D<span class=3D"code-quote">"http://maven.apache.org/PO= M/4.0.0"</span> <span class=3D"code-keyword">xmlns:xsi</span>=3D<span class=3D"co= de-quote">"http://www.w3.org/2001/XMLSchema-instance"</span> xsi:schemaLocation=3D<span class=3D"code-quote">"http://maven.apa= che.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"</span>>= ; <span class=3D"code-tag"><servers></span> <span class=3D"code-tag"><span class=3D"code-comment"><!-- SCP se= ttings for people.apache.org --></span></span> <span class=3D"code-tag"><server></span> <span class=3D"code-tag"><id></span>people.apache.org<span = class=3D"code-tag"></id></span> <span class=3D"code-tag"><username></span>$USERNAME<span cl= ass=3D"code-tag"></username></span> <span class=3D"code-tag"><privateKey></span>$PATH_TO_PRIVAT= E_KEY<span class=3D"code-tag"></privateKey></span> <span class=3D"code-tag"><passphrase></span>$SSH_PASSPHRASE= <span class=3D"code-tag"></passphrase></span> <span class=3D"code-tag"><directoryPermissions></span>775<s= pan class=3D"code-tag"></directoryPermissions></span> <span class=3D"code-tag"><filePermissions></span>644<span c= lass=3D"code-tag"></filePermissions></span> <!-- following is only for Windows only <span class=3D"code-tag"><configuration></span> <span class=3D"code-tag"><sshExecutable></span>plink<sp= an class=3D"code-tag"></sshExecutable></span> <span class=3D"code-tag"><scpExecutable></span>pscp<spa= n class=3D"code-tag"></scpExecutable></span> <span class=3D"code-tag"><scpArgs></span>-2Bp<span clas= s=3D"code-tag"></scpArgs></span> <span class=3D"code-tag"><sshArgs></span>-2<span class= =3D"code-tag"></sshArgs></span> <span class=3D"code-tag"></configuration></span> --> <span class=3D"code-tag"></server></span> <span class=3D"code-tag"><span class=3D"code-comment"><!-- ASF Ne= xus settings --></span></span> <span class=3D"code-tag"><server></span> <span class=3D"code-tag"><id></span>apache.snapshots.https= <span class=3D"code-tag"></id></span> <span class=3D"code-tag"><username></span>$USERNAME<span c= lass=3D"code-tag"></username></span> <span class=3D"code-tag"><password></span>$APACHE_LDAP_PWD= <span class=3D"code-tag"></password></span> <span class=3D"code-tag"></server></span> <span class=3D"code-tag"><server></span> <span class=3D"code-tag"><id></span>apache.releases.https<= span class=3D"code-tag"></id></span> <span class=3D"code-tag"><username></span>$USERNAME<span c= lass=3D"code-tag"></username></span> <span class=3D"code-tag"><password></span>$APACHE_LDAP_PWD= <span class=3D"code-tag"></password></span> <span class=3D"code-tag"></server></span> <span class=3D"code-tag"></servers></span>=20 <span class=3D"code-tag"><profiles></span> <span class=3D"code-tag"><profile></span> <span class=3D"code-tag"><id></span>apache-release<span c= lass=3D"code-tag"></id></span> <span class=3D"code-tag"><properties></span> <span class=3D"code-tag"><gpg.passphrase></span>$SSH_= PASSPHRASE<span class=3D"code-tag"></gpg.passphrase></span> <span class=3D"code-tag"></properties></span> <span class=3D"code-tag"></profile></span> <span class=3D"code-tag"><profile></span> <span class=3D"code-tag"><id></span>gpg-passphrase<span c= lass=3D"code-tag"></id></span> <span class=3D"code-tag"><properties></span> <span class=3D"code-tag"><gpg.passphrase></span>$SSH_= PASSPHRASE<span class=3D"code-tag"></gpg.passphrase></span> <span class=3D"code-tag"></properties></span> <span class=3D"code-tag"></profile></span> <span class=3D"code-tag"></profiles></span> <span class=3D"code-tag"></settings></span> </pre> </div></div> <div class=3D'panelMacro'><table class=3D'infoMacro'><colgroup><col width= =3D'24'><col></colgroup><tr><td valign=3D'top'><img src=3D"/confluence/imag= es/icons/emoticons/information.gif" width=3D"16" height=3D"16" align=3D"abs= middle" alt=3D"" border=3D"0"></td><td><ul> =09<li><tt>$USERNAME</tt> is the remote username on people.apache.org, not = your local userid.</li> =09<li><tt>$PATH_TO_PRIVATE_KEY</tt> is the path to the private key generat= ed for ssh. E.g. /home/yourLocalUserId/.ssh/id_rsa. For Windows' cygwin us= ers, you will need to enter the full cygwin path: /cygdrive/c/cygwin/home/= yourLocalUserId/.ssh/id_rsa.</li> =09<li><tt>$SSH_PASSPHRASE</tt> for the supplied <tt>$PATH_TO_PRIVATE_KEY</= tt>. If you don't use this in your settings.xml file, then you will be pro= mpted for it during the Release processing.</li> =09<li><tt>$APACHE_LDAP_PWD</tt> is your Apache LDAP password, which is sha= red between SVN and password login for people.apache.org.</li> </ul> </td></tr></table></div></td> </tr> </tbody></table> </div> </li> </ol> </div> <div id=3D"commentsSection" class=3D"wiki-content pageSection"> <div style=3D"float: right;"> <a href=3D"https://cwiki.apache.org/confluence/users/viewnotifi= cations.action" class=3D"grey">Change Notification Preferences</a> </div> <a href=3D"https://cwiki.apache.org/confluence/display/openjpa/Rele= ase+Setup">View Online</a> | <a href=3D"https://cwiki.apache.org/confluence/pages/diffpagesbyver= sion.action?pageId=3D23335376&revisedVersion=3D11&originalVersion=3D10">Vie= w Changes</a> | <a href=3D"https://cwiki.apache.org/confluence/display/openjpa/Rele= ase+Setup?showComments=3Dtrue&showCommentArea=3Dtrue#addcomment">Add Co= mment</a> </div> </div> </div> </div> </div> </body> </html> From commits-return-9369-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 8 22:38:30 2012 Return-Path: <commits-return-9369-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EFCA098EF for <apmail-openjpa-commits-archive@www.apache.org>; Wed, 8 Feb 2012 22:38:30 +0000 (UTC) Received: (qmail 25260 invoked by uid 500); 8 Feb 2012 22:38:30 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 25197 invoked by uid 500); 8 Feb 2012 22:38:30 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 25189 invoked by uid 99); 8 Feb 2012 22:38:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 22:38:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 22:38:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 961D723888E4 for <commits@openjpa.apache.org>; Wed, 8 Feb 2012 22:38:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1242154 - in /openjpa/trunk/openjpa-persistence/src/main: java/org/apache/openjpa/persistence/util/SourceCode.java resources/org/apache/openjpa/persistence/util/localizer.properties Date: Wed, 08 Feb 2012 22:38:08 -0000 To: commits@openjpa.apache.org From: curtisr7@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120208223808.961D723888E4@eris.apache.org> Author: curtisr7 Date: Wed Feb 8 22:38:07 2012 New Revision: 1242154 URL: http://svn.apache.org/viewvc?rev=1242154&view=rev Log: OPENJPA-2119: Added support for generating a constructor and greater support for tabbing. Also fixed a number of bugs. Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/util/localizer.properties Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java?rev=1242154&r1=1242153&r2=1242154&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java (original) +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java Wed Feb 8 22:38:07 2012 @@ -127,7 +127,7 @@ public class SourceCode { * @param name fully-qualified name of a class * @return an existing class name instance or a new one. */ - ClassName getOrCreateImport(String name) { + public ClassName getOrCreateImport(String name) { for (Import i : imports) { if (i.name.getFullName().equals(name)) return i.name; @@ -368,6 +368,7 @@ public class SourceCode { private List<ClassName> interfaces = new ArrayList<ClassName>(); private Set<Field> fields = new TreeSet<Field>(); private Set<Method> methods = new TreeSet<Method>(); + private Set<Constructor> constructors = new TreeSet<Constructor>(); public Class(String name) { super(name, getOrCreateImport(name)); @@ -439,6 +440,13 @@ public class SourceCode { return method; } + public Constructor addConstructor(){ + Constructor c = new Constructor(type.simpleName); + if (!constructors.add(c)) + throw new IllegalArgumentException(_loc.get( + "src-duplicate-constructor", c, this).toString()); + return c; + } public void write(PrintWriter out, int tab) { super.write(out, tab); if (isAbstract) @@ -452,6 +460,9 @@ public class SourceCode { out.println(SPACE + BLOCK_DELIMITER.start); for (Field field:fields) field.write(out, 1); + for(Constructor ctor : constructors){ + ctor.write(out, 1); + } for (Method method:methods) method.write(out, 1); out.println(BLOCK_DELIMITER.end); @@ -536,11 +547,13 @@ public class SourceCode { * * */ - class Method extends Element<Method> { + public class Method extends Element<Method> { private boolean isAbstract; private List<Argument<ClassName,String>> args = new ArrayList<Argument<ClassName,String>>(); private List<String> codeLines = new ArrayList<String>(); - + int tabCount = 0; + String tab = ""; + Method(String n, String t) { this(n, getOrCreateImport(t)); } @@ -555,16 +568,42 @@ public class SourceCode { return this; } - public Method addCodeLine(String line) { - if (isAbstract) - throw new IllegalStateException("abstract method " + name - + " can not have body"); - if (!line.endsWith(SEMICOLON)) - line = line + SEMICOLON; - codeLines.add(line); - return this; + public Method addArgument(String className, String argName){ + ClassName cn = getOrCreateImport(className); + args.add(new Argument<ClassName, String>(cn, argName," ")); + return this; } + public void setTab(boolean inc) { + if (inc) + tabCount++; + else + tabCount--; + tab = ""; + for (int i = 0; i < tabCount * TABSIZE; i++) { + tab += SPACE; + } + } + + public Method addCodeLine(String line) { + if (isAbstract) + throw new IllegalStateException("abstract method " + name + " can not have body"); + // This doesn't handle try{ ... catch(){ if{ + if (line.endsWith("{") || line.endsWith("}")) { + + } + if (!line.endsWith(SEMICOLON) + && !(line.isEmpty() || line.endsWith("{") || line.endsWith("}") || line.startsWith("if"))) + line = line + SEMICOLON; + codeLines.add(tab + line); + return this; + } + // if tabInc = true, the current line, and all following lines will be tabbed. If false, a tab will be removed. + public Method addCodeLine(String line, boolean tabInc) { + setTab(tabInc); + return addCodeLine(line); + } + public Method makeAbstract() { if (codeLines.isEmpty()) isAbstract = true; @@ -607,6 +646,75 @@ public class SourceCode { } } + public class Constructor extends Element<Constructor> { + private List<Argument<ClassName,String>> args = new ArrayList<Argument<ClassName,String>>(); + private List<String> codeLines = new ArrayList<String>(); + int tabCount = 0; + String tab = ""; + + public Constructor(String name) { + super(name, null); + makePublic(); + } + + public Constructor addArgument(Argument<ClassName,String> arg) { + args.add(arg); + return this; + } + + public Constructor addArgument(String className, String argName) { + ClassName cn = getOrCreateImport(className); + args.add(new Argument<ClassName, String>(cn, argName, " ")); + return this; + } + + public Constructor addCodeLine(String line) { + // This doesn't handle try{ ... catch(){ if{ + if (line.endsWith("{") || line.endsWith("}")) { + + } + if (!line.endsWith(SEMICOLON) + && !(line.isEmpty() || line.endsWith("{") || line.endsWith("}") || line.startsWith("if"))) + line = line + SEMICOLON; + codeLines.add(tab + line); + return this; + } + /** + * if tabInc = true, the current line, and all following lines will be tabbed. If false, a tab will be removed. + */ + public Constructor addCodeLine(String line, boolean tabInc) { + setTab(tabInc); + return addCodeLine(line); + } + + public void setTab(boolean inc) { + if (inc) + tabCount++; + else + tabCount--; + tab = ""; + for (int i = 0; i < tabCount * TABSIZE; i++) { + tab += SPACE; + } + } + + @Override + public void write(PrintWriter out, int tab) { + out.println(BLANK); + super.write(out, tab); + out.print(name); + writeList(out, BLANK, args, ARGS_DELIMITER, true); + + out.println(SPACE + BLOCK_DELIMITER.start); + for (String line : codeLines) { + tab(out, tab+1); + out.println(line); + } + tab(out, tab); + out.println(BLOCK_DELIMITER.end); + } + + } /** * Represents <code>import</code> statement. * @@ -875,7 +983,7 @@ public class SourceCode { final char end; public Delimiter() { - this((char)0, (char)0); + this((char)' ', (char)' '); } public Delimiter(String pair) { Modified: openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/util/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/util/localizer.properties?rev=1242154&r1=1242153&r2=1242154&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/util/localizer.properties (original) +++ openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/util/localizer.properties Wed Feb 8 22:38:07 2012 @@ -16,6 +16,7 @@ # under the License. src-duplicate-field: "{0}" is found to be a duplicated field in Class {1}. src-duplicate-method: "{0}" is found to be a duplicated method in Class {1}. +src-duplicate-constructor: "{0}" is found to be a duplicated constructor in Class {1}. src-invalid-method: "{0}" is not a valid method name. \ It must be a non-reserved Java token and a valid Java identifier. src-invalid-type: "{0}" is not a valid type name. It must be a valid Java package name, a non-reserved \ From commits-return-9370-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 8 22:58:57 2012 Return-Path: <commits-return-9370-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ACA2A9232 for <apmail-openjpa-commits-archive@www.apache.org>; Wed, 8 Feb 2012 22:58:57 +0000 (UTC) Received: (qmail 66016 invoked by uid 500); 8 Feb 2012 22:58:57 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 65974 invoked by uid 500); 8 Feb 2012 22:58:57 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 65967 invoked by uid 99); 8 Feb 2012 22:58:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 22:58:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 22:58:54 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D3274238889B for <commits@openjpa.apache.org>; Wed, 8 Feb 2012 22:58:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1242163 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java Date: Wed, 08 Feb 2012 22:58:33 -0000 To: commits@openjpa.apache.org From: curtisr7@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120208225833.D3274238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: curtisr7 Date: Wed Feb 8 22:58:33 2012 New Revision: 1242163 URL: http://svn.apache.org/viewvc?rev=1242163&view=rev Log: OPENJPA-2119: Fix checkstyle error. Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java?rev=1242163&r1=1242162&r2=1242163&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java (original) +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/util/SourceCode.java Wed Feb 8 22:58:33 2012 @@ -598,7 +598,11 @@ public class SourceCode { codeLines.add(tab + line); return this; } - // if tabInc = true, the current line, and all following lines will be tabbed. If false, a tab will be removed. + + /** + * if tabInc = true, the current line, and all following lines will be tabbed. + * If false, a tab will be removed. + */ public Method addCodeLine(String line, boolean tabInc) { setTab(tabInc); return addCodeLine(line); From commits-return-9371-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 9 16:51:50 2012 Return-Path: <commits-return-9371-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3623C9189 for <apmail-openjpa-commits-archive@www.apache.org>; Thu, 9 Feb 2012 16:51:50 +0000 (UTC) Received: (qmail 18382 invoked by uid 500); 9 Feb 2012 16:51:50 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 18328 invoked by uid 500); 9 Feb 2012 16:51:49 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 18321 invoked by uid 99); 9 Feb 2012 16:51:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 16:51:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 16:51:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0244F23888E7 for <commits@openjpa.apache.org>; Thu, 9 Feb 2012 16:51:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1242395 [1/2] - in /openjpa/trunk/openjpa-project: BUILDING.txt CHANGES.txt RELEASE-NOTES.html Date: Thu, 09 Feb 2012 16:51:24 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120209165125.0244F23888E7@eris.apache.org> Author: allee8285 Date: Thu Feb 9 16:51:24 2012 New Revision: 1242395 URL: http://svn.apache.org/viewvc?rev=1242395&view=rev Log: Documents change preparing for 2.2.0 release Modified: openjpa/trunk/openjpa-project/BUILDING.txt openjpa/trunk/openjpa-project/CHANGES.txt openjpa/trunk/openjpa-project/RELEASE-NOTES.html Modified: openjpa/trunk/openjpa-project/BUILDING.txt URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/BUILDING.txt?rev=1242395&r1=1242394&r2=1242395&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/BUILDING.txt (original) +++ openjpa/trunk/openjpa-project/BUILDING.txt Thu Feb 9 16:51:24 2012 @@ -80,7 +80,7 @@ Checked out revision 1065345. $ cd trunk/ -$ mvn clean install -DfailIfNoTests=false -Dtest= +$ mvn clean install -DskipTests -DfailIfNoTests=false [INFO] Scanning for projects... [INFO] Reactor build order: @@ -91,6 +91,8 @@ $ mvn clean install -DfailIfNoTests=fals [INFO] OpenJPA Persistence [INFO] OpenJPA Persistence JDBC [INFO] OpenJPA Persistence Locking Tests +[INFO] OpenJPA tools +[INFO] OpenJPA Maven Plugin [INFO] OpenJPA XML Store [INFO] OpenJPA Slice [INFO] OpenJPA JEST @@ -119,42 +121,42 @@ $ mvn clean install -DfailIfNoTests=fals [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ -[INFO] OpenJPA Parent POM .................................... SUCCESS [1:23.143s] -[INFO] OpenJPA Utilities Library ............................. SUCCESS [13.749s] -[INFO] OpenJPA Kernel ........................................ SUCCESS [19.251s] -[INFO] OpenJPA JDBC .......................................... SUCCESS [14.351s] -[INFO] OpenJPA Persistence ................................... SUCCESS [10.254s] -[INFO] OpenJPA Persistence JDBC .............................. SUCCESS [46.774s] -[INFO] OpenJPA Persistence Locking Tests ..................... SUCCESS [15.183s] -[INFO] OpenJPA XML Store ..................................... SUCCESS [11.788s] -[INFO] OpenJPA Slice ......................................... SUCCESS [4.437s] -[INFO] OpenJPA JEST .......................................... SUCCESS [4.854s] -[INFO] OpenJPA Aggregate Jar ................................. SUCCESS [10.729s] -[INFO] OpenJPA Aggregate Jar with Dependencies ............... SUCCESS [6.761s] -[INFO] OpenJPA Project Docs and Assemblies ................... SUCCESS [1:41.937s] -[INFO] OpenJPA Examples ...................................... SUCCESS [0.663s] -[INFO] OpenJPA Examples - Simple ............................. SUCCESS [1.475s] -[INFO] OpenJPA Examples - image-gallery ...................... SUCCESS [3.920s] -[INFO] OpenJPA Examples - OpenBooks .......................... SUCCESS [12.961s] -[INFO] OpenJPA Integration Tests ............................. SUCCESS [0.381s] -[INFO] OpenJPA Integration Tests - Daytrader ................. SUCCESS [7.565s] -[INFO] OpenJPA Integration Tests - Examples .................. SUCCESS [0.269s] -[INFO] OpenJPA Integration Tests - SLF4JLogFactory ........... SUCCESS [1.977s] -[INFO] OpenJPA Integration Tests - JPA TCK ................... SUCCESS [0.248s] -[INFO] OpenJPA Integration Tests - Bean Validation ........... SUCCESS [3.213s] -[INFO] OpenJPA Integration Tests - JMX Platform MBeans ....... SUCCESS [7.729s] +[INFO] OpenJPA Parent POM .................................... SUCCESS [2:11.649s] +[INFO] OpenJPA Utilities Library ............................. SUCCESS [31.576s] +[INFO] OpenJPA Kernel ........................................ SUCCESS [39.863s] +[INFO] OpenJPA JDBC .......................................... SUCCESS [27.326s] +[INFO] OpenJPA Persistence ................................... SUCCESS [23.530s] +[INFO] OpenJPA Persistence JDBC .............................. SUCCESS [1:14.696s] +[INFO] OpenJPA Persistence Locking Tests ..................... SUCCESS [30.881s] +[INFO] OpenJPA tools ......................................... SUCCESS [0.968s] +[INFO] OpenJPA Maven Plugin .................................. SUCCESS [2:45.320s] +[INFO] OpenJPA XML Store ..................................... SUCCESS [25.335s] +[INFO] OpenJPA Slice ......................................... SUCCESS [10.456s] +[INFO] OpenJPA JEST .......................................... SUCCESS [8.861s] +[INFO] OpenJPA Aggregate Jar ................................. SUCCESS [50.297s] +[INFO] OpenJPA Aggregate Jar with Dependencies ............... SUCCESS [13.871s] +[INFO] OpenJPA Project Docs and Assemblies ................... SUCCESS [1:12.215s] +[INFO] OpenJPA Examples ...................................... SUCCESS [1.241s] +[INFO] OpenJPA Examples - Simple ............................. SUCCESS [5.165s] +[INFO] OpenJPA Examples - image-gallery ...................... SUCCESS [6.933s] +[INFO] OpenJPA Examples - OpenBooks .......................... SUCCESS [26.761s] +[INFO] OpenJPA Integration Tests ............................. SUCCESS [0.957s] +[INFO] OpenJPA Integration Tests - Daytrader ................. SUCCESS [21.631s] +[INFO] OpenJPA Integration Tests - Examples .................. SUCCESS [0.143s] +[INFO] OpenJPA Integration Tests - SLF4JLogFactory ........... SUCCESS [6.690s] +[INFO] OpenJPA Integration Tests - JPA TCK ................... SUCCESS [0.321s] +[INFO] OpenJPA Integration Tests - Bean Validation ........... SUCCESS [10.694s] +[INFO] OpenJPA Integration Tests - JMX Platform MBeans ....... SUCCESS [19.434s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ -[INFO] Total time: 6 minutes 26 seconds -[INFO] Finished at: Sun Jan 30 19:43:50 CET 2011 -[INFO] Final Memory: 92M/158M +[INFO] Total time: 13 minutes 33 seconds +[INFO] Finished at: Thu Feb 09 10:25:05 CST 2012 +[INFO] Final Memory: 118M/232M [INFO] ------------------------------------------------------------------------ $ ls openjpa-project/target/site/downloads/ apache-openjpa-2.2.0-SNAPSHOT-binary.zip apache-openjpa-2.2.0-SNAPSHOT-source.zip - - Modified: openjpa/trunk/openjpa-project/CHANGES.txt URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/CHANGES.txt?rev=1242395&r1=1242394&r2=1242395&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/CHANGES.txt (original) +++ openjpa/trunk/openjpa-project/CHANGES.txt Thu Feb 9 16:51:24 2012 @@ -1,4 +1,4 @@ -Apache OpenJPA 2.2.0-SNAPSHOT +Apache OpenJPA 2.2.0 Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0 -------------------------------------------------------------------------------- @@ -54,7 +54,7 @@ License Notices ------- - Copyright 2006,2011 The Apache Software Foundation. + Copyright 2006,2012 The Apache Software Foundation. Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation. @@ -67,7 +67,7 @@ Notices CDDL license. You can obtain a copy of the License at: https://glassfish.dev.java.net/public/CDDL+GPL.html The source code is available at: - https://glassfish.dev.java.net/source/browse/glassfish/ + http://java.net/projects/glassfish The complete list of notices can be found in NOTICE.txt included in each assembly. @@ -112,888 +112,163 @@ Getting Involved https://issues.apache.org/jira/browse/OPENJPA -Included Changes in OpenJPA 2.2.0-SNAPSHOT ------------------------------------------- - - * TBD - - -Included Changes in OpenJPA 2.1.0 ------------------------------------------- - - * TBD - - -Included Changes in OpenJPA 2.0.1 +Included Changes in OpenJPA 2.2.0 --------------------------------- Sub-task --------- - * [OPENJPA-1635] - Reduce lock contention in MetaDataRepository.processRegisteredClasses - * [OPENJPA-1638] - Add test variation to TestNamedQueryLockMode - -Bug ---- - * [OPENJPA-1424] - Out of bounds exception using fetch plan - * [OPENJPA-1641] - SybaseDictionary should try both JDBC column names and Sybase specific column names - * [OPENJPA-1668] - User's ''DBDictionary.sequenceSQL' setting not being honored on zOS - * [OPENJPA-1678] - SQL Parameter values may contain sensitive information and should not be logged by default. - * [OPENJPA-1679] - Index name too long for DB2 zOS when schema is present - * [OPENJPA-1690] - DistinctResultList is not Serializable - * [OPENJPA-1704] - PCEnhancer incorrectly generates readExternal - * [OPENJPA-1713] - OutOfMemory caused by EntityManagerImpl.push/popFetchPlan processing - * [OPENJPA-1714] - Consider openjpa.Optimistic setting when calculating the default lock mode to apply to a named query - * [OPENJPA-1715] - OpenJPA generates wrong SQL if a result variable that references an aggregate expression is used in ORDER BY clause - * [OPENJPA-1719] - Prepared SQL cache ordering problem with subqueries. - * [OPENJPA-1722] - Problem serializing DistinctResultList when EntityManager is closed - * [OPENJPA-1737] - The openjpa-2.0.0.jar does not have its MANIFEST.MF has the first entry - * [OPENJPA-1742] - Recover if connectionFactory on EntityManagerFactory is invalid but cf on EntityManager is valid. - * [OPENJPA-1749] - Throw exception if using datacache / synchronize mappings and specifying datasource name at EM creation. - * [OPENJPA-1753] - TestMixedLockManagerLockPermutation: Timing issue determines the pass/no-pass of the test case -Improvement ------------ - * [OPENJPA-1637] - Upgrade to latest Geronimo Specs for JPA2 and Bean Validation - * [OPENJPA-1673] - Update MetaDataRepository docs - * [OPENJPA-1712] - Upgrade builds to use Apache hosted Nexus repo - * [OPENJPA-1735] - Mark commons-logging as provided in the build to remove transient maven dependency - * [OPENJPA-1771] - Upgrade to latest Apache BVAL for testing and apache-rat plugin - -Test ----- - * [OPENJPA-1639] - Simple openjpa-xmlstore tests - * [OPENJPA-1660] - Add support to test with Apache Bean Validation provider - - -Included Changes in OpenJPA 2.0.0 ---------------------------------- - -Sub-task --------- - * [OPENJPA-1179] - openjpa.jdbc.QuerySQLCache plugin values + [OPENJPA-1593] - Create an OSGiManagedRuntime + [OPENJPA-2081] - Provide subset of XML support for OpenJPA annotations Bug ---- - * [OPENJPA-1091] - ReverseMappingTool fails for openjpa-examples/reversemapping sample - * [OPENJPA-1510] - Documentation corrections - * [OPENJPA-1550] - When batchLimit=-1 or >1 and an exception is caused, the params and failedObject are missing from the resultant exception. - * [OPENJPA-1559] - DataCacheManager initialization isn't thread safe. - * [OPENJPA-1569] - @Strategy triggers an InvalidStateException for fields which are declared as Java interfaces - * [OPENJPA-1597] - Need Compatibility setting for new OPENJPA-1097 Proxies and DetachedStateField behavior - * [OPENJPA-1599] - Cache mode properties passes in to em.find and lock methods are not transient - * [OPENJPA-1602] - Query with lock mode set to PESSIMISTIC_WRITE does not have for update clause attached to the sql when runs twice - * [OPENJPA-1604] - Setting PessimisticLockManager fails to append "for update clause" to the select statement - * [OPENJPA-1605] - ReverseMappingTool (SchemaGenerator) bug - * [OPENJPA-1608] - PESSIMISTIC_WRITE is not working in Informix - * [OPENJPA-1609] - PessimisticLockException instead of LockTimeoutException thrown on DB2V9 for ZOS - * [OPENJPA-1611] - Wrong PersistentAttributeType returned for @Embedded types - * [OPENJPA-1618] - Exception during factory creation due to javax.persistence.transactionType - * [OPENJPA-1625] - Inconsistent creation of StateManagerImpl in BrokerImpl - * [OPENJPA-1630] - NPE in MetaDataRepository when preloading is enabled under heavy stress. - * [OPENJPA-1631] - MetaDataRepository preload doesn't load JAXB meta data -Improvement ------------ - * [OPENJPA-1382] - make org.apache.openjpa.persistence.meta.AnnotationProcessor6 as service - * [OPENJPA-1545] - Add new Detach processing - * [OPENJPA-1603] - Decouple the QueryCache from the DataCache - * [OPENJPA-1622] - Invoking MetaModel generator - * [OPENJPA-1628] - Output control for generated canonical metamodel source code - -Task ----- - * [OPENJPA-1178] - Backwards Compatibility Issues - -Test ----- - * [OPENJPA-1336] - Intermittent test failure in org.apache.openjpa.persistence.generationtype.TestGeneratedValues when running on MySQL - * [OPENJPA-1606] - Add JPQL tests for element collection - * [OPENJPA-1614] - Testcase failures in TextException on MSSQL - * [OPENJPA-1616] - Fix TestTimeoutException test failures on MSSQL, MySQL, HSQLDB, Oracle and re-enable for DB2 - * [OPENJPA-1619] - Fix intermittent TestTimestampVersion failures on various DBs when running on Windows - * [OPENJPA-1620] - Fix TestJDBCEscapeDate test for MSSQL and HSQLDB - * [OPENJPA-1621] - Fix TestGeneratedValues for DB2 - * [OPENJPA-1623] - New tests for query qualified paths - * [OPENJPA-1624] - Fix intermittent datacache timeout failures in TestSJVMCache and CacheTest - - -Included Changes in OpenJPA 2.0.0 Beta 3 ----------------------------------------- - -Sub-task --------- - * [OPENJPA-1101] - OSGi Integration tests - * [OPENJPA-1505] - Add a boolean provision CallbackOptions.AllowsDuplicateListener - -Bug ---- - * [OPENJPA-740] - In MySQL use LONGBLOB, MEDIUMBLOB etc.. when needed, cause BLOB only holds 64kb of data. - * [OPENJPA-774] - Executing native queries with Firebird - * [OPENJPA-1097] - Detachment processing of our proxied mutable types (Date, Timestamp, etc) needs to be consistent - * [OPENJPA-1234] - Make AllowFailure configurable - * [OPENJPA-1248] - LOB streaming does not work as expected - * [OPENJPA-1360] - ReverseMappingTool omits nullable, length, etc. when ClassMapping.setEmbedded(true) is called - * [OPENJPA-1395] - MappingTool attempts to create table in Oracle even when the table already exist - * [OPENJPA-1406] - (In)Compatibility section in OpenJPA doc needs some work... - * [OPENJPA-1410] - Class linkage exception when creating an EMF with OpenJPA M3 - * [OPENJPA-1438] - Fail to remove an entity which has derived identity - * [OPENJPA-1455] - SynchronizeMapping ALTER TABLE ADD COLUMN fails with column already exist exception - * [OPENJPA-1458] - Named parameters are not handled by OpenJPA correctly - * [OPENJPA-1477] - Multithreaded attempt to set Query parameter occassionally fails - * [OPENJPA-1482] - NoSuchMethodError when calling setVersion on an enhanced property access Entity - * [OPENJPA-1486] - Lazy fetched embeddable should not be materialized in the query result - * [OPENJPA-1491] - org.apache.openjpa.kernel.Bootstrap uses the application classloader to load OpenJPA internals - * [OPENJPA-1500] - DataCache types and excludedTypes are case sensitive - * [OPENJPA-1503] - Metamodel class loading fails with security manager - * [OPENJPA-1506] - ConfigurationImpl.equals fails using a OpenJPA derived provider - * [OPENJPA-1524] - ManagedRuntime does not work for OSGi - * [OPENJPA-1535] - Inconsistency in exceptions thrown from MetaDataRepository.resolve() - * [OPENJPA-1536] - SQL with outer join cannot handle null columns when inheritance is involved - * [OPENJPA-1538] - Move hard coded text in OpenJPAVersion.java to localizer.properties - * [OPENJPA-1542] - Support openjpa.DataCache Types and ExcludedTypes configuration - * [OPENJPA-1543] - Need to change fragmented messages that are combined by PreparedQueryImpl and PreparedQueryCacheImpl to complete messages - * [OPENJPA-1544] - Remove WebSphere version number from org/apache/ee/localizer.properties - * [OPENJPA-1546] - OpenJPA doesn't work as internal JPA inside web applicaion in JBoss AS - * [OPENJPA-1547] - NOT IN with MEMBER OF returns syntax error - * [OPENJPA-1550] - When batchLimit=-1 or >1 and an exception is caused, the params and failedObject are missing from the resultant exception. - * [OPENJPA-1556] - Exception thrown on first use of @Strategy in @Embeddable classes - * [OPENJPA-1558] - Many side of a MxO relationship contains null reference if One side is loaded first. - * [OPENJPA-1562] - EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException - * [OPENJPA-1565] - QueryTimeOut and LockTimeOut exceptions are not raised correctly - * [OPENJPA-1568] - Make createConnectionFactory() in JDBCConfigurationImpl public - * [OPENJPA-1570] - Exception using @Strategy in @MappedSuperclass or @Embeddable classes - * [OPENJPA-1571] - The change in the element collection is not persisted to the database during merging a detached entity - * [OPENJPA-1573] - Incorrect SQL for HAVING = entity variable - * [OPENJPA-1575] - Query parameter on externalized field breaks Prepared Query Cache - * [OPENJPA-1576] - maven plugin broken as of 3/16/2010 2:30 AM PST using openjpa-2.0.0-SNAPSHOT - * [OPENJPA-1577] - Using @Strategy in Queries not working properly - * [OPENJPA-1578] - CacheStoreMode.REFRESH is not recognized - * [OPENJPA-1580] - Using firstResult and maxResults in queries is not working properly - * [OPENJPA-1581] - getCache() should throw IllegalStateException if the EMF has been closed. - * [OPENJPA-1583] - Update by query fails on entities using Timestamp as Version field - * [OPENJPA-1588] - modify 925451 revision for setProperty processing for enums - * [OPENJPA-1596] - Index name too long for DB2 zOS - -Improvement ------------ - * [OPENJPA-979] - Define process for contributions - * [OPENJPA-1118] - code changes towards broader use of JDK5 features - * [OPENJPA-1443] - Turn on some additional DataCache and PCData testcases - * [OPENJPA-1492] - Change access on ReverseMappingTool#getAnnotationsForMeta(Object) from private to public - * [OPENJPA-1498] - Update localizer.properties files for easier translation - * [OPENJPA-1530] - MySQL storage engine support - * [OPENJPA-1531] - The DataCache EvictionSchedule property should accept other time formats. - * [OPENJPA-1539] - DataCacheManager should cache whether or not a given type is cacheable or not. - * [OPENJPA-1548] - Miscellaneous ClassMetaData performance improvements - * [OPENJPA-1549] - StateManagerImpl performance improvement - * [OPENJPA-1551] - Allow connectionFactoryName to be specified when creating an EntityManager - * [OPENJPA-1552] - Enable EntityManager to perform property QueryImpl creation by its subclass - * [OPENJPA-1557] - Logging configuration is difficult for running tests - * [OPENJPA-1561] - Cache Criteria Query - * [OPENJPA-1566] - Provide all the cached prepared query strings in QueryStatistics - * [OPENJPA-1585] - Additional trace to relate SQL pushdowns with entity action or JPQL query - * [OPENJPA-1591] - Refactor various parts to allow for greater extensibility - -Test ----- - * [OPENJPA-1411] - Include DayTrader test case to OpenJpa - * [OPENJPA-1560] - Additional tests for JDBC date/timestamp literals in JPQL - * [OPENJPA-1579] - Additional test for qualified path in HAVING clause - * [OPENJPA-1586] - Additional test single valued path expression which references qualified path in JPQL - - -Included Changes in OpenJPA 2.0.0 Beta 2 ----------------------------------------- - -Bug ---- - * [OPENJPA-1001] - java.lang.IndexOutOfBoundsException when executing attached test case - * [OPENJPA-1367] - H2 Database Engine does support cross join - * [OPENJPA-1460] - Fix scope visibility of orm.xml when it is packaged in both ear file and war file - * [OPENJPA-1483] - count (Distinct e) in JPQL gives wrong result when the id field is a compound primary key - * [OPENJPA-1485] - isLoaded util method does not behave per spec for collection attributes and basic type - * [OPENJPA-1494] - Criteria query IN predicate generates incorrect SQL - * [OPENJPA-1496] - Fail to set temporal parameter - * [OPENJPA-1504] - Validation junits should not rely on Hibernate Impl - * [OPENJPA-1506] - ConfigurationImpl.equals fails using a OpenJPA derived provider - * [OPENJPA-1507] - NPE with a non-JDBC store manager - * [OPENJPA-1509] - Enum field types cannot be modified in an in-memory JPQL bulk update statement - * [OPENJPA-1518] - Remove WARN messages for uncacheable finder select statements - * [OPENJPA-1533] - JPA2 select math mix with aggregate reports syntax error + [OPENJPA-478] - Contradictory text in manual section 10.2.6. JPQL GROUP BY, HAVING + [OPENJPA-867] - Unexpected Behaviour of DBDictionary.indexOf() method + [OPENJPA-1343] - Incorrect example of openjpa.Sequence property + [OPENJPA-1376] - @SequenceGenerator allocationSize incorrect implementation + [OPENJPA-1650] - Adding a slice dynamically should be done via persistence unit only + [OPENJPA-1651] - Unique colums automatically defined as non-nullable (part 2) + [OPENJPA-1657] - Postgres connection throws NPE with null properties + [OPENJPA-1686] - Persistence of Dynamic and Generic Type + [OPENJPA-1725] - Schemaname wrongly included in DBDictionary.checkNameLength after Tablename correctly truncated + [OPENJPA-1746] - NullPointerException when a null value is set in the properties map passed to Entity.createEntityManagerFactory + [OPENJPA-1768] - StackOverflowError when finding an Entity with an Eager ManyToMany relationship. + [OPENJPA-1787] - Bean validation fails merging a new entity + [OPENJPA-1845] - the prepared query cache doesn't currently work correclty with 'SELECT IN' statements + [OPENJPA-1856] - Executing bulk updates should evict stale data from the DataCache + [OPENJPA-1873] - EntityManager#merge sometimes passes wrong entity values to @PostLoad EntityListeners + [OPENJPA-1876] - Slow JDBC tests + [OPENJPA-1896] - OpenJPA cannot store POJOs if a corresponding record already exists + [OPENJPA-1898] - TestQueryMultiThreaded fails with OOME "unable to create new native thread" + [OPENJPA-1900] - ClassCastException when serializing an entity if DetachedStateField=true + [OPENJPA-1901] - QueryCacheStoreQuery$CachedObjectId that is not Serializable + [OPENJPA-1902] - SQLServer reserved words may not be used as identifiers + [OPENJPA-1903] - Some queries only work the first time they are executed + [OPENJPA-1904] - OptimisticLockException during refresh(*,PESSIMISTIC_*) with eagar fetch on relationship fields + [OPENJPA-1905] - jar-file validation should be deferred until after OpenJPA is confirmed to be the application's chosen provider + [OPENJPA-1906] - Issue info / warning message when connection retain mode is always + [OPENJPA-1909] - enhance unit tests with the correct persistence.xml + [OPENJPA-1910] - openjpa uses application ClassLoader for resolving BrokerFactory (revisited) + [OPENJPA-1911] - InvalidStateException is thrown when merge an entity with derived identiy + [OPENJPA-1912] - enhancer generates invalid code if fetch-groups is activated + [OPENJPA-1915] - missing license header + [OPENJPA-1918] - MetaDataRepository.preload() ignores class loader returned by PersistenceUnitInfo.getClassLoader() + [OPENJPA-1923] - Allow flexible (non-standard) syntax for collection-valued parameters in IN() expresseion of JPQL query + [OPENJPA-1928] - Resolving factory method does not allow method overriding + [OPENJPA-1932] - Documentation corrections + [OPENJPA-1935] - Informix lock exceptions are not mapped properly by OpenJPA + [OPENJPA-1938] - Typo of time data type in SQLServerdictionary for MSSQL 2008 + [OPENJPA-1939] - index identifier max length for DB2 v9 is 128. + [OPENJPA-1940] - ReverseMapping tool does not find primary keys with Oracle + [OPENJPA-1941] - Criteria query returns wrong result when query cache is enabled + [OPENJPA-1943] - Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme + [OPENJPA-1944] - Extra select statements executed when version column is null. + [OPENJPA-1951] - missing key "cant-set-value" in localizer properties org.apache.openjpa.jdbc.meta.strats + [OPENJPA-1953] - Copying data from inputStream to OuputStream needs appropriate buffer size + [OPENJPA-1954] - ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass + [OPENJPA-1957] - XML overriding column names for ArrayList attributes causes exception. + [OPENJPA-1958] - IndexOutOfBoundsException in BatchingPreparedStatementManagerImpl + [OPENJPA-1959] - RuntimeExceptionTranslator should be transient in DelegatingQuery + [OPENJPA-1960] - openjpa.InitializeEagerly breaks bean-validation integration + [OPENJPA-1965] - ClassCastException when using JAXB and MetaModel annotation processor + [OPENJPA-1968] - SQLServerDictionery not using DATETIME2 for jdbc driver other than MS JDBC driver + [OPENJPA-1969] - SQLServer / DataDirect SQLCode=HYT00 not handled + [OPENJPA-1974] - StackOverflowError when performing multiple subquery in collection field with eager fetch + [OPENJPA-1975] - Only obtain default schema name when needed (DB2) + [OPENJPA-1981] - Improper cleanup in SchemaGenerator + [OPENJPA-1983] - Merge of lazily fetched fields, and merge of managed entities deviates from spec + [OPENJPA-1984] - Incorrect ViolationContraint getRootBean when removing bean with embedded entity validation + [OPENJPA-1985] - ClassCastException in max(Timestamp) function on PostgreSQL + [OPENJPA-1986] - Extra queries being generated when cascading a persist + [OPENJPA-1987] - Postgres / Ingres does not support null table for getImportedKeys + [OPENJPA-1989] - *ToOne relationships specified as LAZY in xml aren't honored + [OPENJPA-1992] - java.lang.ArrayIndexOutOfBoundsException if positional parameter are not started from 1 + [OPENJPA-1994] - Index is a reserved word for MySQL + [OPENJPA-1996] - OpenJPA Samples fail on MacOS X + [OPENJPA-1998] - NPE getTableNameForMetadata when running SchemaTool reflect against Postgres DB + [OPENJPA-2000] - Wrong PostgreSQL data type for REAL - "float8", must be "float4" + [OPENJPA-2005] - PostgresDictionary.isOwnedSequence needs a null check + [OPENJPA-2006] - Sequence generated ids may fail to get assigned when flushing a graph with bi-directional relationships + [OPENJPA-2007] - Setting query hint "openjpa.FetchPlan.Isolation" results in misleading warning + [OPENJPA-2008] - OpenJPA does not work with native queries in a distributed (Slice) environment + [OPENJPA-2010] - Duplicate meta data warning logged due to parsing the same location twice + [OPENJPA-2011] - Prevent reparsing annotation metadata for queries + [OPENJPA-2013] - columnDefinition for TEXT types ends up in wrong sql statement + [OPENJPA-2025] - Byte[] and Char[] should be treated as SingularAttributes, not lists by the metamodel generator + [OPENJPA-2027] - Metamodel genereated at runtime expects ListAttribute for all arrays - not just PersistentCollections. + [OPENJPA-2034] - Update H2 Database sql error codes as per the changes in v1.3.154 + [OPENJPA-2036] - DynamicEnhancer should look for tools.jar in java.home/lib for all JDKs, not just the IBM SDK. + [OPENJPA-2039] - FKs for EAGER fields that are not in the current fetchplan aren't selected + [OPENJPA-2044] - Invalid header in MetaModel classes generated by AnnotationProcessor + [OPENJPA-2045] - NAME is a valid column name for H2 databases. + [OPENJPA-2051] - Entities in a relationship are not properly cascaded after a EntityManager.flush is executed. + [OPENJPA-2056] - Postgres V9.1 issue with LIKE clause and Escape Strings + [OPENJPA-2059] - Missing localizer.properties for org.apache.openjpa.persistence.util.SourceCode + [OPENJPA-2060] - AnnotationProcess failed to generate metadata for List<String>[] attribute in entity + [OPENJPA-2065] - JPA 2.0 Spec. Violation? EntityManager#createNamedQuery(String, Class) bombs with non-entity Class parameter + [OPENJPA-2066] - Edge case in openJPA-1227. openJPA fails to create a join and thus returns wrong data when a collection is selected from superclass and another field is selected from subclass twoor more levels down the hierarchy. + [OPENJPA-2069] - Natvie sequence problems uncovered after OPENJPA-1376 + [OPENJPA-2070] - Error processing while populating Metamodel classes needs improvement + [OPENJPA-2071] - NPE during ResultPacker interface processing + [OPENJPA-2073] - MappingTools requires live connection to DB2 server to retrieve default schema name + [OPENJPA-2076] - Minor fix-ups to messages + [OPENJPA-2077] - Pom references to org.codehaus.mojo openjpa-maven-plugin cause problems + [OPENJPA-2083] - Unmapped fields silently treated as transient + [OPENJPA-2100] - openjpa-maven-plugin fails to create SQL for entities which contain enums + [OPENJPA-2101] - PersistenceProductDerivation overwrites the RemoteCommitProvider configuration + [OPENJPA-2104] - BindParameter is not a valid query parameter as processed in DBDictionary's setUnknown() + [OPENJPA-2105] - Document changes no longer being uploaded + [OPENJPA-2107] - ManagedCache conflict due adding an entity 2 times in the same query. + [OPENJPA-2117] - XML overriding column names for 1xM attributes causes exception. + [OPENJPA-2119] - Update org.apache.openjpa.persistence.util.SourceCode + [OPENJPA-2122] - VerifyError with Java 7 when using javaagent or dynamic container enhancement Improvement ------------ - * [OPENJPA-924] - Cache Finder Query for performance enhancement - * [OPENJPA-1475] - Performance improvement - don't call syncVersion() when no version is specified - * [OPENJPA-1493] - Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect - * [OPENJPA-1502] - Improve msg for unrecognized EntityManager properties - * [OPENJPA-1512] - Include a BundleActivator to register ourselves as a javax.persistence.provider for Apache Aries - * [OPENJPA-1516] - Introduce new "clear" method on EntityManagerImpl - * [OPENJPA-1517] - Reduce locking in LifecycleEventManager - * [OPENJPA-1520] - Move trunk (2.0.x) to require Java 6 to build (but target 1.5 runtime) - * [OPENJPA-1525] - TestCacheMarshallerEndToEnd.Log requires to implement warn() method - * [OPENJPA-1528] - Upgrade to latest MySQL 5.1.12 for junit tests - -** Test - * [OPENJPA-1408] - Create test case binary and source jars in module - * [OPENJPA-1529] - Create new tests for bean caching mode - -Included Changes in OpenJPA 2.0.0 Beta --------------------------------------- - -Sub-task --------- - * [OPENJPA-1103] - Remove early-access disclaimer from the NOTICE files once the spec is released - * [OPENJPA-1115] - Finish support for delimited identifiers - * [OPENJPA-1345] - Update to JPA Spec Version EA9 (dated 10-08-2009) - * [OPENJPA-1347] - Upgrade to Validation API 1.0.0.GA - * [OPENJPA-1353] - Add legal info to the docs - * [OPENJPA-1358] - Support CacheRetrieve/StoreMode properties for find()/refresh() operation - * [OPENJPA-1404] - Add find method that accepts properties to entity manager - * [OPENJPA-1405] - Add refresh method that accepts properties to entity manager - * [OPENJPA-1453] - Add support for testing with final JPA 2.0 TCK - * [OPENJPA-1476] - Turn off QueryCache by default - -Bug ---- - * [OPENJPA-123] - Test framework should allow tests that are expected to fail to be checked in - * [OPENJPA-459] - Problem with bulk updates in mySQL - * [OPENJPA-714] - "Encountered unmanaged object in persistent field" error while merging object tree - * [OPENJPA-748] - Disable QuerySQLCache by default - * [OPENJPA-757] - Map existing OpenJPA extensions to new features of JPA 2.0 - * [OPENJPA-859] - OpenJPA requires all persistent fields to be specified on an XML defined entity - * [OPENJPA-944] - FetchAttribute.recursionDepth = -1 does not load properly self referenced entities in a complex relation - * [OPENJPA-993] - PCEnhancer can't execute if a non-OpenJPA PU is found - * [OPENJPA-1005] - Add PersistenceXMLSchemaVersion(); support - * [OPENJPA-1020] - eager fetching of PersistentCollection of a primitive type fails - * [OPENJPA-1025] - AbstractResultList.subList throws UnsupportedOperationException - * [OPENJPA-1046] - Unique Constraint on MappedSupperClass causes NullPointerException - * [OPENJPA-1141] - NPE at org.apache.openjpa.jdbc.meta.MappingInfo.mergeJoinColumn(MappingInfo.java:1400) - * [OPENJPA-1142] - OptimisticLockException thrown on Query.getResultList() when Pessimistic Lock is applied - * [OPENJPA-1173] - Update PostgreSQL support for 8.4.x - * [OPENJPA-1185] - Subquery overhaul - * [OPENJPA-1189] - Column names do not contain delimiters when obtained from DatabaseMetaData - * [OPENJPA-1197] - NativeQueries fail with MySQL - * [OPENJPA-1224] - OpenJPA MySQL BigDecimal ignoring Precision/Scale column Annotation when generating tables - * [OPENJPA-1263] - TestReaderLob.testUpdateWithNull() fails on MySQL - * [OPENJPA-1276] - Support CQL for Criteria Query - * [OPENJPA-1289] - Oracle driver throws exception due to incorrect mapping of XMLType column - * [OPENJPA-1293] - JUnit test failure when using Derby 10.5.3.0 - * [OPENJPA-1294] - Nested JDBC calls fail for certain database - * [OPENJPA-1306] - Extended lock scope support - * [OPENJPA-1308] - shouldn't always use CAST with UPPER and LOWER for DB2 - * [OPENJPA-1321] - Documentation inaccuracies - * [OPENJPA-1326] - ReverseMappingTool and SchemaTool failing for Sybase - * [OPENJPA-1328] - Move cacheable class configuration to ClassMetaData - * [OPENJPA-1341] - PostRemove not invoked after database record was deleted - * [OPENJPA-1344] - Query [get|set]LockMode & Em getLockMode not throwing correct exceptions - * [OPENJPA-1349] - Compatibility options are not set appropriately for spec level when emf is created by JEE container - * [OPENJPA-1350] - Race condition in the MetaDataRepository - * [OPENJPA-1351] - java.lang.ClassCastException: javax.naming.Reference incompatible with javax.sql.DataSource - * [OPENJPA-1352] - Merge fails if an entity has an element collection which is contructed using Arrays.asList - * [OPENJPA-1354] - Configuring DBCP connection pool with connection properties breaks when user/pasword is specifed and javax.* configuration is set to DBCP Driver - * [OPENJPA-1355] - Recent snaphot versions of openjpa have problem with postgresPreparedStatementImpl constructor making Postgres impossible to use - * [OPENJPA-1357] - Support CacheRetrieve/StoreMode properties for find()/refresh() operation - * [OPENJPA-1370] - JPA2 missing implementation for createNamedQuery(String name, Class<T> resultClass) - * [OPENJPA-1374] - Enable junits to be executed against an in-memory Derby 10.5.3.0 db - * [OPENJPA-1375] - OutOfMemory runs in container environment in a long stress run - * [OPENJPA-1377] - JPA property to enum conversion failure - * [OPENJPA-1379] - Locking problem when using timestamp QueryCache eviction policy. - * [OPENJPA-1380] - Query not getting evicted from QueryCache - * [OPENJPA-1381] - IllegalStateException on query method call after named query is created twice. - * [OPENJPA-1383] - tests rely on US date formatting without setting the correct Locale - * [OPENJPA-1384] - ClassNotFoundException for custom DBDictionary used by EJB - * [OPENJPA-1385] - Parameter in having clause of Criteria query not recognized - * [OPENJPA-1386] - Metamodel Generator does not handle field types that can hide another - * [OPENJPA-1387] - Unique colums automatically defined as non-nullable - * [OPENJPA-1388] - JPQL named parameter using a reserved word resulting in ArgumentException - * [OPENJPA-1390] - Criteria API untyped join(String attr) implies any attribute not a singular attribute - * [OPENJPA-1391] - Handle generic/unspecified type arguments for persistent fields during metamodel generation - * [OPENJPA-1392] - CriteriaBuilder.size() must return Integer as value - * [OPENJPA-1393] - CriteriaBuilder.countDistinct() does not return correct result - * [OPENJPA-1394] - Pessimistic Lock not honour when ORDER BY clause is used - * [OPENJPA-1396] - metadata-complete in the orm file does not override @Transition annotation - * [OPENJPA-1397] - NULL in columns part of an @IdClass composite key leads to "disappearing" (null) returned objects - * [OPENJPA-1400] - Unable to persist a relationship to a detached Entity - * [OPENJPA-1401] - Inheritance using Join Strategy may fail in cross join JPQL - * [OPENJPA-1402] - Improve (avoid) lock on relation field per 2.0 spec semantics - * [OPENJPA-1408] - Create test case binary and source jars in module - * [OPENJPA-1409] - Improve type preservation for currentDate/Time expression in queries - * [OPENJPA-1413] - NPE when update using CASE statement on Derby - * [OPENJPA-1414] - Performance improvements for detach - * [OPENJPA-1419] - Access path metadata set incorrectly for fetch joins in Criteria Query - * [OPENJPA-1425] - Literal value in projection can not be parameterized for all databases - * [OPENJPA-1431] - @Temporal annotation overrides the @Column annotation when using in conjunction with @ElementCollection - * [OPENJPA-1432] - openjpa.Compatibility property for JPA 2.0 behavior may be overwritten if this property is an argument to createEntityManagerFactory - * [OPENJPA-1435] - Multi-1xm relation of same type in entity yields extra null in result collection - * [OPENJPA-1439] - Metamodel instantiation fails on InputStream properties - * [OPENJPA-1441] - NPE when enhancing a Serializable, versioned class - * [OPENJPA-1442] - java.sql.Date, java.math.BigDecimal, or java.math.BigInteger types as derived primary keys are not Enhanced correctly - * [OPENJPA-1444] - Criteria Query with fetch joins does not return correct DISTINCT result - * [OPENJPA-1445] - Support Enum as external value - * [OPENJPA-1452] - OpenJPA 2.0.0-M3 attempts to mutate unmodifiable map in Glassfish - * [OPENJPA-1461] - Incorrect Oracle CREATE TABLE DDL for XML column - * [OPENJPA-1463] - JPQL new operator arguments should be more flexible in matching constructor arguments - * [OPENJPA-1464] - PreparedQuery fails with enum query parameter - * [OPENJPA-1467] - java.lang.IllegalMonitorStateException in ConcurrentDataCache.writeUnlock() - * [OPENJPA-1470] - PCEnhancer is overly verbose - * [OPENJPA-1478] - OpenJPA is no longer available as an OSGi bundle - -Improvement ------------ - * [OPENJPA-250] - Reduce synchronization bottlenecks in data cache, metadata repository, and lifecycle event manager - * [OPENJPA-709] - Better naming for unique constraints - * [OPENJPA-716] - Improve the documentation about Streaming LOB Support - * [OPENJPA-839] - change pom.xml to publish sources as well. - * [OPENJPA-1085] - Add toString() method to PCState classes - * [OPENJPA-1172] - Use java.util.concurrent.ConcurrentHashMap rather than a synchronized HashMap in ClassMapping. - * [OPENJPA-1236] - Finish support of delimiters other than double-quotes - * [OPENJPA-1258] - make warning message more friendly when other persistence provider configured by application - * [OPENJPA-1356] - Use maven-enforcer-plugin to verify proper Java and Maven levels - * [OPENJPA-1363] - Upgrade to latest commons-pool maintenance release - * [OPENJPA-1366] - Remove need for an EMF from OpenJPAPersistenceUtil and TraversableResolverImpl - * [OPENJPA-1368] - Upgrade to HSQLDB 1.8.0.10 and in-memory db for unit tests - * [OPENJPA-1415] - Performance improvement by reduced logging of batched OLE - * [OPENJPA-1440] - Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option - * [OPENJPA-1456] - Replace StringBuffer usage with StringBuilder - * [OPENJPA-1468] - Upgrade build to use final Bean Validation spec API from Geronimo + [OPENJPA-302] - PCEnhancer needs target classes on classpath + [OPENJPA-487] - Generated SUBSTRING SQL is ugly and inefficient + [OPENJPA-1555] - SQLBuffer code cleanup + [OPENJPA-1777] - Allow setting of diagonstic context for each slice in a more flexible manner + [OPENJPA-1778] - Improved error information for unenhanced classes. + [OPENJPA-1798] - Improve messages in localize.properties + [OPENJPA-1803] - Unwrap EntityManager to Connection + [OPENJPA-1847] - Use a single connection when generating schema + [OPENJPA-1863] - update HSQL dictionary for HSQLDB 2.0 + [OPENJPA-1917] - Cache column alias in SelectImpl + [OPENJPA-1937] - Document OpenJPAEntityManager.evict methods + [OPENJPA-1945] - Improve aspects of the OpenBooks sample + [OPENJPA-1972] - DB2 V9.7 changed the default behavior concerning blocking behavior with isolation levels greater then read uncommitted + [OPENJPA-1990] - Skip getting extend exception text when running on DB2 + [OPENJPA-1999] - Optional support for non-sequential positional parameters + [OPENJPA-2014] - Allow proxies to stay in place when Detaching + [OPENJPA-2020] - Make some members of StateManagerImpl protected to allow for greater extensability + [OPENJPA-2031] - Unable to import maven projects with m2e version 1.0 + [OPENJPA-2042] - Diagnostics for Application Managed EntityManagerFactory leaks. + [OPENJPA-2043] - OpenJPAId hashCode() value needs to be consistent after serialization process + [OPENJPA-2047] - Document the impact of Persistence Aware classes + [OPENJPA-2068] - Improve performance of java.util.Calendar fields + [OPENJPA-2075] - Abstract out parameter handling / validation from org.apache.openjpa.persistence.QueryImpl to allow for greater extensibility + [OPENJPA-2084] - Upgrade Derby dependency to 10.8.x + [OPENJPA-2085] - Improve enhancement process to support JAVA 7 compliant class file generation + [OPENJPA-2087] - Remove or limit the use of the ConcreteClassGenerator + [OPENJPA-2120] - Add new option to eliminate reflection calls from enhancer generated IdClass PC copy operations New Feature ------------ - * [OPENJPA-773] - Upgrade to JPA 2 - * [OPENJPA-1181] - Metamodel Generation must be more selective and controllable - * [OPENJPA-1276] - Support CQL for Criteria Query - * [OPENJPA-1332] - Allow configuration property to be declared for internal usage only - * [OPENJPA-1334] - Support instance level distribution policy for named cache partitions - * [OPENJPA-1337] - OpenJPA 2.0 iteration 12 primary task - * [OPENJPA-1357] - Support CacheRetrieve/StoreMode properties for find()/refresh() operation - * [OPENJPA-1373] - OpenJPA 2.0 iteration 13 primary task - * [OPENJPA-1426] - OpenJPA 2.0 iteration 14 primary task - -Task ----- - * [OPENJPA-1183] - Ergonomics of metamodel generation process - * [OPENJPA-1290] - Document Criteria API - -Test ----- - * [OPENJPA-1153] - Test suite speed-up outside SingleEMFTestCase - * [OPENJPA-1342] - Build a mechanics to test JTA transaction semantics within JSE - * [OPENJPA-1466] - Some JUnit test failures on Oracle backeend - - -Included Changes in OpenJPA 2.0.0 Milestone 3 ---------------------------------------------- - -Sub-task --------- - * [OPENJPA-849] - Add metadata-type getter methods to EntityManager - * [OPENJPA-946] - Oracle create table(s) exceptions - * [OPENJPA-1013] - Build strictly-typed Criteria API - * [OPENJPA-1033] - Update supported database and driver matrix - * [OPENJPA-1076] - PersistenceProviderResolver interface and PersistenceProviderResolverHolder class - * [OPENJPA-1078] - Cache mode elements added to persistence.xml - * [OPENJPA-1082] - Validation target groups via persistence.xml or createEMF properties Map - * [OPENJPA-1083] - org.apache.openjpa.persistence.kernel.TestEJBState fails with two exceptions ORA-00904 and ORA-02275 against oracleDB. - * [OPENJPA-1105] - OpenJPA 2.0 iteration 8 primary task - * [OPENJPA-1106] - Integration tests for Bean Validation providers - Part 1 - * [OPENJPA-1107] - Provide TraversableResolver for use with Bean Validation Factory - * [OPENJPA-1111] - Validation mode of callback should cause a PersistenceException when no provider is available - * [OPENJPA-1112] - JPA2 Query result of embeddable object can not be further updated - * [OPENJPA-1130] - Use maven-jar-plugin to create a o-p-j-tests.jar to share base TestCase classes across modules - * [OPENJPA-1131] - Upgrade to maven-jar-plugin-2.2 - * [OPENJPA-1149] - Add embeddables sample to the examples module - * [OPENJPA-1155] - BrokerImpl.detachAllInternal() does not detach newly loaded entities - * [OPENJPA-1157] - Integration tests for Bean Validation providers - Part 2 - * [OPENJPA-1164] - Make sleepTime in SimpleWBCallback configurable - * [OPENJPA-1167] - Use Geronimo EA4 JPA spec jar - * [OPENJPA-1175] - Implement PersistenceUtil and isLoaded methods on the provider - * [OPENJPA-1176] - Properties marked as private are no longer persistent - * [OPENJPA-1177] - Upgrade to Bean Validation JSR-303 1.0 CR3 Spec API - * [OPENJPA-1182] - PreUpdate and PostUpdate behavior - * [OPENJPA-1190] - Use Geronimo EA5 JPA spec jar - * [OPENJPA-1191] - Implement Tuple interface - * [OPENJPA-1194] - LockManager tests call platformSpeedTest() for every test method - * [OPENJPA-1202] - Compile against Geronimo JPA EA6 - * [OPENJPA-1208] - Set specification level based upon persistence.xml version - * [OPENJPA-1210] - Specify derby timeouts via properties. - * [OPENJPA-1213] - query.setParameter() behaviour - * [OPENJPA-1214] - RelationFieldStrategy behaviour - * [OPENJPA-1215] - detach()/detachCopy() behaviour - * [OPENJPA-1220] - Disable DynhamicEnhancerAgent for maven builds - * [OPENJPA-1223] - Update documentation for autoOff config option - * [OPENJPA-1228] - Change in default value of exclude-unlisted-classes in JPA 2.0 - * [OPENJPA-1231] - Bean Validation sample - * [OPENJPA-1232] - Keys in an EmbeddedCollection are returned as PCData objects when DataCache is enabled - * [OPENJPA-1233] - Update DerbyDictionary with new reserved words - * [OPENJPA-1235] - Support for optional name property on UniqueConstraint annotation and XML - * [OPENJPA-1237] - WriteBehind configuration exception not thrown when it should be - * [OPENJPA-1238] - Upgrade to latest commons-pool and commons-dbcp - * [OPENJPA-1240] - Lob, Temporal, Enumerated on element collections annotations and in XML - * [OPENJPA-1246] - Add configuration example for Ingres to User manual - * [OPENJPA-1247] - WriteBehindCallback sleepTime interval of one EMF datacache adversely impacting other EMF datacache - * [OPENJPA-1252] - Include a Derby Network Server test profile - * [OPENJPA-1261] - JPQL query result shape for multi-selections including multi-select-new-constructor - * [OPENJPA-1264] - Support shared-cache-mode element - * [OPENJPA-1266] - JDBC date/timestamp literals in JPQL - * [OPENJPA-1270] - Assert that relationships defined in a mapped superclass must be unidirectional - * [OPENJPA-1271] - Support CacheStoreMode and CacheRetrieveMode properties for EntityManager - * [OPENJPA-1272] - Add tests for element collection association overrides defined in XML - * [OPENJPA-1274] - Support cascade-detach via orm.xml - * [OPENJPA-1282] - Update validation spec api and provider dependencies to spec level CR5 - * [OPENJPA-1292] - NullPointerException when handling WriteBehindConfigurationException - * [OPENJPA-1298] - WriteBehindCache Callback Singleton - * [OPENJPA-1301] - EntityManagerFactoryImpl - * [OPENJPA-1309] - DB2 requires CAST for argument passed to datastore MOD function - * [OPENJPA-1310] - SQLServer requires XML in UTF-16 instead of UTF-8 - * [OPENJPA-1315] - org.apache.openjpa.persistence.QueryImpl - * [OPENJPA-1319] - EntityManagerImpl - * [OPENJPA-1323] - Relax em.refresh TransactionRequireException thown condition - * [OPENJPA-1327] - Document JPQL Query updates - -Bug ---- - * [OPENJPA-386] - org.apache.openjpa.meta.ClassMetaData.validateAppIdClass() does not take @MappedSuperclass into account - * [OPENJPA-466] - Primary key constraint violated using (Oracle) sequence to generate ID in multithreaded app - * [OPENJPA-525] - Inserts new entity with NULL value for Clob column actually inserts empty string - * [OPENJPA-890] - Typos and inconsistent method signature styles in the user manual - * [OPENJPA-922] - setByteArrayInputStream being used in stead of setBytes - * [OPENJPA-932] - Runtime enhancer doesn't work propery if there is a trailing persistence.xml file on the classpath. - * [OPENJPA-934] - Oversight in TestSequenceGenerator - * [OPENJPA-973] - Allow DB2 JCC driver to work with Informix database - * [OPENJPA-1002] - Select range doesn't work on Oracle JDBC driver - * [OPENJPA-1043] - JPQL queries do not support queries on a MappedSuperclass - * [OPENJPA-1049] - Query against a MappedSuperclass is not supported - * [OPENJPA-1061] - Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter - * [OPENJPA-1065] - Prepared Query Cache does not work with DataCache - * [OPENJPA-1074] - OrderColumn does not maintain index upon inter-list element removal - Phase 1 - * [OPENJPA-1100] - @Version-Annotation on Column with unsupported type (e.g. BigDecimal) is silently ignored, but should raise an error - * [OPENJPA-1116] - Annotation Strategy not working - * [OPENJPA-1117] - Missing AgentClass attribute in openjpa-all-xxx.jar manifest.mf - * [OPENJPA-1119] - NPE in InstrumentationFactory - * [OPENJPA-1120] - idEquals() broken in BigDecimalId and BigIntegerId - * [OPENJPA-1121] - Enums cause a ClassNotFoundException in the MappingTool - * [OPENJPA-1125] - A message is logged about dynamically loading the class enhancer even though I'm using the -javaagent - * [OPENJPA-1127] - Typos in user manual and log messages - * [OPENJPA-1132] - Dropping constraints fails on MySQL - * [OPENJPA-1133] - DBDictionary.getPlaceholderValueString returns 0 for boolean which fails in PostgreSQL database. - * [OPENJPA-1135] - Overrides are not applied when embeddables are defined in XML - * [OPENJPA-1139] - checkstyle results in velocity errors in build output - * [OPENJPA-1156] - Path length issues on Windows - * [OPENJPA-1158] - Incorrect handling of long values in AbstractResult - * [OPENJPA-1159] - Bad error message for find of an Entity with compound primary key if parameter of wrong class - * [OPENJPA-1163] - Data consistency issues while modifying collections. - * [OPENJPA-1168] - NPE in UUIDGenerator.initializeForType1() - * [OPENJPA-1170] - Upgrade to Bean Validation JSR-303 1.0 CR2 Spec API - * [OPENJPA-1174] - OpenJPA performs differently with orm.xml and annotations - * [OPENJPA-1184] - Inverse relations not set for MapKey field when using parallel eager select - * [OPENJPA-1200] - Incorrect Entity is returned if ElementClassCriteria is not selected. - * [OPENJPA-1201] - "Mapped by" field not set when contained in superclass - * [OPENJPA-1203] - JPA2 - createEMF should return null for unhandled PUs - * [OPENJPA-1204] - Argument type mismatch when an EmbeddedId contains an Emun type - * [OPENJPA-1205] - Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on - * [OPENJPA-1206] - Bean validation call to provider not Java 2 Enabled - * [OPENJPA-1211] - Enable string navigation in a From expression. - * [OPENJPA-1217] - Ensure comparisons do not contain two parameters with Derby (ie SELECT ... WHERE ? = ?) - * [OPENJPA-1218] - Cache.evict(Clazz) should remove subclasses as well - * [OPENJPA-1221] - Change openjpa-integration module pom's to reflect proper artifact-id - * [OPENJPA-1226] - Can not merge entity with nested embeddable - * [OPENJPA-1227] - SQL generation error when using data cache - * [OPENJPA-1230] - javax.persistence.validation.mode property in createEMF map failed to create emf - * [OPENJPA-1239] - Explicit access type set incorrectly within collection of embeddable with nested embeddable - * [OPENJPA-1242] - Unable to cascade delete an entity in an embeddable - * [OPENJPA-1250] - @ElementCollection with eagar fetch of a List<String> collection is causing a ClassCastException on a em.find(entity). - * [OPENJPA-1253] - JoinColumn annotation not allowed in conjunction with *ToMany annotation - * [OPENJPA-1256] - get java.lang.ClassCastException when IdClass contains an Enum Field - * [OPENJPA-1260] - Wrong sequence is generated for custom native sequence generator from getIdGenerator. - * [OPENJPA-1269] - The table attribute in the MapKeyColumn annotation is not honored - * [OPENJPA-1279] - Query results are not inserted into StoreCache properly - * [OPENJPA-1281] - Reparameter is not working properly for some sql if PreparedQueryCache is on - * [OPENJPA-1283] - Incorrect SQL for JPQL query selecting Map value from an elementCollection of a Map and the map the value is an embeddable - * [OPENJPA-1284] - Fix missing 1.0 schema license headers - * [OPENJPA-1286] - Relationships in mapped superclass must be unidirectional - * [OPENJPA-1294] - Nested JDBC calls fail for certain database - * [OPENJPA-1295] - Query with Escape '\' fails in MySQL - * [OPENJPA-1302] - Ehcache product derivation isn't detected when running in WebSphere - * [OPENJPA-1305] - WriteBehind 'callback; broker should always be unmanaged - * [OPENJPA-1333] - Oracle driver returns incorrect update count on batched insert - * [OPENJPA-1335] - Alternating manual delim id tests fail - * [OPENJPA-1338] - Allow comparison for VALUE(e) that maps to basic type - * [OPENJPA-1371] - Insert is called instead of Update when merge() with derived Identity - -Improvement ------------ - * [OPENJPA-5] - OpenJPA doesn't compile with JDBC 4 - * [OPENJPA-250] - Reduce synchronization bottlenecks in data cache, metadata repository, and lifecycle event manager - * [OPENJPA-651] - Disable dangerous "fallback enhancement", make openjpa.RuntimeUnenhancedClasses=unsupported the default - * [OPENJPA-703] - Cache ResultObjectProvider data to improve query performance - * [OPENJPA-952] - Utilize Sun JDK's Attach API to dynamically load the OpenJPA enhancer agent - * [OPENJPA-968] - Change in default detach() behavior for JPA 2.0 - * [OPENJPA-1000] - Consistent usage of serialVersionUID - * [OPENJPA-1050] - Use generic types and remove casts wherever applicable - * [OPENJPA-1122] - Remove JDBC 3 related reflection from DBDictionary - * [OPENJPA-1126] - Note on Calendar and Java 1.3 no longer needed in user manual - * [OPENJPA-1136] - Add .gitignore for git users - * [OPENJPA-1146] - Shaded RuntimeUnenhancedClass(s)esModes - * [OPENJPA-1151] - Cache the current-time timestamp in AbstractQueryCache.onTypesChanged() - * [OPENJPA-1171] - Use StringBuilder instead of StringBuffer in SQLBuffer - * [OPENJPA-1180] - Query Parameter processing in JPA 2.0 - * [OPENJPA-1245] - Move locking tests to a separate module - * [OPENJPA-1285] - Dynamic JDBC4 connection wrapper should maintain constructor refernce for faster instantiation - * [OPENJPA-1287] - Criteria query to generate 'optimize for 1 row' for DB2 if selection is an aggregate function -New Feature ------------ - * [OPENJPA-918] - Stored procedures not handling returns properly - * [OPENJPA-948] - Ingres DBDictionary - * [OPENJPA-1008] - Generate meta-model for JPA 2.0 - * [OPENJPA-1009] - Populate canonical meta-model for strictly typed Criteria Query building - * [OPENJPA-1010] - Instantiate meta-model classes for JPA 2.0 from source code annotations - * [OPENJPA-1014] - Build weakly-typed Criteria API - * [OPENJPA-1089] - Provide for password encryption within persistence.xml - * [OPENJPA-1123] - MySQL query hints support - * [OPENJPA-1150] - Add WriteBehind mode to cache updates before flushing to backing store - * [OPENJPA-1152] - OpenJPA 2.0 iteration 9 primary task - * [OPENJPA-1187] - Output control for generated canonical metamodel source code - * [OPENJPA-1195] - Allow datastore function as query expression - * [OPENJPA-1198] - Query by Example - * [OPENJPA-1209] - OpenJPA 2.0 iteration 10 primary task - * [OPENJPA-1225] - Improve query result processing with composite pattern - * [OPENJPA-1241] - Add support for joining via keys of a Map attribute for Criteria query - * [OPENJPA-1251] - Add setProperty() method for JPA 2.0 EntityManager - * [OPENJPA-1265] - Support Edit on Criteria Query - * [OPENJPA-1267] - Support JDBC Escape syntax for temporal types on Criteria Query - * [OPENJPA-1268] - OpenJPA 2.0 iteration 11 primary task - * [OPENJPA-1276] - Support CQL for Criteria Query - * [OPENJPA-1277] - Support JPQL to Criteria Query conversion - * [OPENJPA-1278] - Define interfaces for OpenJPA specific extension to Criteria Query API - * [OPENJPA-1288] - Support alias() on Criteria Query API - * [OPENJPA-1330] - Support uni-/bi-directional Many-To-One mapping using Join Table Strategy - * [OPENJPA-1331] - Support bi-/uni-directional One-to-One mappin using Join Table Strategy + [OPENJPA-184] - use DB2 Diagnostic interface to report extended error diagnostics on SQL Exception + [OPENJPA-1859] - Create a sample to demonstrate usage of JEST + [OPENJPA-1934] - contribute an openjpa-maven-plugin + [OPENJPA-2108] - Allow an option to terminate MappingTool-generated SQL with a character other than semicolon + [OPENJPA-2111] - Optimize column based ResultSet lookup whereever feasible Task ----- - * [OPENJPA-1143] - Synch JPA 2.0 development with evolving JPA 2.0 Spec - * [OPENJPA-1229] - OpenJPA 2.0 milestone 3 distribution - * [OPENJPA-1262] - Update to JPA Spec Version EA7 (dated 08-19-2009) - * [OPENJPA-1275] - Update to JPA Spec Version Public Draft Version 2 (dated 08-31-2009) - * [OPENJPA-1290] - Document Criteria API - -Test ----- - * [OPENJPA-1071] - Derby test suit speed-up - * [OPENJPA-1124] - TestDateQueries and TestQueryTimeout are locale dependent - * [OPENJPA-1147] - Streaming LOB tests and TestAutoIncrement not executed by test suite - * [OPENJPA-1148] - Build failures with 64bit Sun JDK6 on Linux due to PermGen space - * [OPENJPA-1222] - Enable Criteria testcases - - - -Included Changes in OpenJPA 2.0.0 Milestone 2 ---------------------------------------------- - -Sub-task --------- - * [OPENJPA-722] - persist - clear - merge scenario doesn't work - * [OPENJPA-744] - Extra SQL on LAZY/EAGER ManyToOne relation - * [OPENJPA-754] - Un-scheduled pre/postUpdate callbacks from persist. - * [OPENJPA-765] - Check for insertable or updateable before checking value for null - * [OPENJPA-769] - Add compatibility option to use previous column naming convention - * [OPENJPA-770] - Use annotations instead of excluding tests in pom.xml - * [OPENJPA-782] - Support for collections of embeddables and basic types - * [OPENJPA-803] - Update SequenceGenerator to support schema and catalog - * [OPENJPA-804] - JPA 2.0 spec API update - iteration 1 - * [OPENJPA-805] - JPQL updates - iteration 1 - * [OPENJPA-809] - Support JPA 2.0 Cache Interface - * [OPENJPA-823] - Add JPA 2.0 schemas and appropriately validate for version - * [OPENJPA-837] - OpenJPA 2.0: Update OpenJPA documentation with new persistence schemas - * [OPENJPA-849] - Add metadata-type getter methods to EntityManager - * [OPENJPA-850] - Support equivalent names for plug-in value - * [OPENJPA-851] - Support for enhanced map collection (and corresponding annotations) - * [OPENJPA-855] - JPA2 Query support for Index function - * [OPENJPA-856] - JPA2 Query support for entity type expressions - * [OPENJPA-861] - Update the manual for XML column support for MySQL - * [OPENJPA-865] - JPA2 Query support for collection-valued input parameters in IN Expression predicate - * [OPENJPA-869] - Support @OrderColumn annotation and XML-based definition - phase 2 - * [OPENJPA-870] - Support orphanRemoval attribute on relationships - * [OPENJPA-871] - Support derived identity - * [OPENJPA-878] - Support default query hint for query timeout - * [OPENJPA-879] - JPA2 Query support for general and qualified identification variable - * [OPENJPA-880] - Use maven-remote-resources-plugin to generate required legal files - * [OPENJPA-885] - Support clear methods on EntityManager, including new CascadeType.CLEAR - * [OPENJPA-891] - JPA2 LockTypeMode Support - * [OPENJPA-903] - org.apache.openjpa.persistence.exception.TestException hangs when run using PostgreSQL 8.3 database - * [OPENJPA-905] - org.apache.openjpa.persistence.kernel.TestProxies2 - * [OPENJPA-906] - org.apache.openjpa.persistence.jpql.expressions.TestEntityTypeExpression - * [OPENJPA-907] - org.apache.openjpa.persistence.jdbc.update.TestParentChild - * [OPENJPA-908] - org.apache.openjpa.persistence.annotations.TestOneToOne - * [OPENJPA-926] - Support explicit access types including @Access annotation and AccessType enum and XML - * [OPENJPA-930] - @AttributeOverride updates - * [OPENJPA-931] - Support derived identity (spec 2.4.1.2 Ex 5(a), 6 (a)) - * [OPENJPA-937] - @AssociationOverride updates - * [OPENJPA-946] - Oracle create table(s) exceptions - * [OPENJPA-957] - Support lock timeout hint on applicable methods - * [OPENJPA-959] - Support lock mode on Query interface - * [OPENJPA-960] - Support unwrap methods on EntityManager and Query interfaces - * [OPENJPA-961] - Support projection of element collection from a JPQL query - * [OPENJPA-962] - Support the use of delimited-identifiers - * [OPENJPA-963] - Add query timeout tests for PU and Map properties - * [OPENJPA-964] - Finish updating sql-error-state- codes.xml for query timeout support on other DBs - * [OPENJPA-967] - JPA2 Query support for selction of KEY, VALUE, ENTRY of a Map value - * [OPENJPA-972] - Support standard provider properties in PersistenceProvider class - * [OPENJPA-978] - Allow third argument of JPQL SUBSTRING function to be optional - * [OPENJPA-990] - setHint should return IllegalArgumentException for invalid query/lock timeout values - * [OPENJPA-1012] - Test failures in TestManagedInterface with @ManagedInterface annotation when using JDK6 - * [OPENJPA-1016] - JPA2 Query support for embeddables; nested embeddables; relationships from embeddables - * [OPENJPA-1023] - Message files contain windows EOL characters - * [OPENJPA-1024] - JPA2 Query scalar expression in subquery - * [OPENJPA-1026] - Ensure newlines at end of fie - * [OPENJPA-1027] - Document changes for detach methods - * [OPENJPA-1032] - Revert OpenJPAQuery.getPositionalParameters method signature back to 1.x signature - * [OPENJPA-1033] - Update supported database and driver matrix - * [OPENJPA-1034] - Removal of OrderColumn attributes per latest spec draft - * [OPENJPA-1035] - JPA2 Query allow map key/value path as argument of scalar functions - * [OPENJPA-1055] - Added MapKeyEnumerated and MapKeyTemporal annotations and XML. - * [OPENJPA-1062] - Include OSGi bundle metadata - * [OPENJPA-1064] - JPA2 Query comparisons over instances of embeddable class are not supported - * [OPENJPA-1068] - Support Bean Validation: Entity validation upon lifecycle events - * [OPENJPA-1069] - OrderBy annotation applied to an element collection of basic type doesn't require property or field name - * [OPENJPA-1076] - PersistenceProviderResolver interface and PersistenceProviderResolverHolder class - * [OPENJPA-1077] - Validation-mode element support added to persistence.xml and to createEMF properties Map - * [OPENJPA-1078] - Cache mode elements added to persistence.xml - * [OPENJPA-1082] - Validation target groups via persistence.xml or createEMF properties Map - * [OPENJPA-1090] - Oracle failures due to the following warning "This database dictionary "Oracle" does not support auto-assigned column values. The column "pid" may not behave as desired." - * [OPENJPA-1094] - JPA2 Query support for KEY appear in subquery - * [OPENJPA-1098] - JPA2 Query support subselect_identification_variable - * [OPENJPA-1101] - OSGi Integration tests - * [OPENJPA-1102] - Support application/container provided ValidatorFactory - * [OPENJPA-1103] - Remove early-access disclaimer from the NOTICE files once the spec is released - * [OPENJPA-1106] - Integration tests for Bean Validation providers - * [OPENJPA-1111] - Validation mode of callback should cause a PersistenceException when no provider is available - * [OPENJPA-1113] - Reflection class performance improvement - * [OPENJPA-1114] - Bean Validation APIs should be an optional runtime dependency - * [OPENJPA-1115] - Finish support for delimited identifiers - -Bug ---- - * [OPENJPA-207] - failure when composite ID has another composite ID as a field - * [OPENJPA-218] - pcNewInstance and ApplicationId - * [OPENJPA-377] - RuntimeUnenhancedClasses support can go into a "half baked" state - * [OPENJPA-466] - Primary key constraint violated using (Oracle) sequence to generate ID in multithreaded app - * [OPENJPA-557] - Primary key sequences broken with postgres schemas - * [OPENJPA-580] - Need a better algorithm to find DBDictionary classname in DBDictionaryFactory - * [OPENJPA-732] - Updates to entities via Lifecycle callback methods - * [OPENJPA-751] - Typos in the manual - * [OPENJPA-755] - OpenJPA thows EntityExistsException trying persist a preexisting, detached entity - * [OPENJPA-761] - SchemaTool failed with a NPE in ForeignKey.join - * [OPENJPA-762] - Batch execution fails for Oracle when batch limit set to -1 (unlimited batch size) - * [OPENJPA-764] - Query parsing error with IN expression and String functions such as UPPER() - * [OPENJPA-777] - Exception is thrown during retrieval of an entity which contains a persistent collection of embeddable - * [OPENJPA-787] - slices query.getSingleResult is broken - * [OPENJPA-792] - An entity persist may fail when @MappedSupercalss is specified. - * [OPENJPA-795] - enhancer throws an exception when parsing column name "first.name" because it thinks 'first' is a table name - * [OPENJPA-798] - slices does can not work with sequences properly (no adding objects?) - * [OPENJPA-811] - With Oracle, OpenJPA allows setting non-nullable field to null - * [OPENJPA-815] - Exception is thrown when retrieving an entity which contains an embeddable and the embeddable contains a toMany relation - * [OPENJPA-818] - TCK module should use Geronimo JPA 2.0 EA jar - * [OPENJPA-819] - NPE when no metadata is defined for a persistent class - * [OPENJPA-828] - Externalizer fails with ClassCastException with runtime enhancement - * [OPENJPA-834] - State field mapped to XML column has incorrect value when loaded from database - * [OPENJPA-835] - Loading nested toMany EAGER relation resuled in PersistenceException - * [OPENJPA-836] - after em.clear the datacache is inconsistent - * [OPENJPA-838] - fix parameter setting problem when QuerySQLCache is on - * [OPENJPA-843] - Unnecessary version update on inverse-side of a 1-m relationship - * [OPENJPA-847] - Retrieving database generated keys gets never enabled - * [OPENJPA-853] - Informix cursor not open problem if synchronizeMapping set true - * [OPENJPA-863] - Unexpected mere-cascade behavior when cascade.all/merge specified on both sides of relationships !!! - * [OPENJPA-864] - Subquery problems with SYNTAX_DATABASE (Oracle) - * [OPENJPA-866] - DBDictionary.maxTableNameLength is not checked when using SynchronizeMappings - * [OPENJPA-872] - Compound custom id in bidirectional many-to-one - * [OPENJPA-873] - @MappedSuperClass Cause Null Pointer Exception in Class With IdClass - * [OPENJPA-883] - Documentation is out of date for some MySQLDictionary properties - * [OPENJPA-884] - Logging oversight in DB2Dictionary - * [OPENJPA-886] - Certain query failing after svn:739123 - * [OPENJPA-887] - Assertion oversight in TestLibService - * [OPENJPA-890] - Typos and inconsistent method signature styles in the user manual - * [OPENJPA-892] - Incorrect package name of javax.jdo for Query class image - * [OPENJPA-896] - Several source files include Windows EoL chars - * [OPENJPA-898] - hints don't work for NamedNativeQuery - * [OPENJPA-912] - Potential NPE in setInverseRelation - * [OPENJPA-913] - A deadlock issue happens when DirtyListener is used - * [OPENJPA-916] - DistributedTemplate is incorrectly setting some attributes on the statements - * [OPENJPA-917] - stored procedures throw InvalidStateException when using getSingleResult() or getResultList() - * [OPENJPA-919] - JUnit for Bi-directional OneToOne with null relationships - * [OPENJPA-922] - setByteArrayInputStream being used in stead of setBytes - * [OPENJPA-923] - Update documentation for properly configuring Oracle, PostgreSQL, and DB2 - * [OPENJPA-925] - Bidirectional OneToOne relation incorrectly set in loadEagerJoin - * [OPENJPA-927] - Fix definition of javax.persistence.query.timeout property - * [OPENJPA-928] - getSupportedProperties() shows wsjpa property by default - * [OPENJPA-933] - Database version detection in MySQLDictionary is not reliable - * [OPENJPA-935] - Removing entities with Embedded field issue multiple delete statements - * [OPENJPA-947] - Overly verbose TestCases - * [OPENJPA-951] - Javadoc jar file does not contain legal files - * [OPENJPA-954] - openjpa-slice build fails due to tests relying on openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/AllowFailure.java - * [OPENJPA-955] - MethodQL parameter passing broken - * [OPENJPA-965] - Open up FinderCacheImpl for non-JDBC or JDBC-like implementation of preparing statement/query execution - * [OPENJPA-970] - SchemaToolTask does not have "dropTables" argument - * [OPENJPA-973] - Allow DB2 JCC driver to work with Informix database - * [OPENJPA-974] - Docs: Add new Exception types - * [OPENJPA-981] - @Replicated is only recognized for root instance but not the instanes reachable from the root during persist() operation. - * [OPENJPA-992] - Failed to throw EntityExistException on duplicated persist in DB2 - * [OPENJPA-999] - Missing sql-warning in the localizer.properties - * [OPENJPA-1002] - Select range doesn't work on Oracle JDBC driver - * [OPENJPA-1004] - Derived Identity fails when parent id is auto-generated - * [OPENJPA-1006] - Disabling QueryCaching at runtime does not work - * [OPENJPA-1028] - ClassCastException during findBy when embeddable is involved - * [OPENJPA-1029] - SQLServerDictionary causes NumberFormatException if MS SQL Server JDBC driver is used - * [OPENJPA-1031] - Update docs that refer to OpenJPAEntityManager.getExtent(..) - * [OPENJPA-1040] - Fix code formatting errors introduced by OPENJPA-1010 - * [OPENJPA-1041] - OrderBy on nested embeddables is not working - * [OPENJPA-1046] - Unique Constraint on MappedSupperClass causes NullPointerException - * [OPENJPA-1047] - Unique Constraint on sibling classes causes name conflict - * [OPENJPA-1049] - Query against a MappedSuperclass is not supported - * [OPENJPA-1051] - [patch] Mappingtool doesn't check name conflicts if MappingDefaultsImpl is called with multiple columns. - * [OPENJPA-1053] - Updating an entity by setting an embeddable to it does not work properly if the embeddable has a cascade delete relationship with another entity - * [OPENJPA-1054] - Large result sets do not work with MySQL - * [OPENJPA-1057] - Foreign keys are not properly set for ConstraintUpdateManager to determine the correct order of the sql - * [OPENJPA-1058] - Duplicate rows in DB when UniqueConstraint set - * [OPENJPA-1060] - Attempting to returning a list over RMI/IIOP results in serialization exception - * [OPENJPA-1067] - SetQueryTimeout(x) where x != 0 causes SQLException with DB2 on Z/OS - * [OPENJPA-1070] - Restore support for composite foreign keys on MySQL - * [OPENJPA-1072] - Nested embeddable with a relationship to an Entity with a generated id doesn't persist the relationship - * [OPENJPA-1088] - Build updates for openjpa-examples and openjpa-integration/examples - * [OPENJPA-1091] - ReverseMappingTool fails for openjpa-examples/reversemapping sample - * [OPENJPA-1099] - <xmp> tag in Javadoc comments causes Javadoc corruption - -Improvement ------------ - * [OPENJPA-213] - @Column with precision and scale should result in NUMERIC(precision, scale) - * [OPENJPA-736] - Combine insert and select SQL together for generated Id strategy=GenerationType.IDENTITY - * [OPENJPA-742] - Add line number and column number to QueryMetaData - * [OPENJPA-752] - ProxySetupStateManager.setProxyData routing through PersistanceCapable caused "PersistenceException: null" - * [OPENJPA-772] - Proper maven pluginManagement and use ianal-maven-plugin for enforcing legal files - * [OPENJPA-775] - Some Firedird setup tricks - * [OPENJPA-776] - Firebird 2 dictionary which supports sequences - * [OPENJPA-778] - cleaning up build for openjpa-kernel - * [OPENJPA-779] - patch for eclipse .project and .classpath files... - * [OPENJPA-780] - code review for DistributedStoreManager - * [OPENJPA-781] - openjpa-jdbc depends on postgres driver, should be "provided" - * [OPENJPA-783] - openjpa-lib/pom.xml has extraneous code - * [OPENJPA-784] - more pom.xml dependency cleanup - * [OPENJPA-817] - Order of inserts lost when using ConstraintUpdateManager - * [OPENJPA-854] - Testcases should not specify log level - * [OPENJPA-858] - Allow postPersist be invoked immediately after persist() - * [OPENJPA-876] - Better test profiles for proprietary databases (DB2, Oracle) and continuous build - * [OPENJPA-881] - Enable connection pooling for testcases. - * [OPENJPA-882] - Upgrade to latest Geronimo Spec releases - * [OPENJPA-901] - Use hosted JAI artifacts as the default for the docbook build - * [OPENJPA-910] - Allow multiple keys for the same property to be specified at different levels - * [OPENJPA-949] - Allow override of Surefire test excludes from cmdline - * [OPENJPA-952] - Utilize Sun JDK's Attach API to dynamically load the OpenJPA enhancer agent - * [OPENJPA-968] - Change in default detach() behavior for JPA 2.0 - * [OPENJPA-975] - Oracle needs ability to not have an escape character for search strings. - * [OPENJPA-983] - FirebirdDictionary improvements - * [OPENJPA-988] - Refactor JPA2/MixedLockManager to conform architectual module dependency - * [OPENJPA-1000] - Consistent usage of serialVersionUID - * [OPENJPA-1022] - Support distinct LockModeType.READ/OPTIMISTIC & WRITE/OPTIMISTIC_FORCE_INCREMENT - * [OPENJPA-1038] - Enhancer java.lang.StackOverflowError exception when circular dependencies are encountered within embeddables - * [OPENJPA-1045] - Add opt-in and opt-out configuration for L2 DataCache - * [OPENJPA-1056] - Add support for Sybase in the query timeout tests - * [OPENJPA-1063] - Create a new openjpa-all artifact to include runtime depends - * [OPENJPA-1066] - Generated ID starting with 0 can cause unexpected results - * [OPENJPA-1079] - Allow client to access the distributed JDBC connection - -New Feature ------------ - * [OPENJPA-723] - Feature request for PostgreSQL XML Column Mapping - * [OPENJPA-767] - Better OSGi Integration - * [OPENJPA-773] - Upgrade to JPA 2 - * [OPENJPA-800] - OpenJPA 2.0 iteration 1 primary task - * [OPENJPA-807] - OpenJPA 2.0 iteration 2 primary task - * [OPENJPA-808] - OpenJPA 2.0 iteration 3 primary task - * [OPENJPA-831] - OpenJPA 2.0 iteration 1.5 (holiday) primary task - * [OPENJPA-846] - XML column support for MySQL - * [OPENJPA-875] - OpenJPA 2.0 iteration 4 primary task - * [OPENJPA-918] - Stored procedures not handling returns properly - * [OPENJPA-956] - OpenJPA 2.0 iteration 5 primary task - * [OPENJPA-966] - Support Replication-enabled MySQL - * [OPENJPA-985] - Support dynamic addition of slices - * [OPENJPA-1005] - Add PersistenceXMLSchemaVersion(); support - * [OPENJPA-1007] - OpenJPA 2.0 iteration 6 primary task - -Test ----- - * [OPENJPA-247] - new-delete-new-find doesn't work - * [OPENJPA-833] - An improved test case for XML column mapping - * [OPENJPA-998] - Add @Ignore annotation support for testcases - * [OPENJPA-1015] - Enforce 80-column line width for source code - * [OPENJPA-1071] - Derby test suit speed-up - * [OPENJPA-1073] - Upgrade to latest maven-surefire-plugin - * [OPENJPA-1092] - enable test case for jpql - - -Included Changes in OpenJPA 2.0.0 Milestone 1 ---------------------------------------------- - -Sub-task --------- - * [OPENJPA-765] - Check for insertable or updateable before checking value for null - * [OPENJPA-802] - Support @OrderColumn annotation and XML-based definition - * [OPENJPA-806] - Support Criteria API for JPA 2.0 - Iteration 1 - * [OPENJPA-857] - Detect and store JPA version - * [OPENJPA-899] - Add support for JPA2.0 method Query.getHints() - * [OPENJPA-900] - Add support for JPA2.0 method Query.getSupportedHints() - * [OPENJPA-958] - Support lock mode on Named Query - * [OPENJPA-1013] - Build strictly-typed Criteria API - -Bug ---- - * [OPENJPA-645] - Date millisecond precision lost for Informix IDS and SQLServer - * [OPENJPA-662] - Version field returns null when explicitly projected in SELECT clause - * [OPENJPA-677] - Single Table Inheritance Strategy causes entity identity issues - * [OPENJPA-680] - Flush followed by refresh on a new instance returns an instance with all fields but id cleared - * [OPENJPA-699] - SQLWarnings not handled properly with WarningAction set to "handle" - * [OPENJPA-794] - issues with closing/opening entity manager (slices) (can't seem to be able to create multiple entityManagers ) - * [OPENJPA-799] - slices: can not handle multiple projections in one query ( select count(*), max(fieldA) .......) - * [OPENJPA-801] - slices: basic query is failing on sort.. not sure why - * [OPENJPA-812] - slices: aggregate queries fail if any slice has empty results - * [OPENJPA-821] - slices: DistributedStoreQuery$UpdateExecutor calls executeDelete by mistake - * [OPENJPA-824] - org.apache.openjpa.lib.util.ParseException when try to get property descriptor for property: CacheMarshallers - * [OPENJPA-825] - slices: hangs with multithreaded true - * [OPENJPA-828] - Externalizer fails with ClassCastException with runtime enhancement - * [OPENJPA-845] - Ordering across slice fails when ordering terms are not included in projection items - * [OPENJPA-886] - Certain query failing after svn:739123 - * [OPENJPA-955] - MethodQL parameter passing broken - * [OPENJPA-1039] - Dynamic query predicates must not treat AND OR operators as associative - -Improvement ------------ - * [OPENJPA-703] - Cache ResultObjectProvider data to improve query performance - * [OPENJPA-760] - Better DBDictionary autodetection - * [OPENJPA-841] - Create structures to hold Slice information with StateManangers - * [OPENJPA-858] - Allow postPersist be invoked immediately after persist() - * [OPENJPA-968] - Change in default detach() behavior for JPA 2.0 - * [OPENJPA-620] - An eagerly initialized configuration with fail-fast behavior on persistent class resolution - -New Feature ------------ - * [OPENJPA-800] - OpenJPA 2.0 iteration 1 primary task - * [OPENJPA-807] - OpenJPA 2.0 iteration 2 primary task - * [OPENJPA-831] - OpenJPA 2.0 iteration 1.5 (holiday) primary task - * [OPENJPA-966] - Support Replication-enabled MySQL - * [OPENJPA-1008] - Generate meta-model for JPA 2.0 - * [OPENJPA-1009] - Populate canonical meta-model for strictly typed Criteria Query building - * [OPENJPA-1010] - Instantiate meta-model classes for JPA 2.0 from source code annotations - * [OPENJPA-1011] - Instantiate meta-model classes for JPA 2.0 from XML descriptors - * [OPENJPA-1014] - Build weakly-typed Criteria API - -Task ----- - * [OPENJPA-995] - Migrate existing Criteria Query implementation as OpenJPA extension to prepare for upcoming JPA 2.0 spec changes + [OPENJPA-1786] - Upgrade to latest JPA 2.0 TCK + [OPENJPA-1834] - Upgrade trunk to use Deby 10.6.2.1 for junits + [OPENJPA-1875] - Add generics to the Graph code + [OPENJPA-2089] - upgrade bval to latest 0.3-incubating + [OPENJPA-2091] - update docbook maven plugin Test ----- - * [OPENJPA-766] - Tests that currently fail should be committed to the repository + [OPENJPA-2029] - Add PreparedQuery tests for non-sequential positional parameters support From commits-return-9372-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 9 16:51:59 2012 Return-Path: <commits-return-9372-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3E33A918D for <apmail-openjpa-commits-archive@www.apache.org>; Thu, 9 Feb 2012 16:51:59 +0000 (UTC) Received: (qmail 18430 invoked by uid 500); 9 Feb 2012 16:51:59 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 18413 invoked by uid 500); 9 Feb 2012 16:51:59 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 18405 invoked by uid 99); 9 Feb 2012 16:51:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 16:51:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 16:51:47 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 05514238897D for <commits@openjpa.apache.org>; Thu, 9 Feb 2012 16:51:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1242395 [2/2] - in /openjpa/trunk/openjpa-project: BUILDING.txt CHANGES.txt RELEASE-NOTES.html Date: Thu, 09 Feb 2012 16:51:24 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120209165125.05514238897D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: openjpa/trunk/openjpa-project/RELEASE-NOTES.html URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/RELEASE-NOTES.html?rev=1242395&r1=1242394&r2=1242395&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/RELEASE-NOTES.html (original) +++ openjpa/trunk/openjpa-project/RELEASE-NOTES.html Thu Feb 9 16:51:24 2012 @@ -17,9 +17,9 @@ specific language governing permissions under the License. --> <html> -<title>Release Notes for Apache OpenJPA 2.2.0-SNAPSHOT +Release Notes for Apache OpenJPA 2.2.0 -

Release Notes for Apache OpenJPA 2.2.0-SNAPSHOT

+

Release Notes for Apache OpenJPA 2.2.0

@@ -49,7 +37,7 @@ under the License.

Overview

- The Apache OpenJPA community is proud to release a SNAPSHOT distribution of + The Apache OpenJPA community is proud to release a distribution of OpenJPA 2.2.0. This distribution is based on the final JSR 317 Java Persistence API, Version 2.0 specification and passes the JPA 2.0 TCK, while remaining backwards compatible with prior releases based on the @@ -57,7 +45,8 @@ under the License. (Enterprise JavaBeans 3.0).

-

Additional information on the OpenJPA project may be found at the project web site: http://openjpa.apache.org

+

Additional information on the OpenJPA project may be found at the project +web site: http://openjpa.apache.org

Prerequisites

OpenJPA requires Java 6 or higher and a relational @@ -77,7 +66,8 @@ Information on all of the OpenJPA mailin http://openjpa.apache.org/mailing-lists.html

Getting Involved

-

The Apache OpenJPA project is being built by the open source community for the open source community - we welcome your input and contributions!

+

The Apache OpenJPA project is being built by the open source community for the open source community - +we welcome your input and contributions!

What we are looking for:

  • Source code and fixes contributions
  • @@ -121,7 +111,7 @@ under the License.

    in each release of OpenJPA.

    Notice

    -

    Copyright 2006,2011 The Apache Software Foundation +

    Copyright 2006,2012 The Apache Software Foundation
    This product includes software developed at The Apache Software Foundation (http://www.apache.org/).

    Apache OpenJPA includes the persistence and orm schemas from the JPA specifications.
    Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved. @@ -129,7 +119,7 @@ in each release of OpenJPA.


    You can obtain a copy of the License at: https://glassfish.dev.java.net/public/CDDL+GPL.html
    The source code is available at: -https://glassfish.dev.java.net/source/browse/glassfish/

    +http://java.net/projects/glassfish

    The complete list of notices can be found in NOTICE.txt included in each assembly.


    @@ -137,1147 +127,318 @@ in each release of OpenJPA.

    Release Notes


    -

    OpenJPA 2.2.0-SNAPSHOT

    -

    TBD...

    +

    OpenJPA 2.2.0

    -
    -

    OpenJPA 2.1.0

    -

    TBD...

    - -
    -

    OpenJPA 2.0.1

    -

    Sub-task

    -
      -
    • [OPENJPA-1635] - Reduce lock contention in MetaDataRepository.processRegisteredClasses -
    • -
    • [OPENJPA-1638] - Add test variation to TestNamedQueryLockMode -
    • -
    - -

    Bug

    -
      -
    • [OPENJPA-1424] - Out of bounds exception using fetch plan -
    • -
    • [OPENJPA-1641] - SybaseDictionary should try both JDBC column names and Sybase specific column names -
    • -
    • [OPENJPA-1668] - User's ''DBDictionary.sequenceSQL' setting not being honored on zOS -
    • -
    • [OPENJPA-1678] - SQL Parameter values may contain sensitive information and should not be logged by default. -
    • -
    • [OPENJPA-1679] - Index name too long for DB2 zOS when schema is present -
    • -
    • [OPENJPA-1690] - DistinctResultList is not Serializable -
    • -
    • [OPENJPA-1704] - PCEnhancer incorrectly generates readExternal -
    • -
    • [OPENJPA-1713] - OutOfMemory caused by EntityManagerImpl.push/popFetchPlan processing -
    • -
    • [OPENJPA-1714] - Consider openjpa.Optimistic setting when calculating the default lock mode to apply to a named query -
    • -
    • [OPENJPA-1715] - OpenJPA generates wrong SQL if a result variable that references an aggregate expression is used in ORDER BY clause -
    • -
    • [OPENJPA-1719] - Prepared SQL cache ordering problem with subqueries. -
    • -
    • [OPENJPA-1722] - Problem serializing DistinctResultList when EntityManager is closed -
    • -
    • [OPENJPA-1737] - The openjpa-2.0.0.jar does not have its MANIFEST.MF has the first entry -
    • -
    • [OPENJPA-1742] - Recover if connectionFactory on EntityManagerFactory is invalid but cf on EntityManager is valid. -
    • -
    • [OPENJPA-1749] - Throw exception if using datacache / synchronize mappings and specifying datasource name at EM creation. -
    • -
    • [OPENJPA-1753] - TestMixedLockManagerLockPermutation: Timing issue determines the pass/no-pass of the test case -
    • -
    - -

    Improvement

    -
      -
    • [OPENJPA-1637] - Upgrade to latest Geronimo Specs for JPA2 and Bean Validation -
    • -
    • [OPENJPA-1673] - Update MetaDataRepository docs -
    • -
    • [OPENJPA-1712] - Upgrade builds to use Apache hosted Nexus repo -
    • -
    • [OPENJPA-1735] - Mark commons-logging as provided in the build to remove transient maven dependency -
    • -
    • [OPENJPA-1771] - Upgrade to latest Apache BVAL for testing and apache-rat plugin -
    • -
    - -

    Test

    -
      -
    • [OPENJPA-1639] - Simple openjpa-xmlstore tests -
    • -
    • [OPENJPA-1660] - Add support to test with Apache Bean Validation provider -
    • -
    - - -
    -

    OpenJPA 2.0.0

    -

    Sub-task

    -
    - -

    Bug

    -
      -
    • [OPENJPA-1091] - ReverseMappingTool fails for openjpa-examples/reversemapping sample -
    • -
    • [OPENJPA-1510] - Documentation corrections -
    • -
    • [OPENJPA-1550] - When batchLimit=-1 or >1 and an exception is caused, the params and failedObject are missing from the resultant exception. -
    • -
    • [OPENJPA-1559] - DataCacheManager initialization isn't thread safe. -
    • -
    • [OPENJPA-1569] - @Strategy triggers an InvalidStateException for fields which are declared as Java interfaces -
    • -
    • [OPENJPA-1597] - Need Compatibility setting for new OPENJPA-1097 Proxies and DetachedStateField behavior -
    • -
    • [OPENJPA-1599] - Cache mode properties passes in to em.find and lock methods are not transient -
    • -
    • [OPENJPA-1602] - Query with lock mode set to PESSIMISTIC_WRITE does not have for update clause attached to the sql when runs twice -
    • -
    • [OPENJPA-1604] - Setting PessimisticLockManager fails to append "for update clause" to the select statement -
    • -
    • [OPENJPA-1605] - ReverseMappingTool (SchemaGenerator) bug -
    • -
    • [OPENJPA-1608] - PESSIMISTIC_WRITE is not working in Informix -
    • -
    • [OPENJPA-1609] - PessimisticLockException instead of LockTimeoutException thrown on DB2V9 for ZOS -
    • -
    • [OPENJPA-1611] - Wrong PersistentAttributeType returned for @Embedded types -
    • -
    • [OPENJPA-1618] - Exception during factory creation due to javax.persistence.transactionType -
    • -
    • [OPENJPA-1625] - Inconsistent creation of StateManagerImpl in BrokerImpl -
    • -
    • [OPENJPA-1630] - NPE in MetaDataRepository when preloading is enabled under heavy stress. -
    • -
    • [OPENJPA-1631] - MetaDataRepository preload doesn't load JAXB meta data -
    • -
    - -

    Improvement

    + Release Notes - OpenJPA - Version 2.2.0 + +

    Sub-task +

      -
    • [OPENJPA-1382] - make org.apache.openjpa.persistence.meta.AnnotationProcessor6 as service -
    • -
    • [OPENJPA-1545] - Add new Detach processing -
    • -
    • [OPENJPA-1603] - Decouple the QueryCache from the DataCache -
    • -
    • [OPENJPA-1622] - Invoking MetaModel generator +
    • [OPENJPA-1593] - Create an OSGiManagedRuntime
    • -
    • [OPENJPA-1628] - Output control for generated canonical metamodel source code +
    • [OPENJPA-2081] - Provide subset of XML support for OpenJPA annotations
    - -

    Task

    + +

    Bug +

      -
    • [OPENJPA-1178] - Backwards Compatibility Issues +
    • [OPENJPA-478] - Contradictory text in manual section 10.2.6. JPQL GROUP BY, HAVING
    • -
    - -

    Test

    -
      -
    • [OPENJPA-1336] - Intermittent test failure in org.apache.openjpa.persistence.generationtype.TestGeneratedValues when running on MySQL +
    • [OPENJPA-867] - Unexpected Behaviour of DBDictionary.indexOf() method
    • -
    • [OPENJPA-1606] - Add JPQL tests for element collection +
    • [OPENJPA-1343] - Incorrect example of openjpa.Sequence property
    • -
    • [OPENJPA-1614] - Testcase failures in TextException on MSSQL +
    • [OPENJPA-1376] - @SequenceGenerator allocationSize incorrect implementation
    • -
    • [OPENJPA-1616] - Fix TestTimeoutException test failures on MSSQL and MySQL +
    • [OPENJPA-1650] - Adding a slice dynamically should be done via persistence unit only
    • -
    • [OPENJPA-1619] - Fix TestTimestampVersion on various databases +
    • [OPENJPA-1651] - Unique colums automatically defined as non-nullable (part 2)
    • -
    • [OPENJPA-1620] - Fix TestJDBCEscapeDate test for MSSQL +
    • [OPENJPA-1657] - Postgres connection throws NPE with null properties
    • -
    • [OPENJPA-1621] - Fix TestGeneratedValues for DB2 +
    • [OPENJPA-1686] - Persistence of Dynamic and Generic Type
    • -
    • [OPENJPA-1623] - New tests for query qualified paths +
    • [OPENJPA-1725] - Schemaname wrongly included in DBDictionary.checkNameLength after Tablename correctly truncated
    • -
    • [OPENJPA-1624] - Fix intermittent datacache timeout failures in TestSJVMCache and CacheTest +
    • [OPENJPA-1746] - NullPointerException when a null value is set in the properties map passed to Entity.createEntityManagerFactory
    • -
    - - -
    -

    OpenJPA 2.0.0-beta3

    -

    Sub-task

    -
      -
    • [OPENJPA-1101] - OSGi Integration tests +
    • [OPENJPA-1768] - StackOverflowError when finding an Entity with an Eager ManyToMany relationship.
    • -
    • [OPENJPA-1505] - Add a boolean provision CallbackOptions.AllowsDuplicateListener +
    • [OPENJPA-1787] - Bean validation fails merging a new entity
    • -
    - -

    Bug

    -
      -
    • [OPENJPA-740] - In MySQL use LONGBLOB, MEDIUMBLOB etc.. when needed, cause BLOB only holds 64kb of data. +
    • [OPENJPA-1845] - the prepared query cache doesn't currently work correclty with 'SELECT IN' statements
    • -
    • [OPENJPA-774] - Executing native queries with Firebird +
    • [OPENJPA-1856] - Executing bulk updates should evict stale data from the DataCache
    • -
    • [OPENJPA-1097] - Detachment processing of our proxied mutable types (Date, Timestamp, etc) needs to be consistent +
    • [OPENJPA-1873] - EntityManager#merge sometimes passes wrong entity values to @PostLoad EntityListeners
    • -
    • [OPENJPA-1234] - Make AllowFailure configurable +
    • [OPENJPA-1876] - Slow JDBC tests
    • -
    • [OPENJPA-1248] - LOB streaming does not work as expected +
    • [OPENJPA-1896] - OpenJPA cannot store POJOs if a corresponding record already exists
    • -
    • [OPENJPA-1360] - ReverseMappingTool omits nullable, length, etc. when ClassMapping.setEmbedded(true) is called +
    • [OPENJPA-1898] - TestQueryMultiThreaded fails with OOME "unable to create new native thread"
    • -
    • [OPENJPA-1395] - MappingTool attempts to create table in Oracle even when the table already exist +
    • [OPENJPA-1900] - ClassCastException when serializing an entity if DetachedStateField=true
    • -
    • [OPENJPA-1406] - (In)Compatibility section in OpenJPA doc needs some work... +
    • [OPENJPA-1901] - QueryCacheStoreQuery$CachedObjectId that is not Serializable
    • -
    • [OPENJPA-1410] - Class linkage exception when creating an EMF with OpenJPA M3 +
    • [OPENJPA-1902] - SQLServer reserved words may not be used as identifiers
    • -
    • [OPENJPA-1438] - Fail to remove an entity which has derived identity +
    • [OPENJPA-1903] - Some queries only work the first time they are executed
    • -
    • [OPENJPA-1455] - SynchronizeMapping ALTER TABLE ADD COLUMN fails with column already exist exception +
    • [OPENJPA-1904] - OptimisticLockException during refresh(*,PESSIMISTIC_*) with eagar fetch on relationship fields
    • -
    • [OPENJPA-1458] - Named parameters are not handled by OpenJPA correctly +
    • [OPENJPA-1905] - jar-file validation should be deferred until after OpenJPA is confirmed to be the application's chosen provider
    • -
    • [OPENJPA-1477] - Multithreaded attempt to set Query parameter occassionally fails +
    • [OPENJPA-1906] - Issue info / warning message when connection retain mode is always
    • -
    • [OPENJPA-1482] - NoSuchMethodError when calling setVersion on an enhanced property access Entity +
    • [OPENJPA-1909] - enhance unit tests with the correct persistence.xml
    • -
    • [OPENJPA-1486] - Lazy fetched embeddable should not be materialized in the query result +
    • [OPENJPA-1910] - openjpa uses application ClassLoader for resolving BrokerFactory (revisited)
    • -
    • [OPENJPA-1491] - org.apache.openjpa.kernel.Bootstrap uses the application classloader to load OpenJPA internals +
    • [OPENJPA-1911] - InvalidStateException is thrown when merge an entity with derived identiy
    • -
    • [OPENJPA-1500] - DataCache types and excludedTypes are case sensitive +
    • [OPENJPA-1912] - enhancer generates invalid code if fetch-groups is activated
    • -
    • [OPENJPA-1503] - Metamodel class loading fails with security manager +
    • [OPENJPA-1915] - missing license header
    • -
    • [OPENJPA-1506] - ConfigurationImpl.equals fails using a OpenJPA derived provider +
    • [OPENJPA-1918] - MetaDataRepository.preload() ignores class loader returned by PersistenceUnitInfo.getClassLoader()
    • -
    • [OPENJPA-1524] - ManagedRuntime does not work for OSGi +
    • [OPENJPA-1923] - Allow flexible (non-standard) syntax for collection-valued parameters in IN() expresseion of JPQL query
    • -
    • [OPENJPA-1535] - Inconsistency in exceptions thrown from MetaDataRepository.resolve() +
    • [OPENJPA-1928] - Resolving factory method does not allow method overriding
    • -
    • [OPENJPA-1536] - SQL with outer join cannot handle null columns when inheritance is involved +
    • [OPENJPA-1932] - Documentation corrections
    • -
    • [OPENJPA-1538] - Move hard coded text in OpenJPAVersion.java to localizer.properties +
    • [OPENJPA-1935] - Informix lock exceptions are not mapped properly by OpenJPA
    • -
    • [OPENJPA-1542] - Support openjpa.DataCache Types and ExcludedTypes configuration +
    • [OPENJPA-1938] - Typo of time data type in SQLServerdictionary for MSSQL 2008
    • -
    • [OPENJPA-1543] - Need to change fragmented messages that are combined by PreparedQueryImpl and PreparedQueryCacheImpl to complete messages +
    • [OPENJPA-1939] - index identifier max length for DB2 v9 is 128.
    • -
    • [OPENJPA-1544] - Remove WebSphere version number from org/apache/ee/localizer.properties +
    • [OPENJPA-1940] - ReverseMapping tool does not find primary keys with Oracle
    • -
    • [OPENJPA-1546] - OpenJPA doesn't work as internal JPA inside web applicaion in JBoss AS +
    • [OPENJPA-1941] - Criteria query returns wrong result when query cache is enabled
    • -
    • [OPENJPA-1547] - NOT IN with MEMBER OF returns syntax error +
    • [OPENJPA-1943] - Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme
    • -
    • [OPENJPA-1550] - When batchLimit=-1 or >1 and an exception is caused, the params and failedObject are missing from the resultant exception. +
    • [OPENJPA-1944] - Extra select statements executed when version column is null.
    • -
    • [OPENJPA-1556] - Exception thrown on first use of @Strategy in @Embeddable classes +
    • [OPENJPA-1951] - missing key "cant-set-value" in localizer properties org.apache.openjpa.jdbc.meta.strats
    • -
    • [OPENJPA-1558] - Many side of a MxO relationship contains null reference if One side is loaded first. +
    • [OPENJPA-1953] - Copying data from inputStream to OuputStream needs appropriate buffer size
    • -
    • [OPENJPA-1562] - EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException +
    • [OPENJPA-1954] - ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass
    • -
    • [OPENJPA-1565] - QueryTimeOut and LockTimeOut exceptions are not raised correctly +
    • [OPENJPA-1957] - XML overriding column names for ArrayList attributes causes exception.
    • -
    • [OPENJPA-1568] - Make createConnectionFactory() in JDBCConfigurationImpl public +
    • [OPENJPA-1958] - IndexOutOfBoundsException in BatchingPreparedStatementManagerImpl
    • -
    • [OPENJPA-1570] - Exception using @Strategy in @MappedSuperclass or @Embeddable classes +
    • [OPENJPA-1959] - RuntimeExceptionTranslator should be transient in DelegatingQuery
    • -
    • [OPENJPA-1571] - The change in the element collection is not persisted to the database during merging a detached entity +
    • [OPENJPA-1960] - openjpa.InitializeEagerly breaks bean-validation integration
    • -
    • [OPENJPA-1573] - Incorrect SQL for HAVING = entity variable +
    • [OPENJPA-1965] - ClassCastException when using JAXB and MetaModel annotation processor
    • -
    • [OPENJPA-1575] - Query parameter on externalized field breaks Prepared Query Cache +
    • [OPENJPA-1968] - SQLServerDictionery not using DATETIME2 for jdbc driver other than MS JDBC driver
    • -
    • [OPENJPA-1576] - maven plugin broken as of 3/16/2010 2:30 AM PST using openjpa-2.0.0-SNAPSHOT +
    • [OPENJPA-1969] - SQLServer / DataDirect SQLCode=HYT00 not handled
    • -
    • [OPENJPA-1577] - Using @Strategy in Queries not working properly +
    • [OPENJPA-1974] - StackOverflowError when performing multiple subquery in collection field with eager fetch
    • -
    • [OPENJPA-1578] - CacheStoreMode.REFRESH is not recognized +
    • [OPENJPA-1975] - Only obtain default schema name when needed (DB2)
    • -
    • [OPENJPA-1580] - Using firstResult and maxResults in queries is not working properly +
    • [OPENJPA-1981] - Improper cleanup in SchemaGenerator
    • -
    • [OPENJPA-1581] - getCache() should throw IllegalStateException if the EMF has been closed. +
    • [OPENJPA-1983] - Merge of lazily fetched fields, and merge of managed entities deviates from spec
    • -
    • [OPENJPA-1583] - Update by query fails on entities using Timestamp as Version field +
    • [OPENJPA-1984] - Incorrect ViolationContraint getRootBean when removing bean with embedded entity validation
    • -
    • [OPENJPA-1588] - modify 925451 revision for setProperty processing for enums +
    • [OPENJPA-1985] - ClassCastException in max(Timestamp) function on PostgreSQL
    • -
    • [OPENJPA-1596] - Index name too long for DB2 zOS +
    • [OPENJPA-1986] - Extra queries being generated when cascading a persist
    • -
    - -

    Improvement

    -
      -
    • [OPENJPA-979] - Define process for contributions -
    • -
    • [OPENJPA-1118] - code changes towards broader use of JDK5 features +
    • [OPENJPA-1987] - Postgres / Ingres does not support null table for getImportedKeys
    • -
    • [OPENJPA-1443] - Turn on some additional DataCache and PCData testcases +
    • [OPENJPA-1989] - *ToOne relationships specified as LAZY in xml aren't honored
    • -
    • [OPENJPA-1492] - Change access on ReverseMappingTool#getAnnotationsForMeta(Object) from private to public +
    • [OPENJPA-1992] - java.lang.ArrayIndexOutOfBoundsException if positional parameter are not started from 1
    • -
    • [OPENJPA-1498] - Update localizer.properties files for easier translation +
    • [OPENJPA-1994] - Index is a reserved word for MySQL
    • -
    • [OPENJPA-1530] - MySQL storage engine support +
    • [OPENJPA-1996] - OpenJPA Samples fail on MacOS X
    • -
    • [OPENJPA-1531] - The DataCache EvictionSchedule property should accept other time formats. +
    • [OPENJPA-1998] - NPE getTableNameForMetadata when running SchemaTool reflect against Postgres DB
    • -
    • [OPENJPA-1539] - DataCacheManager should cache whether or not a given type is cacheable or not. +
    • [OPENJPA-2000] - Wrong PostgreSQL data type for REAL - "float8", must be "float4"
    • -
    • [OPENJPA-1548] - Miscellaneous ClassMetaData performance improvements +
    • [OPENJPA-2005] - PostgresDictionary.isOwnedSequence needs a null check
    • -
    • [OPENJPA-1549] - StateManagerImpl performance improvement +
    • [OPENJPA-2006] - Sequence generated ids may fail to get assigned when flushing a graph with bi-directional relationships
    • -
    • [OPENJPA-1551] - Allow connectionFactoryName to be specified when creating an EntityManager +
    • [OPENJPA-2007] - Setting query hint "openjpa.FetchPlan.Isolation" results in misleading warning
    • -
    • [OPENJPA-1552] - Enable EntityManager to perform property QueryImpl creation by its subclass +
    • [OPENJPA-2008] - OpenJPA does not work with native queries in a distributed (Slice) environment
    • -
    • [OPENJPA-1557] - Logging configuration is difficult for running tests +
    • [OPENJPA-2010] - Duplicate meta data warning logged due to parsing the same location twice
    • -
    • [OPENJPA-1561] - Cache Criteria Query +
    • [OPENJPA-2011] - Prevent reparsing annotation metadata for queries
    • -
    • [OPENJPA-1566] - Provide all the cached prepared query strings in QueryStatistics +
    • [OPENJPA-2013] - columnDefinition for TEXT types ends up in wrong sql statement
    • -
    • [OPENJPA-1585] - Additional trace to relate SQL pushdowns with entity action or JPQL query +
    • [OPENJPA-2025] - Byte[] and Char[] should be treated as SingularAttributes, not lists by the metamodel generator
    • -
    • [OPENJPA-1591] - Refactor various parts to allow for greater extensibility +
    • [OPENJPA-2027] - Metamodel genereated at runtime expects ListAttribute for all arrays - not just PersistentCollections.
    • -
    - -

    Test

    -
      -
    • [OPENJPA-1411] - Include DayTrader test case to OpenJpa +
    • [OPENJPA-2034] - Update H2 Database sql error codes as per the changes in v1.3.154
    • -
    • [OPENJPA-1560] - Additional tests for JDBC date/timestamp literals in JPQL +
    • [OPENJPA-2036] - DynamicEnhancer should look for tools.jar in java.home/lib for all JDKs, not just the IBM SDK.
    • -
    • [OPENJPA-1579] - Additional test for qualified path in HAVING clause +
    • [OPENJPA-2039] - FKs for EAGER fields that are not in the current fetchplan aren't selected
    • -
    • [OPENJPA-1586] - Additional test single valued path expression which references qualified path in JPQL -
    • -
    - - -
    -

    OpenJPA 2.0.0-beta2

    -

    Bug

    -
      -
    • [OPENJPA-1001] - java.lang.IndexOutOfBoundsException when executing attached test case +
    • [OPENJPA-2044] - Invalid header in MetaModel classes generated by AnnotationProcessor
    • -
    • [OPENJPA-1367] - H2 Database Engine does support cross join +
    • [OPENJPA-2045] - NAME is a valid column name for H2 databases.
    • -
    • [OPENJPA-1460] - Fix scope visibility of orm.xml when it is packaged in both ear file and war file +
    • [OPENJPA-2051] - Entities in a relationship are not properly cascaded after a EntityManager.flush is executed.
    • -
    • [OPENJPA-1483] - count (Distinct e) in JPQL gives wrong result when the id field is a compound primary key +
    • [OPENJPA-2056] - Postgres V9.1 issue with LIKE clause and Escape Strings
    • -
    • [OPENJPA-1485] - isLoaded util method does not behave per spec for collection attributes and basic type +
    • [OPENJPA-2059] - Missing localizer.properties for org.apache.openjpa.persistence.util.SourceCode
    • -
    • [OPENJPA-1494] - Criteria query IN predicate generates incorrect SQL +
    • [OPENJPA-2060] - AnnotationProcess failed to generate metadata for List<String>[] attribute in entity
    • -
    • [OPENJPA-1496] - Fail to set temporal parameter +
    • [OPENJPA-2065] - JPA 2.0 Spec. Violation? EntityManager#createNamedQuery(String, Class) bombs with non-entity Class parameter
    • -
    • [OPENJPA-1504] - Validation junits should not rely on Hibernate Impl +
    • [OPENJPA-2066] - Edge case in openJPA-1227. openJPA fails to create a join and thus returns wrong data when a collection is selected from superclass and another field is selected from subclass twoor more levels down the hierarchy.
    • -
    • [OPENJPA-1506] - ConfigurationImpl.equals fails using a OpenJPA derived provider +
    • [OPENJPA-2069] - Natvie sequence problems uncovered after OPENJPA-1376
    • -
    • [OPENJPA-1507] - NPE with a non-JDBC store manager +
    • [OPENJPA-2070] - Error processing while populating Metamodel classes needs improvement
    • -
    • [OPENJPA-1509] - Enum field types cannot be modified in an in-memory JPQL bulk update statement +
    • [OPENJPA-2071] - NPE during ResultPacker interface processing
    • -
    • [OPENJPA-1518] - Remove WARN messages for uncacheable finder select statements +
    • [OPENJPA-2073] - MappingTools requires live connection to DB2 server to retrieve default schema name
    • -
    • [OPENJPA-1533] - JPA2 select math mix with aggregate reports syntax error +
    • [OPENJPA-2076] - Minor fix-ups to messages
    • -
    - -

    Improvement

    -
      -
    • [OPENJPA-924] - Cache Finder Query for performance enhancement +
    • [OPENJPA-2077] - Pom references to org.codehaus.mojo openjpa-maven-plugin cause problems
    • -
    • [OPENJPA-1475] - Performance improvement - don't call syncVersion() when no version is specified +
    • [OPENJPA-2083] - Unmapped fields silently treated as transient
    • -
    • [OPENJPA-1493] - Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect +
    • [OPENJPA-2100] - openjpa-maven-plugin fails to create SQL for entities which contain enums
    • -
    • [OPENJPA-1502] - Improve msg for unrecognized EntityManager properties +
    • [OPENJPA-2101] - PersistenceProductDerivation overwrites the RemoteCommitProvider configuration
    • -
    • [OPENJPA-1512] - Include a BundleActivator to register ourselves as a javax.persistence.provider for Apache Aries +
    • [OPENJPA-2104] - BindParameter is not a valid query parameter as processed in DBDictionary's setUnknown()
    • -
    • [OPENJPA-1516] - Introduce new "clear" method on EntityManagerImpl +
    • [OPENJPA-2105] - Document changes no longer being uploaded
    • -
    • [OPENJPA-1517] - Reduce locking in LifecycleEventManager +
    • [OPENJPA-2107] - ManagedCache conflict due adding an entity 2 times in the same query.
    • -
    • [OPENJPA-1520] - Move trunk (2.0.x) to require Java 6 to build (but target 1.5 runtime) +
    • [OPENJPA-2117] - XML overriding column names for 1xM attributes causes exception.
    • -
    • [OPENJPA-1525] - TestCacheMarshallerEndToEnd.Log requires to implement warn() method +
    • [OPENJPA-2119] - Update org.apache.openjpa.persistence.util.SourceCode
    • -
    • [OPENJPA-1528] - Upgrade to latest MySQL 5.1.12 for junit tests +
    • [OPENJPA-2122] - VerifyError with Java 7 when using javaagent or dynamic container enhancement
    - -

    Test

    + +

    Improvement +

      -
    • [OPENJPA-1408] - Create test case binary and source jars in module -
    • -
    • [OPENJPA-1529] - Create new tests for bean caching mode -
    • -
    - - -
    -

    OpenJPA 2.0.0 Beta

    -

    Sub-task

    -
      -
    • [OPENJPA-1103] - Remove early-access disclaimer from the NOTICE files once the spec is released -
    • -
    • [OPENJPA-1115] - Finish support for delimited identifiers -
    • -
    • [OPENJPA-1173] - Update PostgreSQL support for 8.4.x -
    • -
    • [OPENJPA-1306] - Extended lock scope support -
    • -
    • [OPENJPA-1345] - Update to JPA Spec Version EA9 (dated 10-08-2009) -
    • -
    • [OPENJPA-1347] - Upgrade to Validation API 1.0.0.GA -
    • -
    • [OPENJPA-1353] - Add legal info to the docs -
    • -
    • [OPENJPA-1358] - Support CacheRetrieve/StoreMode properties for find()/refresh() operation -
    • -
    • [OPENJPA-1404] - Add find method that accepts properties to entity manager -
    • -
    • [OPENJPA-1405] - Add refresh method that accepts properties to entity manager -
    • -
    • [OPENJPA-1453] - Add support for testing with final JPA 2.0 TCK -
    • -
    • [OPENJPA-1476] - Turn off QueryCache by default -
    • -
    - -

    Bug

    -
      -
    • [OPENJPA-123] - Test framework should allow tests that are expected to fail to be checked in -
    • -
    • [OPENJPA-459] - Problem with bulk updates in mySQL -
    • -
    • [OPENJPA-714] - "Encountered unmanaged object in persistent field" error while merging object tree -
    • -
    • [OPENJPA-748] - Disable QuerySQLCache by default -
    • -
    • [OPENJPA-859] - OpenJPA requires all persistent fields to be specified on an XML defined entity -
    • -
    • [OPENJPA-944] - FetchAttribute.recursionDepth = -1 does not load properly self referenced entities in a complex relation -
    • -
    • [OPENJPA-993] - PCEnhancer can't execute if a non-OpenJPA PU is found -
    • -
    • [OPENJPA-1020] - eager fetching of PersistentCollection of a primitive type fails -
    • -
    • [OPENJPA-1025] - AbstractResultList.subList throws UnsupportedOperationException -
    • -
    • [OPENJPA-1046] - Unique Constraint on MappedSupperClass causes NullPointerException -
    • -
    • [OPENJPA-1141] - NPE at org.apache.openjpa.jdbc.meta.MappingInfo.mergeJoinColumn(MappingInfo.java:1400) +
    • [OPENJPA-302] - PCEnhancer needs target classes on classpath
    • -
    • [OPENJPA-1142] - OptimisticLockException thrown on Query.getResultList() when Pessimistic Lock is applied +
    • [OPENJPA-487] - Generated SUBSTRING SQL is ugly and inefficient
    • -
    • [OPENJPA-1185] - Subquery overhaul +
    • [OPENJPA-1555] - SQLBuffer code cleanup
    • -
    • [OPENJPA-1189] - Column names do not contain delimiters when obtained from DatabaseMetaData +
    • [OPENJPA-1777] - Allow setting of diagonstic context for each slice in a more flexible manner
    • -
    • [OPENJPA-1197] - NativeQueries fail with MySQL +
    • [OPENJPA-1778] - Improved error information for unenhanced classes.
    • -
    • [OPENJPA-1224] - OpenJPA MySQL BigDecimal ignoring Precision/Scale column Annotation when generating tables +
    • [OPENJPA-1798] - Improve messages in localize.properties
    • -
    • [OPENJPA-1263] - TestReaderLob.testUpdateWithNull() fails on MySQL +
    • [OPENJPA-1803] - Unwrap EntityManager to Connection
    • -
    • [OPENJPA-1289] - Oracle driver throws exception due to incorrect mapping of XMLType column +
    • [OPENJPA-1847] - Use a single connection when generating schema
    • -
    • [OPENJPA-1293] - JUnit test failure when using Derby 10.5.3.0 +
    • [OPENJPA-1863] - update HSQL dictionary for HSQLDB 2.0
    • -
    • [OPENJPA-1294] - Nested JDBC calls fail for certain database +
    • [OPENJPA-1917] - Cache column alias in SelectImpl
    • -
    • [OPENJPA-1308] - shouldn't always use CAST with UPPER and LOWER for DB2 +
    • [OPENJPA-1937] - Document OpenJPAEntityManager.evict methods
    • -
    • [OPENJPA-1321] - Documentation inaccuracies +
    • [OPENJPA-1945] - Improve aspects of the OpenBooks sample
    • -
    • [OPENJPA-1326] - ReverseMappingTool and SchemaTool failing for Sybase +
    • [OPENJPA-1972] - DB2 V9.7 changed the default behavior concerning blocking behavior with isolation levels greater then read uncommitted
    • -
    • [OPENJPA-1328] - Move cacheable class configuration to ClassMetaData +
    • [OPENJPA-1990] - Skip getting extend exception text when running on DB2
    • -
    • [OPENJPA-1341] - PostRemove not invoked after database record was deleted +
    • [OPENJPA-1999] - Optional support for non-sequential positional parameters
    • -
    • [OPENJPA-1344] - Query [get|set]LockMode & Em getLockMode not throwing correct exceptions +
    • [OPENJPA-2014] - Allow proxies to stay in place when Detaching
    • -
    • [OPENJPA-1349] - Compatibility options are not set appropriately for spec level when emf is created by JEE container +
    • [OPENJPA-2020] - Make some members of StateManagerImpl protected to allow for greater extensability
    • -
    • [OPENJPA-1350] - Race condition in the MetaDataRepository +
    • [OPENJPA-2031] - Unable to import maven projects with m2e version 1.0
    • -
    • [OPENJPA-1351] - java.lang.ClassCastException: javax.naming.Reference incompatible with javax.sql.DataSource +
    • [OPENJPA-2042] - Diagnostics for Application Managed EntityManagerFactory leaks.
    • -
    • [OPENJPA-1352] - Merge fails if an entity has an element collection which is contructed using Arrays.asList +
    • [OPENJPA-2043] - OpenJPAId hashCode() value needs to be consistent after serialization process
    • -
    • [OPENJPA-1354] - Configuring DBCP connection pool with connection properties breaks when user/pasword is specifed and javax.* configuration is set to DBCP Driver +
    • [OPENJPA-2047] - Document the impact of Persistence Aware classes
    • -
    • [OPENJPA-1355] - Recent snaphot versions of openjpa have problem with postgresPreparedStatementImpl constructor making Postgres impossible to use +
    • [OPENJPA-2068] - Improve performance of java.util.Calendar fields
    • -
    • [OPENJPA-1370] - JPA2 missing implementation for createNamedQuery(String name, Class<T> resultClass) +
    • [OPENJPA-2075] - Abstract out parameter handling / validation from org.apache.openjpa.persistence.QueryImpl to allow for greater extensibility
    • -
    • [OPENJPA-1375] - OutOfMemory runs in container environment in a long stress run +
    • [OPENJPA-2084] - Upgrade Derby dependency to 10.8.x
    • -
    • [OPENJPA-1377] - JPA property to enum conversion failure +
    • [OPENJPA-2085] - Improve enhancement process to support JAVA 7 compliant class file generation
    • -
    • [OPENJPA-1379] - Locking problem when using timestamp QueryCache eviction policy. +
    • [OPENJPA-2087] - Remove or limit the use of the ConcreteClassGenerator
    • -
    • [OPENJPA-1380] - Query not getting evicted from QueryCache -
    • -
    • [OPENJPA-1381] - IllegalStateException on query method call after named query is created twice. -
    • -
    • [OPENJPA-1383] - tests rely on US date formatting without setting the correct Locale -
    • -
    • [OPENJPA-1384] - ClassNotFoundException for custom DBDictionary used by EJB -
    • -
    • [OPENJPA-1385] - Parameter in having clause of Criteria query not recognized -
    • -
    • [OPENJPA-1386] - Metamodel Generator does not handle field types that can hide another -
    • -
    • [OPENJPA-1387] - Unique colums automatically defined as non-nullable -
    • -
    • [OPENJPA-1388] - JPQL named parameter using a reserved word resulting in ArgumentException -
    • -
    • [OPENJPA-1390] - Criteria API untyped join(String attr) implies any attribute not a singular attribute -
    • -
    • [OPENJPA-1391] - Handle generic/unspecified type arguments for persistent fields during metamodel generation -
    • -
    • [OPENJPA-1392] - CriteriaBuilder.size() must return Integer as value -
    • -
    • [OPENJPA-1393] - CriteriaBuilder.countDistinct() does not return correct result -
    • -
    • [OPENJPA-1394] - Pessimistic Lock not honour when ORDER BY clause is used -
    • -
    • [OPENJPA-1396] - metadata-complete in the orm file does not override @Transition annotation -
    • -
    • [OPENJPA-1397] - NULL in columns part of an @IdClass composite key leads to "disappearing" (null) returned objects -
    • -
    • [OPENJPA-1400] - Unable to persist a relationship to a detached Entity -
    • -
    • [OPENJPA-1401] - Inheritance using Join Strategy may fail in cross join JPQL -
    • -
    • [OPENJPA-1409] - Improve type preservation for currentDate/Time expression in queries -
    • -
    • [OPENJPA-1413] - NPE when update using CASE statement on Derby -
    • -
    • [OPENJPA-1419] - Access path metadata set incorrectly for fetch joins in Criteria Query -
    • -
    • [OPENJPA-1425] - Literal value in projection can not be parameterized for all databases -
    • -
    • [OPENJPA-1431] - @Temporal annotation overrides the @Column annotation when using in conjunction with @ElementCollection -
    • -
    • [OPENJPA-1432] - openjpa.Compatibility property for JPA 2.0 behavior may be overwritten if this property is an argument to createEntityManagerFactory -
    • -
    • [OPENJPA-1435] - Multi-1xm relation of same type in entity yields extra null in result collection -
    • -
    • [OPENJPA-1439] - Metamodel instantiation fails on InputStream properties -
    • -
    • [OPENJPA-1441] - NPE when enhancing a Serializable, versioned class -
    • -
    • [OPENJPA-1442] - java.sql.Date, java.math.BigDecimal, or java.math.BigInteger types as derived primary keys are not Enhanced correctly -
    • -
    • [OPENJPA-1444] - Criteria Query with fetch joins does not return correct DISTINCT result -
    • -
    • [OPENJPA-1445] - Support Enum as external value -
    • -
    • [OPENJPA-1452] - OpenJPA 2.0.0-M3 attempts to mutate unmodifiable map in Glassfish -
    • -
    • [OPENJPA-1461] - Incorrect Oracle CREATE TABLE DDL for XML column -
    • -
    • [OPENJPA-1463] - JPQL new operator arguments should be more flexible in matching constructor arguments -
    • -
    • [OPENJPA-1464] - PreparedQuery fails with enum query parameter -
    • -
    • [OPENJPA-1467] - java.lang.IllegalMonitorStateException in ConcurrentDataCache.writeUnlock() -
    • -
    • [OPENJPA-1478] - OpenJPA is no longer available as an OSGi bundle -
    • -
    • [OPENJPA-1487] - incomplete tutorial [CONF] OpenJPA > Begin using OpenJPA - The Basics -
    • -
    • [OPENJPA-1515] - CacheStatistics should be disabled by default -
    • -
    • [OPENJPA-1527] - AssociationOverride does not work when applying to the map key of the element collection via orm.xml +
    • [OPENJPA-2120] - Add new option to eliminate reflection calls from enhancer generated IdClass PC copy operations
    - -

    Improvement

    + +

    New Feature +

      -
    • [OPENJPA-5] - OpenJPA doesn't compile with JDBC 4 -
    • -
    • [OPENJPA-250] - Reduce synchronization bottlenecks in data cache, metadata repository, and lifecycle event manager -
    • -
    • [OPENJPA-709] - Better naming for unique constraints -
    • -
    • [OPENJPA-716] - Improve the documentation about Streaming LOB Support -
    • -
    • [OPENJPA-839] - change pom.xml to publish sources as well. -
    • -
    • [OPENJPA-1085] - Add toString() method to PCState classes -
    • -
    • [OPENJPA-1172] - Use java.util.concurrent.ConcurrentHashMap rather than a synchronized HashMap in ClassMapping. -
    • -
    • [OPENJPA-1236] - Finish support of delimiters other than double-quotes -
    • -
    • [OPENJPA-1258] - make warning message more friendly when other persistence provider configured by application -
    • -
    • [OPENJPA-1356] - Use maven-enforcer-plugin to verify proper Java and Maven levels -
    • -
    • [OPENJPA-1363] - Upgrade to latest commons-pool maintenance release +
    • [OPENJPA-184] - use DB2 Diagnostic interface to report extended error diagnostics on SQL Exception
    • -
    • [OPENJPA-1366] - Remove need for an EMF from OpenJPAPersistenceUtil and TraversableResolverImpl +
    • [OPENJPA-1859] - Create a sample to demonstrate usage of JEST
    • -
    • [OPENJPA-1368] - Upgrade to HSQLDB 1.8.0.10 and in-memory db for unit tests +
    • [OPENJPA-1934] - contribute an openjpa-maven-plugin
    • -
    • [OPENJPA-1374] - Enable junits to be executed against an in-memory Derby 10.5.3.0 db +
    • [OPENJPA-2108] - Allow an option to terminate MappingTool-generated SQL with a character other than semicolon
    • -
    • [OPENJPA-1402] - Improve (avoid) lock on relation field per 2.0 spec semantics -
    • -
    • [OPENJPA-1414] - Performance improvements for detach -
    • -
    • [OPENJPA-1415] - Performance improvement by reduced logging of batched OLE -
    • -
    • [OPENJPA-1440] - Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option -
    • -
    • [OPENJPA-1456] - Replace StringBuffer usage with StringBuilder -
    • -
    • [OPENJPA-1468] - Upgrade build to use final Bean Validation spec API from Geronimo -
    • -
    • [OPENJPA-1470] - PCEnhancer is overly verbose -
    • -
    • [OPENJPA-1489] - Generated UNIQUE constraint names and HSQL +
    • [OPENJPA-2111] - Optimize column based ResultSet lookup whereever feasible
    - -

    New Feature

    + +

    Task +

      -
    • [OPENJPA-773] - Upgrade to JPA 2 -
    • -
    • [OPENJPA-1005] - Add PersistenceXMLSchemaVersion(); support -
    • -
    • [OPENJPA-1181] - Metamodel Generation must be more selective and controllable -
    • -
    • [OPENJPA-1276] - Support CQL for Criteria Query -
    • -
    • [OPENJPA-1332] - Allow configuration property to be declared for internal usage only -
    • -
    • [OPENJPA-1334] - Support instance level distribution policy for named cache partitions -
    • -
    • [OPENJPA-1337] - OpenJPA 2.0 iteration 12 primary task -
    • -
    • [OPENJPA-1357] - Support CacheRetrieve/StoreMode properties for find()/refresh() operation -
    • -
    • [OPENJPA-1373] - OpenJPA 2.0 iteration 13 primary task +
    • [OPENJPA-1786] - Upgrade to latest JPA 2.0 TCK
    • -
    • [OPENJPA-1426] - OpenJPA 2.0 iteration 14 primary task +
    • [OPENJPA-1834] - Upgrade trunk to use Deby 10.6.2.1 for junits
    • -
    - -

    Task

    - - -

    Test

    + +

    Test +

      -
    • [OPENJPA-1153] - Test suite speed-up outside SingleEMFTestCase -
    • -
    • [OPENJPA-1342] - Build a mechanics to test JTA transaction semantics within JSE +
    • [OPENJPA-2029] - Add PreparedQuery tests for non-sequential positional parameters support
    • -
    • [OPENJPA-1466] - Some JUnit test failures on Oracle backeend -
    • -
    - - -
    -

    OpenJPA 2.0.0 Milestone 3

    -

    Sub-task

    -
      -
    • [OPENJPA-849] - Add metadata-type getter methods to EntityManager
    • -
    • [OPENJPA-946] - Oracle create table(s) exceptions
    • -
    • [OPENJPA-1013] - Build strictly-typed Criteria API
    • -
    • [OPENJPA-1033] - Update supported database and driver matrix
    • -
    • [OPENJPA-1076] - PersistenceProviderResolver interface and PersistenceProviderResolverHolder class
    • -
    • [OPENJPA-1078] - Cache mode elements added to persistence.xml
    • -
    • [OPENJPA-1082] - Validation target groups via persistence.xml or createEMF properties Map
    • -
    • [OPENJPA-1083] - org.apache.openjpa.persistence.kernel.TestEJBState fails with two exceptions ORA-00904 and ORA-02275 against oracleDB.
    • -
    • [OPENJPA-1105] - OpenJPA 2.0 iteration 8 primary task
    • -
    • [OPENJPA-1106] - Integration tests for Bean Validation providers - Part 1
    • -
    • [OPENJPA-1107] - Provide TraversableResolver for use with Bean Validation Factory
    • -
    • [OPENJPA-1111] - Validation mode of callback should cause a PersistenceException when no provider is available
    • -
    • [OPENJPA-1112] - JPA2 Query result of embeddable object can not be further updated
    • -
    • [OPENJPA-1130] - Use maven-jar-plugin to create a o-p-j-tests.jar to share base TestCase classes across modules
    • -
    • [OPENJPA-1131] - Upgrade to maven-jar-plugin-2.2
    • -
    • [OPENJPA-1149] - Add embeddables sample to the examples module
    • -
    • [OPENJPA-1155] - BrokerImpl.detachAllInternal() does not detach newly loaded entities
    • -
    • [OPENJPA-1157] - Integration tests for Bean Validation providers - Part 2
    • -
    • [OPENJPA-1164] - Make sleepTime in SimpleWBCallback configurable
    • -
    • [OPENJPA-1167] - Use Geronimo EA4 JPA spec jar
    • -
    • [OPENJPA-1175] - Implement PersistenceUtil and isLoaded methods on the provider
    • -
    • [OPENJPA-1176] - Properties marked as private are no longer persistent
    • -
    • [OPENJPA-1177] - Upgrade to Bean Validation JSR-303 1.0 CR3 Spec API
    • -
    • [OPENJPA-1182] - PreUpdate and PostUpdate behavior
    • -
    • [OPENJPA-1190] - Use Geronimo EA5 JPA spec jar
    • -
    • [OPENJPA-1191] - Implement Tuple interface
    • -
    • [OPENJPA-1194] - LockManager tests call platformSpeedTest() for every test method
    • -
    • [OPENJPA-1202] - Compile against Geronimo JPA EA6
    • -
    • [OPENJPA-1208] - Set specification level based upon persistence.xml version
    • -
    • [OPENJPA-1210] - Specify derby timeouts via properties.
    • -
    • [OPENJPA-1213] - query.setParameter() behaviour
    • -
    • [OPENJPA-1214] - RelationFieldStrategy behaviour
    • -
    • [OPENJPA-1215] - detach()/detachCopy() behaviour
    • -
    • [OPENJPA-1220] - Disable DynhamicEnhancerAgent for maven builds
    • -
    • [OPENJPA-1223] - Update documentation for autoOff config option
    • -
    • [OPENJPA-1228] - Change in default value of exclude-unlisted-classes in JPA 2.0
    • -
    • [OPENJPA-1231] - Bean Validation sample
    • -
    • [OPENJPA-1232] - Keys in an EmbeddedCollection are returned as PCData objects when DataCache is enabled
    • -
    • [OPENJPA-1233] - Update DerbyDictionary with new reserved words
    • -
    • [OPENJPA-1235] - Support for optional name property on UniqueConstraint annotation and XML
    • -
    • [OPENJPA-1237] - WriteBehind configuration exception not thrown when it should be
    • -
    • [OPENJPA-1238] - Upgrade to latest commons-pool and commons-dbcp
    • -
    • [OPENJPA-1240] - Lob, Temporal, Enumerated on element collections annotations and in XML
    • -
    • [OPENJPA-1246] - Add configuration example for Ingres to User manual
    • -
    • [OPENJPA-1247] - WriteBehindCallback sleepTime interval of one EMF datacache adversely impacting other EMF datacache
    • -
    • [OPENJPA-1252] - Include a Derby Network Server test profile
    • -
    • [OPENJPA-1261] - JPQL query result shape for multi-selections including multi-select-new-constructor
    • -
    • [OPENJPA-1264] - Support shared-cache-mode element
    • -
    • [OPENJPA-1266] - JDBC date/timestamp literals in JPQL
    • -
    • [OPENJPA-1270] - Assert that relationships defined in a mapped superclass must be unidirectional
    • -
    • [OPENJPA-1271] - Support CacheStoreMode and CacheRetrieveMode properties for EntityManager
    • -
    • [OPENJPA-1272] - Add tests for element collection association overrides defined in XML
    • -
    • [OPENJPA-1274] - Support cascade-detach via orm.xml
    • -
    • [OPENJPA-1282] - Update validation spec api and provider dependencies to spec level CR5
    • -
    • [OPENJPA-1292] - NullPointerException when handling WriteBehindConfigurationException
    • -
    • [OPENJPA-1298] - WriteBehindCache Callback Singleton
    • -
    • [OPENJPA-1301] - EntityManagerFactoryImpl
    • -
    • [OPENJPA-1309] - DB2 requires CAST for argument passed to datastore MOD function
    • -
    • [OPENJPA-1310] - SQLServer requires XML in UTF-16 instead of UTF-8
    • -
    • [OPENJPA-1315] - org.apache.openjpa.persistence.QueryImpl
    • -
    • [OPENJPA-1319] - EntityManagerImpl
    • -
    • [OPENJPA-1323] - Relax em.refresh TransactionRequireException thown condition
    • -
    • [OPENJPA-1327] - Document JPQL Query updates
    • -
    - -

    Bug

    -
      -
    • [OPENJPA-386] - org.apache.openjpa.meta.ClassMetaData.validateAppIdClass() does not take @MappedSuperclass into account
    • -
    • [OPENJPA-466] - Primary key constraint violated using (Oracle) sequence to generate ID in multithreaded app
    • -
    • [OPENJPA-525] - Inserts new entity with NULL value for Clob column actually inserts empty string
    • -
    • [OPENJPA-890] - Typos and inconsistent method signature styles in the user manual
    • -
    • [OPENJPA-922] - setByteArrayInputStream being used in stead of setBytes
    • -
    • [OPENJPA-932] - Runtime enhancer doesn't work propery if there is a trailing persistence.xml file on the classpath.
    • -
    • [OPENJPA-934] - Oversight in TestSequenceGenerator
    • -
    • [OPENJPA-973] - Allow DB2 JCC driver to work with Informix database
    • -
    • [OPENJPA-974] - Docs: Add new Exception types
    • -
    • [OPENJPA-981] - @Replicated is only recognized for root instance but not the instanes reachable from the root during persist() operation.
    • -
    • [OPENJPA-1002] - Select range doesn't work on Oracle JDBC driver
    • -
    • [OPENJPA-1043] - JPQL queries do not support queries on a MappedSuperclass
    • -
    • [OPENJPA-1049] - Query against a MappedSuperclass is not supported
    • -
    • [OPENJPA-1061] - Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter
    • -
    • [OPENJPA-1065] - Prepared Query Cache does not work with DataCache
    • -
    • [OPENJPA-1074] - OrderColumn does not maintain index upon inter-list element removal - Phase 1
    • -
    • [OPENJPA-1100] - @Version-Annotation on Column with unsupported type (e.g. BigDecimal) is silently ignored, but should raise an error
    • -
    • [OPENJPA-1116] - Annotation Strategy not working
    • -
    • [OPENJPA-1117] - Missing AgentClass attribute in openjpa-all-xxx.jar manifest.mf
    • -
    • [OPENJPA-1119] - NPE in InstrumentationFactory
    • -
    • [OPENJPA-1120] - idEquals() broken in BigDecimalId and BigIntegerId
    • -
    • [OPENJPA-1121] - Enums cause a ClassNotFoundException in the MappingTool
    • -
    • [OPENJPA-1125] - A message is logged about dynamically loading the class enhancer even though I'm using the -javaagent
    • -
    • [OPENJPA-1127] - Typos in user manual and log messages
    • -
    • [OPENJPA-1132] - Dropping constraints fails on MySQL
    • -
    • [OPENJPA-1133] - DBDictionary.getPlaceholderValueString returns 0 for boolean which fails in PostgreSQL database.
    • -
    • [OPENJPA-1135] - Overrides are not applied when embeddables are defined in XML
    • -
    • [OPENJPA-1139] - checkstyle results in velocity errors in build output
    • -
    • [OPENJPA-1156] - Path length issues on Windows
    • -
    • [OPENJPA-1158] - Incorrect handling of long values in AbstractResult
    • -
    • [OPENJPA-1159] - Bad error message for find of an Entity with compound primary key if parameter of wrong class
    • -
    • [OPENJPA-1163] - Data consistency issues while modifying collections.
    • -
    • [OPENJPA-1168] - NPE in UUIDGenerator.initializeForType1()
    • -
    • [OPENJPA-1170] - Upgrade to Bean Validation JSR-303 1.0 CR2 Spec API
    • -
    • [OPENJPA-1174] - OpenJPA performs differently with orm.xml and annotations
    • -
    • [OPENJPA-1184] - Inverse relations not set for MapKey field when using parallel eager select
    • -
    • [OPENJPA-1200] - Incorrect Entity is returned if ElementClassCriteria is not selected.
    • -
    • [OPENJPA-1201] - "Mapped by" field not set when contained in superclass
    • -
    • [OPENJPA-1203] - JPA2 - createEMF should return null for unhandled PUs
    • -
    • [OPENJPA-1204] - Argument type mismatch when an EmbeddedId contains an Emun type
    • -
    • [OPENJPA-1205] - Cannot retrieve Map fields when DataCache is on
    • -
    • [OPENJPA-1206] - Bean validation call to provider not Java 2 Enabled
    • -
    • [OPENJPA-1211] - Enable string navigation in a From expression.
    • [... 394 lines stripped ...] From commits-return-9373-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 9 21:52:50 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6E040961B for ; Thu, 9 Feb 2012 21:52:50 +0000 (UTC) Received: (qmail 31193 invoked by uid 500); 9 Feb 2012 21:52:50 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 31128 invoked by uid 500); 9 Feb 2012 21:52:50 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 31121 invoked by uid 99); 9 Feb 2012 21:52:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 21:52:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 21:52:48 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E8FF02388865 for ; Thu, 9 Feb 2012 21:52:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1242547 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/XMLValueHandler.java Date: Thu, 09 Feb 2012 21:52:28 -0000 To: commits@openjpa.apache.org From: jrbauer@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120209215228.E8FF02388865@eris.apache.org> Author: jrbauer Date: Thu Feb 9 21:52:28 2012 New Revision: 1242547 URL: http://svn.apache.org/viewvc?rev=1242547&view=rev Log: OPENJPA-2124 Committing patch contributed by Helen Xu. Test covered by existing jUnit. Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/XMLValueHandler.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/XMLValueHandler.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/XMLValueHandler.java?rev=1242547&r1=1242546&r2=1242547&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/XMLValueHandler.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/XMLValueHandler.java Thu Feb 9 21:52:28 2012 @@ -98,7 +98,12 @@ public class XMLValueHandler if (val == null) return null; try { - String packageName = vm.getDeclaredType().getPackage().getName(); + String className = vm.getDeclaredType().getName(); + int i = className.lastIndexOf('.'); + String packageName = className; + if (i != -1) { + packageName = className.substring(0, i); + } JAXBContext jc = JAXBContext.newInstance(packageName); Unmarshaller u = jc.createUnmarshaller(); return u.unmarshal(new StreamSource(new StringReader From commits-return-9374-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sun Feb 12 00:08:41 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 576A39974 for ; Sun, 12 Feb 2012 00:08:41 +0000 (UTC) Received: (qmail 44913 invoked by uid 500); 12 Feb 2012 00:08:41 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 44854 invoked by uid 500); 12 Feb 2012 00:08:40 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 44843 invoked by uid 99); 12 Feb 2012 00:08:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2012 00:08:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2012 00:08:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F1BB923888E7 for ; Sun, 12 Feb 2012 00:08:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1243181 - /openjpa/KEYS Date: Sun, 12 Feb 2012 00:08:18 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120212000818.F1BB923888E7@eris.apache.org> Author: allee8285 Date: Sun Feb 12 00:08:18 2012 New Revision: 1243181 URL: http://svn.apache.org/viewvc?rev=1243181&view=rev Log: Update gpg public key for Albert Lee. Modified: openjpa/KEYS Modified: openjpa/KEYS URL: http://svn.apache.org/viewvc/openjpa/KEYS?rev=1243181&r1=1243180&r2=1243181&view=diff ============================================================================== --- openjpa/KEYS (original) +++ openjpa/KEYS Sun Feb 12 00:08:18 2012 @@ -2,7 +2,7 @@ This file contains the PGP keys of vario Users: pgp < KEYS gpg --import KEYS -Developers: +Developers: pgp -kxa and append it to this file. (pgpk -ll && pgpk -xa ) >> this file. (gpg --list-sigs @@ -459,3 +459,94 @@ o1TrlQEAozT69mAK9g+5Rg27Uy153AFYvvAF/AVN =LGiD -----END PGP PUBLIC KEY BLOCK----- +pub 1024D/8007117F 2007-11-05 +uid Albert Lee (CODE SIGNING KEY) +sig 3 8007117F 2012-02-11 Albert Lee (CODE SIGNING KEY) +sub 2048g/8D910F8A 2007-11-05 +sig 8007117F 2007-11-05 Albert Lee (CODE SIGNING KEY) + +pub 4096R/59780080 2012-02-11 +uid Albert Lee (CODE SIGNING KEY) +sig 3 59780080 2012-02-11 Albert Lee (CODE SIGNING KEY) +sig 8007117F 2012-02-11 Albert Lee (CODE SIGNING KEY) +sub 4096R/57EE3791 2012-02-11 +sig 59780080 2012-02-11 Albert Lee (CODE SIGNING KEY) + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.17 (MingW32) + +mQGiBEcvUloRBADjBd7xVUNVho5vDtchE7mx1dmVqao9MAE5tty4yifnuV1ORMvN +GakfqFmmmvK1bllGNVUVh3oJje9tlUpI3UP7CNLDqV2nO0jFW84XWiaMmjVeV4wm +Nv8Qk5qyEkBIiea9aAOSyRRK/hkB3nNNl5E1k2OuA2zSAdCqkAQn6wjMwwCghnso +PJuLKZ9/eW9FD50GraluLTEEAJ80uTJpL1iPy6JGjmRVJ3iwVdSVpK1YZTu3tnTE ++UUfzom4LXeNSXTzGhv1bYmsLgLm1dVZoQow6qY6zJgeLv4CckRrez+V6QbJi1zW +b/OV5M9Ot/KPyGSExbbpmy+a8+8KHcA9EGLUOrY88HeUzmj1ofYtp83g0TQn462A +sEbzA/45Zn5rMy8sEDDMr7ga4WrDETGnJHz04U9lE07IE/5xdZ32gMjqbWEnDHFM +W4dl90RoKrk349VtdA0Aq2HePASI5or2JeP6Yicg6/yRM7Q14J/x471u3+hFksuK +E5bHsm6P4zyKrpCBumTA/w+om62msoeybLuzcwxJlsdmyqElnbQ0QWxiZXJ0IExl +ZSAoQ09ERSBTSUdOSU5HIEtFWSkgPGFsbGVlODI4NUBhcGFjaGUub3JnPohhBBMR +AgAhAhsDAh4BAheABQJPNvGlBQsJCAcDBRUKCQgLBRYCAwEAAAoJEAqBB6mABxF/ +IEIAn1W691q3oZAK5wjiDk2oI6/SfG8CAJ9zpbOJmMZvvvhLYJy1K/lcJ5Gy87kC +DQRHL1JaEAgA+GEs3O66dYtz4aMd31fa0+TU2xrXG1VTwd+iZKas+y13EWxZy3HN +cz1ajuINjK/Q2lUo0yS5tyPURTN7hrOIbrb25uV0cMOlPPVbNw8OqZc0Nr00kS5B +U9VEHaPK/I21llm4O4M4Fi8bynghKCVFVu/zIg6hjPeF8ggdxt+bwrbOIuGOx2nh +jNMAdJSU8YnS4hH16OROUSSJzR7ge+xbMU83cud7A1gKD80SDCxiHLxdsqmKa9Jr +v/8tDIq4ugBnJBFrxbkLgmy1lHbeOQEQVY1Ga+gOC/kz22Z5APXp7wWRSKdDvLei +whpK85nc71DcPLCgzvgimqJnbJFxR8y/ewADBQgAwNVK6FndoadvKN9GvmFLj2ST +eNqvvQtYSMH5l7rbh8yONVChK604HeuydNnxSzet28cJHKLvf8Tvl8TFqSiY2Vvn +B9aXwva9pgpZXjRNzvuat1RqC805pbLVbf97n68b+cK2bW0oFFUONNQZX1kMtzHJ +kHQmP//eQCxtnsZhbjE7NwILKvAoAjXglMwmsG2GViE61ra2h27kXW6C5JWxVjTV +wgJ9uXHt3yuw108nWYVDt5gyvaE9IW1EtfarOpxb9G8LR9HpXm1yW21lJ7lLTcjY +rUgQf+X0XwFiEng3UZN9p/UJJAE6pxAbUuXR9B4KBDAguz+WkjN5D2aBY+V/rIhJ +BBgRAgAJBQJHL1JaAhsMAAoJEAqBB6mABxF/ct8AnRze2X5uhtnUwMKYr1dXqTlm +leQkAJ9WAdKRZrcRoUfGmeQYtypMWvZu+ZkCDQRPNvImARAAxbXcIBcvUOw2eBPZ +GsyotPT6n9lFwP8Colr5OLDAErymnIx8IpLDajQxwgO65t1KpKH2n/ePAlateDxO +75fhbkgxtilLjO+TI5dbd7YAsE13B7iy5C+rEgTWJSYKrFqGYIrJoJnDf0SwhGlP +RxOHwlxtZDr2Kq6QWStI/58nzAO15xikFBUNwCxzy5BmfVyoeIh7d8ZuGTww+7Wu +/vvKvVByzMpOgRmoSGF1JhTzcK2xhk0oGO6UBVPm9zczp1UCufrFeLkrhx72lSK4 +QkSPkgra6iRy74RMU6zMvTmxOtgN74YAs+CPvZ/dlAIBvQ/J4XbJTNlX0HifYERW +G4pBm5mNuLeSNa9vJsKJdrrtoLQKbcedLtRWFwa9xJQVNZxSrDkxkm8u+JrSa25n +ZJC+T1SdbJ684oh8ycD1DsON+QpfO257IlzT/J0I9m+GIG9eJ7/tNAItowOyyc1q +5CxQhJ5yIdJS1mG40+UbAdObF+UoQ5zKxalZXB7I2zuqotr7FEWhg7SGFmmFfuqS +bZnJKR2R7HuvJR8gW0npbJKxqg+CJandnNYRcLJsnGD23AeuH6ZbhPtSyB02SGCp +xv3suRJ9cDkd5un4wtw/etxP51LJX7GMHxGwSquhVMOCnN0Uu8Iz5nFOAN5xTWiE +oC1IgHn6f1S1CBpXyPrSFwxGXDsAEQEAAbQ0QWxiZXJ0IExlZSAoQ09ERSBTSUdO +SU5HIEtFWSkgPGFsbGVlODI4NUBhcGFjaGUub3JnPokCNwQTAQoAIQUCTzbyJgIb +AwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRCFTDHaWXgAgG2hEAC4KciBLMQ6 +IhaDpgXEJPeihAOzWEIQNxha0zMiwF3p3+8uR7a+g6ADn6/BTMujEJ2c3SRerM24 +PEsAtSIHGE8SWGlsLQZmOU5wZVveEtZObVgKUN6tO5TakLTXJIdQit7ibosrIuSK +Ljoh72toY18QpyyflpBr5HPZLESU8tst/FqlPme1v1Nt9qgpCqz1BJBxj7HRp4KP +JS1VUg0H91gB3PSYAmW/MmxG1ofvmuvAddzItnBBtiLCX4lAl7ACbFj2WA09Ll16 +u9poFz0msgg+9F+udUA9zgD8nJQdDeYURo8Ox1tyb4HkhaNwmwiY4+CpT0sKYhDY +nXqKOeg0m12+JHnj57gZwNVy8eKbXtHc8+KbRKaptVt6BZDcEsQtHFtSqmczlhF5 +SMsIXHfoQBvs+1MRsly95Ff2/4/T1xbAvB7MHjTcNDxReY2A0eO89zXCJ2X/8Q7r +qfUyHM2V/rhS+V0zSs/KhWAKdx6KzW/7dYTxjWJfEdHPVfc+YC9n61HNfiRJNqDa +bBuwmzqjQqCc2wi4CmrjDVOBEgWaGfHCBiWAMKpytofhcW8+Lp8dES88n7UfVyQA +pzv2PHFb53TY12srZWmHhQXVaCLQxM3cl1erByCHvMC+8WgZWnlFc09HMJbwj34i +TQfBk6rAaRFj5l4Oq75epr8B9UKPJU1IaohGBBARCgAGBQJPNvvPAAoJEAqBB6mA +BxF/FVcAniQ7mTURegRdEt/B9tKADAk9+PyNAJ43C0Snol7UTBeR5bCCGDlzChCf +WbkCDQRPNvImARAA22aCCzeiVWr21wyOFXwjq9j3i/53cnw5B4aD5kqEhXZxYSij +4xXYeVzpcyLXD74ub94+TY+dk4W+6uj4b5EF2O892VCvGmJ8nQ21M8igNmCMViPO +RwSS259kYSJMYYOSyGFiywiV3RUx7/vhTNNaI+hk9uGiDJv9L6lgMJWHOIWYhtuA +5vQoBlZ38SwGaiBkukXveR2eO77cYh3gL+17WZLjdu7KXUcX6JAhKHcfcrUxBkqJ +4CHZU98pt2z8/gZ8aSJex0mZyHzYx9m7xVuQu2wyP8HOsT42tjVgTJEBvdUEjMov +kJQDvi35dg+b82xYeHnkr45aPws1cyVKbgFKbaJuic2rtZcYb/zWeta3GGRReWZT +8N2IIOKQvEK3t3CYz9YXLvayOlV8xmbxehFE3WPUtDLU+YV+0g5zvpDsypTS/Icb +VNg7iqKoCQkPSMZ0llKOvLqQ2+2hnRYRFhUir3zI5/+lMO+hyoOegJ+5OSoNzkVS +JKumRrlOqxdF1dX8D+fZeIin1wXJJ9GUWtYo5EdSNUxMpl5b9TMAQ3tidwJV4Ki0 +/Cm7KcpgCzS2CPET8BMQv9F7SOJPt5z7I8I8m+4AHcTEEKkvoHOqcgszvAzwCIH/ +EaHf0paIT028dSBhjzAWLP4GzG79jHVMrXtUf2PiyUPROeIYmt9ftTSL4UEAEQEA +AYkCHwQYAQoACQUCTzbyJgIbDAAKCRCFTDHaWXgAgNJ3EADAyQz7OjObbShOLENR +Xigz/0j01QrHCnfDUK+I4pnMjiv/HfU3/tAxpVe4MYjnAh43FSPIs3S0pzcB+VlM +aTfpNxu0Bw82V5jy9A2u2/8vM0ktK/6V9N8tWAu80+z+F3BiOqDppRGvKC9FYq85 +amQr0jPR4iAGbsUZXqO21jzRlDtOkPn6vWjk/MD2e+Xwak+K8R1hMGBayY8PJGSK +/xiLfXJ9fZ7AS80MVuDEB8EXm3zOImF7uc2gGdjEvDJiXe+XCmbBTqVLwICLeRQ0 +tFWWORawWs7n6efa9RrrqIPNQWBbUr6xu3sNh4/3H8N+yhtbH4JDUNimHqpk67Zj +pidqvWbZDYj6zjYdoIUpNgMsh7Gim5lKIPFkLfCeDo/FDL19bYpOBrswlMSgVagd +IHWBWG9pqvx/M0GCI8oWwfl388VFHge5mwStg2lDWP5sOvB9sy6o8r/dPPtdzpbf +FFIlS220188y5/HH+NfJEe6ftZ3R/2Z2nBzuXDxeXz44hboU8USC/y1HdFAUULLl +rbaoYR7QeLKCkPMYncVDLUE1Qr5Z3oAKDI6paYVNg0XYHiDMyWAZrc4rrKyXgI/f +IXSDGboJL5YGI9FcPG7AhJQFot/U6N7hNv/WlLuNjfbivnq7jKWpMAf/1Vm6U8fX +stipTXabSsy8DOwfuftA74Bg/g== +=ANlA +-----END PGP PUBLIC KEY BLOCK----- From commits-return-9375-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 13 14:44:18 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C2E6E9189 for ; Mon, 13 Feb 2012 14:44:18 +0000 (UTC) Received: (qmail 84449 invoked by uid 500); 13 Feb 2012 14:44:18 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 84407 invoked by uid 500); 13 Feb 2012 14:44:17 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 84400 invoked by uid 99); 13 Feb 2012 14:44:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 14:44:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 14:44:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C31C1238897D for ; Mon, 13 Feb 2012 14:43:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1243537 - /openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties Date: Mon, 13 Feb 2012 14:43:56 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120213144356.C31C1238897D@eris.apache.org> Author: kwsutter Date: Mon Feb 13 14:43:56 2012 New Revision: 1243537 URL: http://svn.apache.org/viewvc?rev=1243537&view=rev Log: OPENJPA-2076. Too many newline characters in this one message... Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties?rev=1243537&r1=1243536&r2=1243537&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties (original) +++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties Mon Feb 13 14:43:56 2012 @@ -102,11 +102,11 @@ native-seq-usage: Usage: java org.apache bad-level: Invalid isolation level. Valid levels are -1, \ "none"(0), "read-uncommitted"(1), "read-committed"(2), \ "repeatable-read"(4) or "serializable"(8). Specified value: {0}. -no-nullable-fk: No nullable foreign key found to resolve circular flush\n\ - dependency. During flush processing, changes to instances, new\n\ - instances, and deleted instances must be processed in a specific sequence\n\ - to avoid foreign key constraint violations. The changes required in this\n\ - transaction cannot be reordered because none of the foreign key constraints\n\ +no-nullable-fk: No nullable foreign key found to resolve circular flush \ + dependency. During flush processing, changes to instances, new \ + instances, and deleted instances must be processed in a specific sequence \ + to avoid foreign key constraint violations. The changes required in this \ + transaction cannot be reordered because none of the foreign key constraints \ is nullable (optional). graph-not-cycle-free: A circular flush dependency has been found after all \ circular dependencies should have been resolved. From commits-return-9376-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 13 21:24:21 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA37096FB for ; Mon, 13 Feb 2012 21:24:21 +0000 (UTC) Received: (qmail 78207 invoked by uid 500); 13 Feb 2012 21:24:21 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 78148 invoked by uid 500); 13 Feb 2012 21:24:21 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 78127 invoked by uid 99); 13 Feb 2012 21:24:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4BC742388A9C for ; Mon, 13 Feb 2012 21:23:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1243702 [5/5] - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/... Date: Mon, 13 Feb 2012 21:23:56 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120213212358.4BC742388A9C@eris.apache.org> Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml (original) +++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml Mon Feb 13 21:23:54 2012 @@ -3427,43 +3427,6 @@ levels are equivalent. Lock levels The following properties apply exclusively to the OpenJPA JDBC back-end. - -
      - - openjpa.jdbc.CachesSelect - - - - Select Cache - - - - - caching - - - Select Cache - - - -Property name: -openjpa.jdbc.CachesSelect - - -Resource adaptor config-property: -CachesSelect - - -Default: false. - - -Description: A plugin string (see -) describing the options to reuse SQL SELECT -statements generated to load persistent entity and its relations. -See for details. - -
      -
      openjpa.jdbc.ConnectionDecorators Modified: openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/SliceThread.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/SliceThread.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/SliceThread.java (original) +++ openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/SliceThread.java Mon Feb 13 21:23:54 2012 @@ -50,36 +50,6 @@ public class SliceThread extends Thread return _parent; } - /** - * This thread equals itself (of course), its parent and any of its siblings. - * Essentially all slice threads are equal. - * <br> - * Note: this definition of equality breaks the core definition i.e. if - * <tt>P</tt> is parent thread of a slice child <tt>S</tt>, then - * <tt>S.equals(P)</tt>, but <em>not</em> <tt>P.equals(S)</tt>. - */ - @Override - public boolean equals(Object other) { - if (other == this) return true; - if (other instanceof SliceThread) { - return ((SliceThread)other)._parent == this._parent; - } - return this._parent == other; - } - - /** - * Hash code of this thread is same as its parent. - */ - @Override - public int hashCode() { - return _parent.hashCode(); - } - - @Override - public String toString() { - return '[' + getClass().getSimpleName() + '-'+ getName() + " child of " + _parent + ']'; - } - /** * Create a cached pool of <em>slice</em> threads. * The thread factory creates specialized threads for preferential locking treatment. Modified: openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestBasic.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestBasic.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestBasic.java (original) +++ openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestBasic.java Mon Feb 13 21:23:54 2012 @@ -356,18 +356,5 @@ public class TestBasic extends SliceTest assertNotNull(newP); assertEquals("newslice", SlicePersistence.getSlice(newP)); } - - public void testSliceThreadEqualsParentAndSiblings() { - Thread parent = new Thread(); - SliceThread s1 = new SliceThread(parent, null); - SliceThread s2 = new SliceThread(parent, null); - - assertEquals(s1, parent); - assertEquals(s2, parent); - assertEquals(s1, s2); - assertNotSame(parent, s1); - assertNotSame(parent, s2); - assertNotSame(s1, s2); - } } From commits-return-9377-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 13 21:24:21 2012 Return-Path: <commits-return-9377-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DDD9E9700 for <apmail-openjpa-commits-archive@www.apache.org>; Mon, 13 Feb 2012 21:24:21 +0000 (UTC) Received: (qmail 78233 invoked by uid 500); 13 Feb 2012 21:24:21 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 78151 invoked by uid 500); 13 Feb 2012 21:24:21 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 78129 invoked by uid 99); 13 Feb 2012 21:24:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4792523889E7 for <commits@openjpa.apache.org>; Mon, 13 Feb 2012 21:23:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1243702 [3/5] - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/... Date: Mon, 13 Feb 2012 21:23:56 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120213212358.4792523889E7@eris.apache.org> Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StoreCollectionFieldStrategy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StoreCollectionFieldStrategy.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StoreCollectionFieldStrategy.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StoreCollectionFieldStrategy.java Mon Feb 13 21:23:54 2012 @@ -26,7 +26,6 @@ import java.util.List; import java.util.Map; import org.apache.openjpa.enhance.PersistenceCapable; -import org.apache.openjpa.jdbc.conf.JDBCConfiguration; import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration; import org.apache.openjpa.jdbc.kernel.JDBCStore; import org.apache.openjpa.jdbc.meta.ClassMapping; @@ -43,7 +42,7 @@ import org.apache.openjpa.jdbc.sql.Selec import org.apache.openjpa.jdbc.sql.Union; import org.apache.openjpa.kernel.OpenJPAStateManager; import org.apache.openjpa.kernel.StateManagerImpl; -import org.apache.openjpa.lib.util.ThreadGate; +import org.apache.openjpa.lib.util.Localizer; import org.apache.openjpa.meta.ClassMetaData; import org.apache.openjpa.meta.JavaTypes; import org.apache.openjpa.util.ChangeTracker; @@ -58,20 +57,12 @@ import org.apache.openjpa.util.Proxy; * insert/update/delete behavior as well as overriding * {@link FieldStrategy#toDataStoreValue}, {@link FieldStrategy#join}, and * {@link FieldStrategy#joinRelation} if necessary. - * <br> - * The strategy may reuse the same {@link SelectExecutor select} if the - * {@link JDBCConfiguration#getSelectCacheEnabled() configuration option} - * instructs to do so. * * @author Abe White - * @author Pinaki Poddar (select caching) */ -@SuppressWarnings("serial") public abstract class StoreCollectionFieldStrategy extends ContainerFieldStrategy { - protected SelectExecutor _executor; - protected ThreadGate _lock = new ThreadGate(); - + /** * Return the foreign key used to join to the owning field for the given * element mapping from {@link #getIndependentElementMappings} (or null). @@ -103,7 +94,8 @@ public abstract class StoreCollectionFie * * @see FieldMapping#joinRelation */ - protected abstract Joins joinElementRelation(Joins joins, ClassMapping elem); + protected abstract Joins joinElementRelation(Joins joins, + ClassMapping elem); /** * Join to the owning field table for the given element mapping from @@ -120,9 +112,9 @@ public abstract class StoreCollectionFie * Convert the field value to a collection. Handles collections and * arrays by default. */ - protected Collection<?> toCollection(Object val) { + protected Collection toCollection(Object val) { if (field.getTypeCode() == JavaTypes.COLLECTION) - return (Collection<?>) val; + return (Collection) val; return JavaTypes.toList(val, field.getElement().getType(), false); } @@ -166,9 +158,8 @@ public abstract class StoreCollectionFie else { final ClassMapping[] elems = getIndependentElementMappings(true); Union union = (Union) sel; - if (union.isReadOnly()) if (fetch.getSubclassFetchMode(field.getElementMapping(). - getTypeMapping()) != JDBCFetchConfiguration.EAGER_JOIN) + getTypeMapping()) != fetch.EAGER_JOIN) union.abortUnion(); union.select(new Union.Selector() { public void select(Select sel, int idx) { @@ -184,13 +175,13 @@ public abstract class StoreCollectionFie // we limit further eager fetches to joins, because after this point // the select has been modified such that parallel clones may produce // invalid sql - if (sel.isReadOnly()) return; boolean outer = field.getNullValue() != FieldMapping.NULL_EXCEPTION; // force inner join for inner join fetch if (fetch.hasFetchInnerJoin(field.getFullName(false))) outer = false; selectEager(sel, getDefaultElementMapping(true), sm, store, fetch, - JDBCFetchConfiguration.EAGER_JOIN, false, outer); + JDBCFetchConfiguration.EAGER_JOIN, false, + outer); } public boolean isEagerSelectToMany() { @@ -203,8 +194,7 @@ public abstract class StoreCollectionFie private void selectEager(Select sel, ClassMapping elem, OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode, boolean selectOid, boolean outer) { - if (sel.isReadOnly()) return; - // force distinct if there was a to-many join to avoid duplicates, but + // force distinct if there was a to-many join to avoid dups, but // if this is a parallel select don't make distinct based on the // eager joins alone if the original wasn't distinct if (eagerMode == JDBCFetchConfiguration.EAGER_PARALLEL) { @@ -224,7 +214,8 @@ public abstract class StoreCollectionFie joins = join(joins, elem); // order, ref cols - if (field.getOrderColumn() != null || field.getOrders().length > 0 || !selectOid) { + if (field.getOrderColumn() != null || field.getOrders().length > 0 + || !selectOid) { if (outer) joins = sel.outer(joins); if (!selectOid) { @@ -362,17 +353,21 @@ public abstract class StoreCollectionFie mappedByValue = owner.getPersistenceCapable(); res.setMappedByFieldMapping(mappedByFieldMapping); res.setMappedByValue(mappedByValue); - } else if (coll instanceof Collection && !((Collection) coll).isEmpty()) { + } else if (coll instanceof Collection && + ((Collection) coll).size() > 0) { // Customer (1) <--> Orders(n) // coll contains the values of the toMany field (Orders) // get the StateManager of this toMany value // and find the value of the inverse mappedBy field (Customer) // for this toMacdny field - PersistenceCapable pc = (PersistenceCapable)((Collection) coll).iterator().next(); - OpenJPAStateManager sm1 = (OpenJPAStateManager) pc.pcGetStateManager(); + PersistenceCapable pc = (PersistenceCapable) + ((Collection) coll).iterator().next(); + OpenJPAStateManager sm1 = (OpenJPAStateManager) pc. + pcGetStateManager(); ClassMapping clm = ((ClassMapping) sm1.getMetaData()); - FieldMapping fm = (FieldMapping) clm.getField(mappedByFieldMapping.getName()); + FieldMapping fm = (FieldMapping) clm.getField( + mappedByFieldMapping.getName()); if (fm == mappedByFieldMapping) res.setMappedByValue(sm1.fetchObject(fm.getIndex())); } else { @@ -518,7 +513,8 @@ public abstract class StoreCollectionFie Result res = sel.execute(store, fetch); try { res.next(); - coll.getChangeTracker().setNextSequence(res.getInt(field) + 1); + coll.getChangeTracker().setNextSequence + (res.getInt(field) + 1); } finally { res.close(); } @@ -526,87 +522,72 @@ public abstract class StoreCollectionFie sm.storeObjectField(field.getIndex(), coll); return; } - // select data for this state manager - // Select can be configured for reuse. The locking mechanics ensures that - // under reuse scenario, the Select structure is built under a thread gate - // but later usage is unguarded because a reused select is (almost) immutable. + + // select data for this sm + final ClassMapping[] elems = getIndependentElementMappings(true); + final Joins[] resJoins = new Joins[Math.max(1, elems.length)]; + Union union = store.getSQLFactory().newUnion + (Math.max(1, elems.length)); + union.select(new Union.Selector() { + public void select(Select sel, int idx) { + ClassMapping elem = (elems.length == 0) ? null : elems[idx]; + resJoins[idx] = selectAll(sel, elem, sm, store, fetch, + JDBCFetchConfiguration.EAGER_PARALLEL); + } + }); + + // create proxy + Object coll; + ChangeTracker ct = null; + if (field.getTypeCode() == JavaTypes.ARRAY) + coll = new ArrayList(); + else { + coll = sm.newProxy(field.getIndex()); + if (coll instanceof Proxy) + ct = ((Proxy) coll).getChangeTracker(); + } + + // load values + Result res = union.execute(store, fetch); try { - _lock.lock(); - final ClassMapping[] elems = getIndependentElementMappings(true); - final Joins[] resJoins = new Joins[Math.max(1, elems.length)]; - Union union; - if (_executor == null) { - union = store.getSQLFactory().newUnion(Math.max(1, elems.length)); - if (store.getConfiguration().getSelectCacheEnabled()) { - _executor = union; - } - } else { - union = (Union)_executor; - } - union.select(new Union.Selector() { - public void select(Select sel, int idx) { - ClassMapping elem = (elems.length == 0) ? null : elems[idx]; - resJoins[idx] = selectAll(sel, elem, sm, store, fetch, JDBCFetchConfiguration.EAGER_PARALLEL); - } - }); - - // create proxy - Object coll; - ChangeTracker ct = null; - if (field.getTypeCode() == JavaTypes.ARRAY) - coll = new ArrayList(); - else { - coll = sm.newProxy(field.getIndex()); - if (coll instanceof Proxy) - ct = ((Proxy) coll).getChangeTracker(); - } - - // load values - Result res = union.execute(store, fetch); - try { - int seq = -1; - boolean ordered = ct != null && field.getOrderColumn() != null; - while (res.next()) { - if (ordered) seq = res.getInt(field.getOrderColumn()); - setMappedBy(sm.getObjectId(), sm, coll, res); - add(store, coll, loadElement(sm, store, fetch, res, resJoins[res.indexOf()])); - } - if (ordered) ct.setNextSequence(seq + 1); - } finally { - res.close(); - } - - // set into sm - if (field.getTypeCode() == JavaTypes.ARRAY) { - sm.storeObject(field.getIndex(), - JavaTypes.toArray((Collection<?>) coll, field.getElement().getType())); - } else { - sm.storeObject(field.getIndex(), coll); - } + int seq = -1; + while (res.next()) { + if (ct != null && field.getOrderColumn() != null) + seq = res.getInt(field.getOrderColumn()); + setMappedBy(sm.getObjectId(), sm, coll, res); + add(store, coll, loadElement(sm, store, fetch, res, + resJoins[res.indexOf()])); + } + if (ct != null && field.getOrderColumn() != null) + ct.setNextSequence(seq + 1); } finally { - _lock.unlock(); + res.close(); } + + // set into sm + if (field.getTypeCode() == JavaTypes.ARRAY) + sm.storeObject(field.getIndex(), JavaTypes.toArray + ((Collection) coll, field.getElement().getType())); + else + sm.storeObject(field.getIndex(), coll); } /** - * Selects data for loading, starting in field table. - * + * Select data for loading, starting in field table. */ protected Joins selectAll(Select sel, ClassMapping elem, - OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode) { + OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, + int eagerMode) { ForeignKey fk = getJoinForeignKey(elem); Object oid = getObjectIdForJoin(fk, sm); sel.whereForeignKey(fk, oid, field.getDefiningMapping(), store); - if (sel.isReadOnly()) { - return sel.getJoins(); - } + // order first, then select so that if the projection introduces // additional ordering, it will be after our required ordering field.orderLocal(sel, elem, null); Joins joins = joinElementRelation(sel.newJoins(), elem); field.orderRelation(sel, elem, joins); selectElement(sel, elem, store, fetch, eagerMode, joins); - return joins; } @@ -643,9 +624,4 @@ public abstract class StoreCollectionFie } return oid; } - - - public String toString() { - return getClass().getSimpleName() + '[' + field.getName() + ']'; - } } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractResult.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractResult.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractResult.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractResult.java Mon Feb 13 21:23:54 2012 @@ -74,7 +74,7 @@ public abstract class AbstractResult private static final Joins JOINS = new NoOpJoins(); - private Map<Object,Object> _eager = null; + private Map _eager = null; private ClassMapping _base = null; private int _index = 0; private boolean _gotEager = false; @@ -86,14 +86,14 @@ public abstract class AbstractResult private Object _mappedByValue = null; public Object getEager(FieldMapping key) { - Map<Object,Object> map = getEagerMap(true); + Map map = getEagerMap(true); return (map == null) ? null : map.get(key); } public void putEager(FieldMapping key, Object res) { - Map<Object,Object> map = getEagerMap(false); + Map map = getEagerMap(false); if (map == null) { - map = new HashMap<Object,Object>(); + map = new HashMap(); setEagerMap(map); } map.put(key, res); @@ -104,7 +104,7 @@ public abstract class AbstractResult * * @param client whether the client is accessing eager information */ - protected Map<Object,Object> getEagerMap(boolean client) { + protected Map getEagerMap(boolean client) { if (client) _gotEager = true; return _eager; @@ -113,7 +113,7 @@ public abstract class AbstractResult /** * Raw eager information. */ - protected void setEagerMap(Map<Object,Object> eager) { + protected void setEagerMap(Map eager) { _eager = eager; } @@ -129,9 +129,11 @@ public abstract class AbstractResult /** * Close all results in eager map. */ - protected void closeEagerMap(Map<Object,Object> eager) { + protected void closeEagerMap(Map eager) { if (eager != null) { - for (Object res : eager.values()) { + Object res; + for (Iterator itr = eager.values().iterator(); itr.hasNext();) { + res = itr.next(); if (res != this && res instanceof Closeable) try { ((Closeable) res).close(); @@ -889,6 +891,9 @@ public abstract class AbstractResult return this; } + public void appendTo(SQLBuffer buf) { + } + public Joins setCorrelatedVariable(String var) { return this; } @@ -899,10 +904,5 @@ public abstract class AbstractResult public void moveJoinsToParent() { } - - @Override - public StringBuilder path() { - return null; - } } } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java Mon Feb 13 21:23:54 2012 @@ -1399,9 +1399,6 @@ public class DBDictionary } else if (val instanceof Calendard) { cald = (Calendard) val; val = cald.value; - } else if (val instanceof BindParameter) { - BindParameter bParm = (BindParameter) val; - val = bParm.getValue(); } if (val == null) @@ -1894,8 +1891,7 @@ public class DBDictionary public SQLBuffer toSelectCount(Select sel) { SQLBuffer selectSQL = new SQLBuffer(this); SQLBuffer from; - if (!sel.isReadOnly()) - sel.addJoinClassConditions(); + sel.addJoinClassConditions(); if (sel.getFromSelect() != null) from = getFromSelect(sel, false); else @@ -2287,7 +2283,7 @@ public class DBDictionary if (join.isCorrelated() && join.getForeignKey() != null) { SQLBuffer where = new SQLBuffer(this); where.append("(").append(toTraditionalJoin(join)).append(")"); - sel.where(where); + sel.where(where.getSQL()); } } } @@ -2347,7 +2343,7 @@ public class DBDictionary if (join.getForeignKey() != null){ SQLBuffer where = new SQLBuffer(this); where.append("(").append(toTraditionalJoin(join)).append(")"); - sel.where(where); + sel.where(where.getSQL()); } break; } @@ -2497,7 +2493,7 @@ public class DBDictionary if (join.getForeignKey() != null){ SQLBuffer where = new SQLBuffer(this); where.append("(").append(toTraditionalJoin(join)).append(")"); - sel.where(where); + sel.where(where.getSQL()); } return null; Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java Mon Feb 13 21:23:54 2012 @@ -39,9 +39,9 @@ class JoinSet { // efficient representation with O(1) lookup, add, remove operations for // typical sets of joins, and it means we'd have to create a graph anyway // when joinIterator() is called - private final List<Node> _graph = new ArrayList<Node>(); + private final List _graph = new ArrayList(); private int _size = 0; - private List<Join> _sorted = null; + private List _sorted = null; public JoinSet() { } @@ -51,7 +51,7 @@ class JoinSet { if (copy._graph.get(i) == null) _graph.add(null); else - _graph.add((Node) copy._graph.get(i).clone()); + _graph.add(((Node) copy._graph.get(i)).clone()); } _size = copy._size; _sorted = copy._sorted; @@ -95,22 +95,23 @@ class JoinSet { /** * Iterator over joins that prepares them for SQL translation. */ - public Iterator<Join> joinIterator() { + public Iterator joinIterator() { if (_size < 2) return iterator(); if (_sorted != null) return _sorted.iterator(); - List<Join> sorted = new ArrayList<Join>(_size); - LinkedList<Node> queue = new LinkedList<Node>(); - BitSet seen = new BitSet(_graph.size() * _graph.size() + _graph.size()); + List sorted = new ArrayList(_size); + LinkedList queue = new LinkedList(); + BitSet seen = new BitSet(_graph.size() * _graph.size() + + _graph.size()); // traverse graph Node n; int idx, sidx; for (int i = 0; i < _graph.size(); i++) { // seed queue with next set of disconnected joins - for (n = _graph.get(i); n != null; n = n.next) { + for (n = (Node) _graph.get(i); n != null; n = n.next) { sidx = getSeenIndex(n.join); if (!seen.get(sidx)) { seen.set(sidx); @@ -182,8 +183,8 @@ class JoinSet { return false; boolean added = false; - for (Iterator<Join> itr = js.iterator(); itr.hasNext();) - added = add(itr.next()) || added; + for (Iterator itr = js.iterator(); itr.hasNext();) + added = add((Join) itr.next()) || added; return added; } @@ -217,8 +218,8 @@ class JoinSet { _size++; } - public Iterator<Join> iterator() { - return new Iterator<Join>() { + public Iterator iterator() { + return new Iterator() { private Node _next = null; private int _idx = -1; @@ -236,7 +237,7 @@ class JoinSet { return false; } - public Join next() { + public Object next() { if (!hasNext()) throw new NoSuchElementException(); Join j = _next.join; @@ -288,16 +289,16 @@ class JoinSet { public boolean removeAll(JoinSet js) { boolean remd = false; - for (Iterator<Join> itr = js.iterator(); itr.hasNext();) - remd = remove(itr.next()) || remd; + for (Iterator itr = js.iterator(); itr.hasNext();) + remd = remove((Join) itr.next()) || remd; return remd; } public boolean retainAll(JoinSet js) { boolean remd = false; Join join; - for (Iterator<Join> itr = iterator(); itr.hasNext();) { - join = itr.next(); + for (Iterator itr = iterator(); itr.hasNext();) { + join = (Join) itr.next(); if (!js.contains(join)) remd = remove(join); } @@ -317,8 +318,8 @@ class JoinSet { public boolean containsAll(JoinSet js) { if (js._size > _size || js._graph.size() > _graph.size()) return false; - for (Iterator<Join> itr = js.iterator(); itr.hasNext();) - if (!contains(itr.next())) + for (Iterator itr = js.iterator(); itr.hasNext();) + if (!contains((Join) itr.next())) return false; return true; } @@ -346,7 +347,7 @@ class JoinSet { public String toString() { StringBuilder buf = new StringBuilder(); buf.append("["); - for (Iterator<Join> itr = iterator(); itr.hasNext();) { + for (Iterator itr = iterator(); itr.hasNext();) { buf.append("<").append(itr.next()).append(">"); if (itr.hasNext()) buf.append(", "); Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Joins.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Joins.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Joins.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Joins.java Mon Feb 13 21:23:54 2012 @@ -102,10 +102,4 @@ public interface Joins { * Move joins that belong to subquery's parent */ public void moveJoinsToParent(); - - /** - * Gets the current path as a mutable string. - * @return - */ - public StringBuilder path(); } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java Mon Feb 13 21:23:54 2012 @@ -112,15 +112,6 @@ public class LogicalUnion return false; } - @Override - public boolean isReadOnly() { - for (int i = 0; i < sels.length; i++) { - if (sels[i].isReadOnly()) - return true; - } - return false; - } - public void abortUnion() { } @@ -244,7 +235,8 @@ public class LogicalUnion if (getExpectedResultCount() == 1) { AbstractResult res; for (int i = 0; i < sels.length; i++) { - res = (AbstractResult) sels[i].execute(store, fetch, lockLevel); + res = (AbstractResult) sels[i].execute(store, fetch, + lockLevel); res.setBaseMapping(mappings[i]); res.setIndexOf(i); @@ -275,7 +267,8 @@ public class LogicalUnion try { List l; for (int i = 0; i < res.length; i++) { - res[i] = (AbstractResult) sels[i].execute(store, fetch, lockLevel); + res[i] = (AbstractResult) sels[i].execute(store, fetch, + lockLevel); res[i].setBaseMapping(mappings[i]); res[i].setIndexOf(i); @@ -775,6 +768,14 @@ public class LogicalUnion sel.where(sql, joins); } + public void where(String sql) { + sel.where(sql); + } + + public void where(String sql, Joins joins) { + sel.where(sql, joins); + } + public void having(SQLBuffer sql) { sel.having(sql); } @@ -783,6 +784,14 @@ public class LogicalUnion sel.having(sql, joins); } + public void having(String sql) { + sel.having(sql); + } + + public void having(String sql, Joins joins) { + sel.having(sql, joins); + } + public void groupBy(SQLBuffer sql) { sel.groupBy(sql); } @@ -922,10 +931,6 @@ public class LogicalUnion public DBDictionary getDictionary() { return dict; } - - public boolean isReadOnly() { - return sel.isReadOnly(); - } } /** @@ -1006,5 +1011,4 @@ public class LogicalUnion return a1.length - a2.length; } } - } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java Mon Feb 13 21:23:54 2012 @@ -32,6 +32,7 @@ import java.util.List; import org.apache.commons.lang.ObjectUtils; import org.apache.openjpa.jdbc.identifier.DBIdentifier; import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration; +import org.apache.openjpa.jdbc.kernel.exps.CollectionParam; import org.apache.openjpa.jdbc.kernel.exps.Val; import org.apache.openjpa.jdbc.schema.Column; import org.apache.openjpa.jdbc.schema.Sequence; @@ -52,7 +53,6 @@ import org.apache.openjpa.kernel.exps.Pa * * @since 0.2.4 */ -@SuppressWarnings("serial") public final class SQLBuffer implements Serializable, Cloneable { @@ -60,8 +60,14 @@ public final class SQLBuffer private final DBDictionary _dict; private final StringBuilder _sql = new StringBuilder(); - private List<Subselect> _subsels = null; - private List<BindParameter> _params = null; + private List _subsels = null; + private List _params = null; + private List _cols = null; + + // Even element refers to an index of the _params list + // Odd element refers to the user parameter + private List _userIndex = null; + private List _userParams = null; /** * Default constructor. @@ -86,7 +92,7 @@ public final class SQLBuffer } /** - * Return true if the buffer is empty. + * Return true if the buffer is emtpy. */ public boolean isEmpty() { return _sql.length() == 0; @@ -96,42 +102,87 @@ public final class SQLBuffer * Append all SQL and parameters of the given buffer. */ public SQLBuffer append(SQLBuffer buf) { - append(buf, _sql.length(), (_params == null) ? 0 : _params.size(), true); + append(buf, _sql.length(), (_params == null) ? 0 : _params.size(), + true); return this; } /** * Append all SQL and parameters of the given buffer at the given positions. */ - private void append(SQLBuffer buf, int sqlIndex, int paramIndex, boolean subsels) { + private void append(SQLBuffer buf, int sqlIndex, int paramIndex, + boolean subsels) { if (subsels) { // only allow appending of buffers with subselects, not insertion - if (_subsels != null && !_subsels.isEmpty() && sqlIndex != _sql.length()) + if (_subsels != null && !_subsels.isEmpty() + && sqlIndex != _sql.length()) throw new IllegalStateException(); if (buf._subsels != null && !buf._subsels.isEmpty()) { if (sqlIndex != _sql.length()) throw new IllegalStateException(); if (_subsels == null) - _subsels = new ArrayList<Subselect>(buf._subsels.size()); + _subsels = new ArrayList(buf._subsels.size()); for (int i = 0; i < buf._subsels.size(); i++) - _subsels.add((buf._subsels.get(i)).clone(sqlIndex, paramIndex)); + _subsels.add(((Subselect) buf._subsels.get(i)). + clone(sqlIndex, paramIndex)); } } - if (sqlIndex == _sql.length()) { + if (sqlIndex == _sql.length()) _sql.append(buf._sql.toString()); - } else { + else _sql.insert(sqlIndex, buf._sql.toString()); - } - + if (buf._params != null) { if (_params == null) - _params = new ArrayList<BindParameter>(); + _params = new ArrayList(); + if (_cols == null && buf._cols != null) { + _cols = new ArrayList(); + while (_cols.size() < _params.size()) + _cols.add(null); + } if (paramIndex == _params.size()) { _params.addAll(buf._params); + if (buf._userParams != null) { + if (_userParams == null) + _userParams = new ArrayList(); + _userParams.addAll(paramIndex, buf._userParams); + } + if (buf._userIndex != null) { + if (_userIndex == null) + _userIndex = new ArrayList(); + _userIndex.addAll(buf._userIndex); + } + if (buf._cols != null) + _cols.addAll(buf._cols); + else if (_cols != null) + while (_cols.size() < _params.size()) + _cols.add(null); } else { _params.addAll(paramIndex, buf._params); + if ( buf._userParams != null) { + if (_userParams == null) + _userParams = new ArrayList(); + _userParams.addAll(paramIndex, buf._userParams); + } + if (buf._userIndex != null) { + if (_userIndex == null) + _userIndex = new ArrayList(); + _userIndex.addAll(buf._userIndex); + } + if (buf._cols != null) + _cols.addAll(paramIndex, buf._cols); + else if (_cols != null) + while (_cols.size() < _params.size()) + _cols.add(paramIndex, null); + } + } + + if (_userIndex != null) { + // fix up user parameter index + for (int i = 0; i < _userIndex.size(); i+=2) { + _userIndex.set(i, _userParams.indexOf(_userIndex.get(i+1))); } } } @@ -190,7 +241,7 @@ public final class SQLBuffer _sql.append(")"); if (_subsels == null) - _subsels = new ArrayList<Subselect>(2); + _subsels = new ArrayList(2); _subsels.add(sub); return this; } @@ -216,7 +267,7 @@ public final class SQLBuffer * Append a parameter value. */ public SQLBuffer appendValue(Object o) { - return appendValue(o, null, null); + return appendValue(o, null); } /** @@ -242,11 +293,34 @@ public final class SQLBuffer else { _sql.append(PARAMETER_TOKEN); + // initialize param and col lists; we hold off on col list until + // we get the first non-null col if (_params == null) - _params = new ArrayList<BindParameter>(); - BindParameter param = new BindParameter(userParam == null ? col : userParam, - userParam != null, col, o); - _params.add(param); + _params = new ArrayList(); + if (_userParams == null) + _userParams = new ArrayList(); + if (col != null && _cols == null) { + _cols = new ArrayList(); + while (_cols.size() < _params.size()) + _cols.add(null); + } + + _params.add(o); + if (userParam != null) { + Object param = userParam; + if (userParam instanceof CollectionParam) + param = ((CollectionParam) userParam).clone(); + _userParams.add(param); + if (_userIndex == null) + _userIndex = new ArrayList(); + int index = _params.size()-1; + _userIndex.add(index); + _userIndex.add(param); + } + else + _userParams.add(o); + if (_cols != null) + _cols.add(col); } return this; } @@ -254,9 +328,8 @@ public final class SQLBuffer /** * Return the list of parameter values. */ - public List<BindParameter> getParameters() { - if (_params == null) return Collections.emptyList(); - return _params; + public List getParameters() { + return (_params == null) ? Collections.EMPTY_LIST : _params; } /** @@ -267,33 +340,10 @@ public final class SQLBuffer * This structure is preferred over a normal map because a user parameter * may occur more than one in the parameters. */ - public List<Object> getUserParameters() { - if (_params == null) - return Collections.emptyList(); - List<Object> userParam = new ArrayList<Object>(); - for (int i = 0; i < _params.size(); i++) { - BindParameter param = _params.get(i); - if (param.isUser()) { - userParam.add(i); - userParam.add(param.getKey()); - } - } - return userParam; - } - - /** - * Gets the columns associated with the binding parameters. - * All binding parameter may not have an associated column. - */ - public List<Column> getColumns() { - if (_params == null) - return Collections.emptyList(); - List<Column> columns = new ArrayList<Column>(); - for (BindParameter param : _params) { - columns.add(param.getColumn()); - } - return columns; - + public List getUserParameters() { + if (_userIndex == null) + return Collections.EMPTY_LIST; + return _userIndex; } /** @@ -316,14 +366,14 @@ public final class SQLBuffer return sql; StringBuilder buf = new StringBuilder(); - Iterator<BindParameter> pi = _params.iterator(); + Iterator pi = _params.iterator(); for (int i = 0; i < sql.length(); i++) { if (sql.charAt(i) != '?') { buf.append(sql.charAt(i)); continue; } - Object param = pi.hasNext() ? pi.next().getValue() : null; + Object param = pi.hasNext() ? pi.next() : null; if (param == null) buf.append("NULL"); else if (param instanceof Number || param instanceof Boolean) @@ -380,7 +430,7 @@ public final class SQLBuffer } /** - * Create and populate the parameters of a prepared statement using the + * Create and populate the parameters of a prepred statement using the * SQL in this buffer and the given fetch configuration. */ public PreparedStatement prepareStatement(Connection conn, @@ -488,9 +538,10 @@ public final class SQLBuffer if (_params == null) return; + Column col; for (int i = 0; i < _params.size(); i++) { - BindParameter param = _params.get(i); - _dict.setUnknown(ps, i + 1, param.getValue(), param.getColumn()); + col = (_cols == null) ? null : (Column) _cols.get(i); + _dict.setUnknown(ps, i + 1, _params.get(i), col); } } @@ -567,42 +618,11 @@ public final class SQLBuffer } } - /** - * Sets the binding parameters, clearing all existing parameters. - * - * @param params a non-null list of parameters. - */ - public void setParameters(List<?> params) { - if (params == null) { - throw new IllegalArgumentException("Can not set null parameter"); - } - _params = new ArrayList<BindParameter>(); - int i = 0; - for (Object p : params) { - BindParameter param = new BindParameter(i, false, null, p); - _params.add(param); - } + public void setParameters(List params) { + _params = params; } - /** - * Binds the given value to a parameter representing the given column. - * The column must be bound before this call. - * @param o a parameter value - * @param col a column to which the value is to be bound - * @return this same buffer - * @exception IllegalArgumentException is no parameter represents the given column - */ - public SQLBuffer bind(Object o, Column col) { - boolean bound = false; - for (int i = 0; i < _params.size(); i++) { - BindParameter param = _params.get(i); - if (param.getColumn() == col) { - param.setValue(o); - bound = true; - } - } - if (!bound) - throw new IllegalArgumentException("Column " + col + " does not exist to bind " + o); - return this; + public List getColumns() { + return _cols; } } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java Mon Feb 13 21:23:54 2012 @@ -546,12 +546,12 @@ public interface Select /** * Add the given where conditions. */ -// public void where(String sql); + public void where(String sql); /** * Add the given where conditions. */ -// public void where(String sql, Joins joins); + public void where(String sql, Joins joins); /** * Add the given having conditions. @@ -566,12 +566,12 @@ public interface Select /** * Add the given having conditions. */ -// public void having(String sql); + public void having(String sql); /** * Add the given having conditions. */ -// public void having(String sql, Joins joins); + public void having(String sql, Joins joins); /** * Group by the given column. @@ -606,12 +606,12 @@ public interface Select /** * Add a GROUP BY clause. */ -// public void groupBy(String sql); + public void groupBy(String sql); /** * Add a GROUP BY clause. */ -// public void groupBy(String sql, Joins joins); + public void groupBy(String sql, Joins joins); /** * Group by the columns of the given mapping, possibly including subclasses. @@ -751,29 +751,22 @@ public interface Select /** * Set joined table metadatas for polymorphic queries */ - public void setJoinedTableClassMeta(List<ClassMapping> meta); + public void setJoinedTableClassMeta(List meta); /** * get joined table metadatas for polymorphic queries */ - public List<ClassMapping> getJoinedTableClassMeta(); + public List getJoinedTableClassMeta(); /** * Set joined table metadatas excluded for polymorphic queries */ - public void setExcludedJoinedTableClassMeta(List<ClassMapping> meta); + public void setExcludedJoinedTableClassMeta(List meta); /** * get joined table metadatas excluded for polymorphic queries */ - public List<ClassMapping> getExcludedJoinedTableClassMeta(); + public List getExcludedJoinedTableClassMeta(); - /** - * Gets the database dictionary used by this select to form the target SQL - * statement. - * - * @return the immutable database dictionary. - */ public DBDictionary getDictionary() ; - } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectExecutor.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectExecutor.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectExecutor.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectExecutor.java Mon Feb 13 21:23:54 2012 @@ -23,7 +23,6 @@ import java.sql.SQLException; import org.apache.openjpa.jdbc.conf.JDBCConfiguration; import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration; import org.apache.openjpa.jdbc.kernel.JDBCStore; -import org.apache.openjpa.jdbc.schema.Column; /** * Interface for configuring and executing a SQL select. @@ -152,19 +151,4 @@ public interface SelectExecutor { * @since 2.0.0 */ public boolean hasMultipleSelects(); - - /** - * Affirms if this select is structurally immutable. - * A select becomes immutable upon {@link #execute(JDBCStore, JDBCFetchConfiguration) execution}. - * There is no explicit way to turn a select into read-only status. - * <br> - * The immutable contract does not prevent {@link SQLBuffer#bind(Object, Column) binding} - * new values to {@link BindParameter parameters}. - * - * @return false on construction, true after execution. - * - * @since 2.2.0 - */ - boolean isReadOnly(); - } From commits-return-9378-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 13 21:24:34 2012 Return-Path: <commits-return-9378-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E7BC9810 for <apmail-openjpa-commits-archive@www.apache.org>; Mon, 13 Feb 2012 21:24:34 +0000 (UTC) Received: (qmail 78426 invoked by uid 500); 13 Feb 2012 21:24:34 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 78372 invoked by uid 500); 13 Feb 2012 21:24:34 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 78363 invoked by uid 99); 13 Feb 2012 21:24:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:21 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 41C972388900 for <commits@openjpa.apache.org>; Mon, 13 Feb 2012 21:23:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1243702 [1/5] - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/... Date: Mon, 13 Feb 2012 21:23:56 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120213212358.41C972388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwsutter Date: Mon Feb 13 21:23:54 2012 New Revision: 1243702 URL: http://svn.apache.org/viewvc?rev=1243702&view=rev Log: OPENJPA-2099. With Pinaki's green light, we're going to back out the changes for OpenJPA-2099 and OpenJPA-2111 so that we can make progress on the OpenJPA 2.2.0 release. Removed: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/BindParameter.java openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ImmutableBooleanValue.java openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FlexibleThreadLocal.java openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ThreadGate.java openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestFlexibleThreadLocal.java openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestGate.java openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestImmutableValue.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMappingInfo.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerFieldStrategy.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerRelationMapTableFieldStrategy.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MapTableFieldStrategy.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationToManyTableFieldStrategy.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StoreCollectionFieldStrategy.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/AbstractResult.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Joins.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectExecutor.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingQuery.java openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/SliceThread.java openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestBasic.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java Mon Feb 13 21:23:54 2012 @@ -628,27 +628,5 @@ public interface JDBCConfiguration * @param util instance of the identifier utility */ public void setIdentifierUtil(DBIdentifierUtil util); - - /** - * Affirms if select statements are aggressively cached. - * An aggressive select cache assumes that {@link FetchConfiguration fetch plan} - * does not change between execution. - * - * @return false by default. - * - * @since 2.2.0 - */ - public boolean getSelectCacheEnabled(); - - /** - * Sets if select statements are aggressively cached. - * An aggressive select cache assumes that {@link FetchConfiguration fetch plan} - * does not change between execution. - * <br> - * This setting can be changed once and only once. - * - * @since 2.2.0 - */ - public void setSelectCacheEnabled(boolean enable); } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java Mon Feb 13 21:23:54 2012 @@ -43,8 +43,6 @@ import org.apache.openjpa.jdbc.sql.MaxDB import org.apache.openjpa.jdbc.sql.SQLFactory; import org.apache.openjpa.kernel.BrokerImpl; import org.apache.openjpa.kernel.StoreContext; -import org.apache.openjpa.lib.conf.BooleanValue; -import org.apache.openjpa.lib.conf.ImmutableBooleanValue; import org.apache.openjpa.lib.conf.IntValue; import org.apache.openjpa.lib.conf.ObjectValue; import org.apache.openjpa.lib.conf.PluginValue; @@ -89,7 +87,6 @@ public class JDBCConfigurationImpl public PluginValue driverDataSourcePlugin; public MappingFactoryValue mappingFactoryPlugin; public ObjectValue identifierUtilPlugin; - public ImmutableBooleanValue cacheSelect; // used internally private String firstUser = null; @@ -353,10 +350,6 @@ public class JDBCConfigurationImpl identifierUtilPlugin.setString(aliases[0]); identifierUtilPlugin.setInstantiatingGetter("getIdentifierUtilInstance"); - cacheSelect = new ImmutableBooleanValue("jdbc.CachesSelect"); - addValue(cacheSelect); - cacheSelect.setDefault("false"); - cacheSelect.set(false); // Disable openjpa.CachesSelect until openjpa-2099 is complete // this static initializer is to get past a weird // ClassCircularityError that happens only under IBM's @@ -1003,13 +996,5 @@ public class JDBCConfigurationImpl public void setIdentifierUtil(DBIdentifierUtil util) { identifierUtilPlugin.set(util); } - - public boolean getSelectCacheEnabled() { - return cacheSelect.get(); - } - public void setSelectCacheEnabled(boolean enable) { - cacheSelect.set(enable); - } - } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Mon Feb 13 21:23:54 2012 @@ -54,7 +54,9 @@ import org.apache.openjpa.jdbc.sql.SQLFa import org.apache.openjpa.jdbc.sql.Select; import org.apache.openjpa.jdbc.sql.SelectExecutor; import org.apache.openjpa.jdbc.sql.Union; +import org.apache.openjpa.kernel.BrokerImpl; import org.apache.openjpa.kernel.FetchConfiguration; +import org.apache.openjpa.kernel.FinderCache; import org.apache.openjpa.kernel.LockManager; import org.apache.openjpa.kernel.OpenJPAStateManager; import org.apache.openjpa.kernel.PCState; @@ -85,107 +87,43 @@ import org.apache.openjpa.util.StoreExce import org.apache.openjpa.util.UserException; /** - * StoreManager plugin that uses JDBC to load and store persistent data in a + * StoreManager plugin that uses JDBC to store persistent data in a * relational data store. - * <br> - * This important design construct builds {@link SelectExecutor select} - * structures required to fetch persistent entity from a JDBC database. - * The preparation of a select structure requires extensively consulting - * mapping metadata of persistent types. The result of the select execution - * as database record is used to populate the persistent attributes. - * <br> - * The logic of preparing the select and loading its resultant data are - * triggered by this class, but actually carried out by individual field - * mapping strategies. This design allows excellent flexibility in terms - * of extending behavior by the strategies. - * <br> - * This instance is operating under a context i.e. a object management kernel. - * Loading data requires the references to other entities be resolved. - * This class delegates reference resolution to this operating context - * which may call back to this instance itself to load the reference data. - * <br> - * This class is aware of transaction and database connection. The database - * connections are wrapped with reference counting. Transaction could be - * optimistic or pessimistic which broadly translates to connection-less - * and connected with respect to database connection. - * <br> - * Since version 2.2.0, this critical construct has undergone a major - * conceptual change. This construct now is capable of reusing select statements - * based on {@link JDBCConfiguration#getSelectCacheEnabled() configuration. - * The select instances used by this class are now {@link ClassMapping#getSelect() - * obtained} from the (stateful) mapping metadata instead of a stateless - * {@link SQLFactory factory}. This allows individual mapping metadata for - * a persistent type to maintain a select instance for reuse instead of - * creating yet another cache of selects indexed by their mapping metadata. - * <br> - * A reusable select is populated at the first execution and executed subsequently by - * <em>only</em> binding parameters that are specific to a single instance. In concurrent - * execution environment, it is required to ensure that a) the preparation and first - * execution is guarded by synchronized monitor and b) subsequent executions do not - * pay synchronization cost as after first execution a select becomes - * <em>structurally</em> immutable. - * <br> - * This construct has factored out the methods that executes a select to incorporate - * such a threading model. - * <br> - * Of course, such structurally immutable select assumes that {@link FetchConfiguration - * fetch plan} is invariant as well. However, this construct <em>does not</em> validate - * that assumption at all. As of version 2.2.0, the invariance of fetch plan is <em>not<em> - * validated when select cache is activated. * * @author Abe White - * @author Pinaki Poddar * @nojavadoc */ public class JDBCStoreManager implements StoreManager, JDBCStore { - private static final Localizer _loc = Localizer.forPackage(JDBCStoreManager.class); + private static final Localizer _loc = Localizer.forPackage + (JDBCStoreManager.class); - private StoreContext _ctx; - private JDBCConfiguration _conf; - private DBDictionary _dict; - private JDBCLockManager _lm; - private DataSource _ds; - private RefCountConnection _conn; - private boolean _active; - private Log _log; + private StoreContext _ctx = null; + private JDBCConfiguration _conf = null; + private DBDictionary _dict = null; + private SQLFactory _sql = null; + private JDBCLockManager _lm = null; + private DataSource _ds = null; + private RefCountConnection _conn = null; + private boolean _active = false; + private Log _log = null; // track the pending statements so we can cancel them private Set<Statement> _stmnts = Collections.synchronizedSet(new HashSet<Statement>()); - /** - * Gets the operating context i.e. the object management kernel - * of this store manager. - */ public StoreContext getContext() { return _ctx; } - /** - * Sets the operating context i.e. the object management kernel - * of this store manager. - * <br> - * The context is set before all other operation. - */ public void setContext(StoreContext ctx) { setContext(ctx, (JDBCConfiguration) ctx.getConfiguration()); } - /** - * Sets the operating context i.e. the object management kernel - * of this store manager with the given configuration which may - * differ from the configuration of the context. This separation - * of configuration allows multiple store manager with different - * configuration (e.g. connected to different databases as in Slice) - * operating under the same object management kernel and hence - * under the same transaction. - * <br> - * The context is set before all other operation. - */ public void setContext(StoreContext ctx, JDBCConfiguration conf) { _ctx = ctx; _conf = conf; _dict = _conf.getDBDictionaryInstance(); + _sql = _conf.getSQLFactoryInstance(); _log = _conf.getLog(JDBCConfiguration.LOG_DIAG); LockManager lm = ctx.getLockManager(); @@ -203,7 +141,15 @@ public class JDBCStoreManager implements } private final DataSource getDataSource(StoreContext ctx) { - return (useConnectionFactory2(ctx)) ? _conf.getDataSource2(ctx) : _conf.getDataSource(ctx); + DataSource ds; + + if(useConnectionFactory2(ctx)) { + ds = _conf.getDataSource2(ctx); + } + else { + ds = _conf.getDataSource(ctx); + } + return ds; } public JDBCConfiguration getConfiguration() { @@ -215,7 +161,7 @@ public class JDBCStoreManager implements } public SQLFactory getSQLFactory() { - return _conf.getSQLFactoryInstance(); + return _sql; } public JDBCLockManager getLockManager() { @@ -226,36 +172,17 @@ public class JDBCStoreManager implements return (JDBCFetchConfiguration) _ctx.getFetchConfiguration(); } - /** - * Begins an optimistic transaction. An optimistic transaction does - * not retain a connection and hence this method is a no-op. - */ public void beginOptimistic() { } - /** - * Rolls back an optimistic transaction. An optimistic transaction does - * not retain a connection and hence this method is a no-op. - */ public void rollbackOptimistic() { } - /** - * Affirms if the store manager transaction is managed by an external - * agency. - */ - public boolean isManaged() { - return _ctx.isManaged() && _conf.isConnectionFactoryModeManaged(); - } - - /** - * Begins a transaction by setting auto-commit to false, if necessary - * in non-managed transaction environment. - */ public void begin() { _active = true; try { - if (!isManaged() && _conn.getAutoCommit()) + if ((!_ctx.isManaged() || !_conf.isConnectionFactoryModeManaged()) + && _conn.getAutoCommit()) _conn.setAutoCommit(false); } catch (SQLException se) { _active = false; @@ -263,12 +190,9 @@ public class JDBCStoreManager implements } } - /** - * Commits the transaction in non-managed environment. - */ public void commit() { try { - if (!isManaged()) + if (!_ctx.isManaged() || !_conf.isConnectionFactoryModeManaged()) _conn.commit(); } catch (SQLException se) { try { @@ -281,16 +205,15 @@ public class JDBCStoreManager implements } } - /** - * Rolls back the transaction in non-managed environment. - */ public void rollback() { // already rolled back ourselves? if (!_active) return; try { - if (_conn != null && !isManaged()) + if (_conn != null + && (!_ctx.isManaged() || !_conf + .isConnectionFactoryModeManaged())) _conn.rollback(); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); @@ -299,54 +222,29 @@ public class JDBCStoreManager implements } } - /** - * Retains the connection for later transactions. - */ public void retainConnection() { connect(false); _conn.setRetain(true); } - /** - * Releases the retained connection, if any. - */ public void releaseConnection() { if (_conn != null) _conn.setRetain(false); } - /** - * Gets the client view of the connection as a reference counted - * connection. - */ public Object getClientConnection() { return new ClientConnection(getConnection()); } - /** - * Gets a reference counted connection. - */ public Connection getConnection() { connect(true); return _conn; } - /** - * Gets the data source used by this manager. - * @return - */ protected DataSource getDataSource() { return _ds; } - /** - * Affirms if the given instance exists in the data store. - * Requires to execute a SQL select with primary key identifier - * of the given instance. - * - * @param sm the instance whose data store existence is to be determined. - * @param context the context in which this query is executed - */ public boolean exists(OpenJPAStateManager sm, Object context) { // add where conditions on base class to avoid joins if subclass // doesn't use oid as identifier @@ -354,90 +252,57 @@ public class JDBCStoreManager implements return exists(mapping, sm.getObjectId(), context); } - /** - * Executes a SQL select with primary key to ascertain existence - * of the given instance. - * - * @param mapping the mapping metadata. The where condition is applied - * to the least-derived type of this metadata to avoid joins if subclass - * does not use the given <tt>oid</tt> as identifer. - * @param oid the primary key identifier - * @param context the execution context (not used) - * @return true if the instance exists in the data store. - */ + public boolean isCached(List<Object> oids, BitSet edata) { + // JDBCStoreManager doesn't store oids in memory. + return false; + } + private boolean exists(ClassMapping mapping, Object oid, Object context) { // add where conditions on base class to avoid joins if subclass // doesn't use oid as identifier - mapping = getBaseMapping(mapping); - Select sel = mapping.getSelect(); - try { - if (requiresLocking(sel)) { - synchronized (sel) { - sel.wherePrimaryKey(oid, mapping, this); - return sel.getCount(this) != 0; - } - } else { - sel.wherePrimaryKey(oid, mapping, this); - return sel.getCount(this) != 0; + Select sel = _sql.newSelect(); + while (mapping.getJoinablePCSuperclassMapping() != null) + mapping = mapping.getJoinablePCSuperclassMapping(); + + sel.wherePrimaryKey(oid, mapping, this); + if (_log.isTraceEnabled()) { + _log.trace("exists: oid="+oid+" "+mapping.getDescribedType()); } + try { + return sel.getCount(this) != 0; } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } } - /** - * Affirms the in-memory version is same as the version of the given instance. - */ public boolean syncVersion(OpenJPAStateManager sm, Object context) { + ClassMapping mapping = (ClassMapping) sm.getMetaData(); try { - return ((ClassMapping) sm.getMetaData()).getVersion().checkVersion(sm, this, true); + return mapping.getVersion().checkVersion(sm, this, true); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict, getReadLockLevel()); } } - /** - * Affirms if this manager has cached the instances given by the - * list of identifiers. - * <br> - * Always returns false as this manager does not have any instance - * caching capability. - */ - public boolean isCached(List<Object> oids, BitSet edata) { - // JDBCStoreManager doesn't store oids in memory. - return false; - } - - /** - * Gets the lock level of the current fetch configuration. - * - * @return -1 if no fetch configuration is available. - */ private int getReadLockLevel() { JDBCFetchConfiguration fetch = getFetchConfiguration(); - return (fetch != null) ? fetch.getReadLockLevel() : -1; + if (fetch != null) { + return fetch.getReadLockLevel(); + } + return -1; } - /** - * Compares the two given versions. - */ public int compareVersion(OpenJPAStateManager state, Object v1, Object v2) { - return ((ClassMapping) state.getMetaData()).getVersion().compareVersion(v1, v2); + ClassMapping mapping = (ClassMapping) state.getMetaData(); + return mapping.getVersion().compareVersion(v1, v2); } - /** - * Initializes the persistent state of the given instance to the given state. - * - * @param sm the instance to be populated - * @param state life cycle state to be set on the given instance - * @param fetch fetch configuration to be used - * @param context {@link ConnectionInfo information} about an existing connection. - * Could be null if this initialization is non-recursive. - */ - public boolean initialize(OpenJPAStateManager sm, PCState state, FetchConfiguration fetch, Object ctx) { - ConnectionInfo info = (ConnectionInfo) ctx; + public boolean initialize(OpenJPAStateManager sm, PCState state, + FetchConfiguration fetch, Object context) { + ConnectionInfo info = (ConnectionInfo) context; try { - return initializeState(sm, state, (JDBCFetchConfiguration) fetch, info); + return initializeState(sm, state, (JDBCFetchConfiguration) fetch, + info); } catch (ClassNotFoundException cnfe) { throw new UserException(cnfe); } catch (SQLException se) { @@ -448,16 +313,9 @@ public class JDBCStoreManager implements /** * Initialize a newly-loaded instance. - * - * @param sm the instance to be populated - * @param state life cycle state to be set on the given instance - * @param fetch fetch configuration to be used - * @param info {@link ConnectionInfo information} about an existing connection. - * If non-null, then this information carries the database result and exact - * metadata of the instance to be loaded. */ protected boolean initializeState(OpenJPAStateManager sm, PCState state, - JDBCFetchConfiguration fetch, ConnectionInfo info) + JDBCFetchConfiguration fetch, ConnectionInfo info) throws ClassNotFoundException, SQLException { Object oid = sm.getObjectId(); ClassMapping mapping = (ClassMapping) sm.getMetaData(); @@ -474,24 +332,27 @@ public class JDBCStoreManager implements Boolean custom = customLoad(sm, mapping, state, fetch); if (custom != null) return custom.booleanValue(); - res = getInitializeStateResult(sm, mapping, fetch, Select.SUBS_EXACT); + res = getInitializeStateResult(sm, mapping, fetch, + Select.SUBS_EXACT); if (res == null && !selectPrimaryKey(sm, mapping, fetch)) return false; if (isEmptyResult(res)) return false; } else { - ClassMapping[] mappings = mapping.getIndependentAssignableMappings(); + ClassMapping[] mappings = mapping. + getIndependentAssignableMappings(); if (mappings.length == 1) { mapping = mappings[0]; Boolean custom = customLoad(sm, mapping, state, fetch); if (custom != null) return custom.booleanValue(); - res = getInitializeStateResult(sm, mapping, fetch, Select.SUBS_ANY_JOINABLE); + res = getInitializeStateResult(sm, mapping, fetch, + Select.SUBS_ANY_JOINABLE); if (res == null && !selectPrimaryKey(sm, mapping, fetch)) return false; - } else { - res = getInitializeStateUnionResult(sm, mapping, mappings, fetch); - } + } else + res = getInitializeStateUnionResult(sm, mapping, mappings, + fetch); if (isEmptyResult(res)) return false; } @@ -504,7 +365,8 @@ public class JDBCStoreManager implements mapping = res.getBaseMapping(); res.startDataRequest(mapping.getDiscriminator()); try { - type = mapping.getDiscriminator().getClass(this, mapping, res); + type = mapping.getDiscriminator().getClass(this, mapping, + res); } finally { res.endDataRequest(); } @@ -516,15 +378,19 @@ public class JDBCStoreManager implements sm.initialize(type, state); if (info != null && info.result != null) { - FieldMapping mappedByFieldMapping = info.result.getMappedByFieldMapping(); + FieldMapping mappedByFieldMapping = info.result. + getMappedByFieldMapping(); Object mappedByObject = info.result.getMappedByValue(); if (mappedByFieldMapping != null && mappedByObject != null) if (mappedByObject instanceof OpenJPAId && mapping.getExtraFieldDataIndex(mappedByFieldMapping.getIndex()) != -1) { - // The inverse relation can not be set since we are eagerly loading this instance - // for an owner that is still in the process of initializing itself. + // The inverse relation can not be set since + // we are eagerly loading this sm for + // a sm owner that is still in the process of + // initializing itself. // Remember owner oid by setIntermediate(). - // The inverse relation is set later by setInverseRelation() when the owner is fully + // The inverse relation is set later by + // setInverseRelation() when the sm owner is fully // initialized. int index = mappedByFieldMapping.getIndex(); if (sm.getLoaded().get(index)) { @@ -551,13 +417,8 @@ public class JDBCStoreManager implements } } - /** - * Sets inverse relation between eager collection members and the given owner. - * @param owner an instance with <em>eager</em> -to-many relation - * @param mapping mapping metadata of the given owner - * @param res result carrying the eager results - */ - private void setInverseRelation(OpenJPAStateManager owner, ClassMapping mapping, Result res) { + private void setInverseRelation(OpenJPAStateManager owner, + ClassMapping mapping, Result res) { FieldMapping[] fms = mapping.getFieldMappings(); // At this point, the owner is fully initialized. @@ -570,63 +431,60 @@ public class JDBCStoreManager implements Object coll = owner.fetchObject(fms[i].getIndex()); if (coll instanceof Map) coll = ((Map<?,?>)coll).values(); - if (coll instanceof Collection && !((Collection<?>) coll).isEmpty()) { - setInverseRelation(owner, (Collection<?>)coll); + if (coll instanceof Collection<?> && + ((Collection<?>) coll).size() > 0) { + // Found eagerly loaded collection. + // Publisher (1) <==> (M) Magazine + // publisher has a EAGER OneToMany relation + // magazine has a EAGER or LAZY ManyToOne publisher + // For each member (Magazine) in the collection, + // set its inverse relation (Publisher). + for (Iterator<?> itr = ((Collection<?>) coll).iterator(); + itr.hasNext();) { + PersistenceCapable pc = (PersistenceCapable) itr.next(); + if (pc == null) { + continue; + } + OpenJPAStateManager sm = (OpenJPAStateManager) pc.pcGetStateManager(); + ClassMapping cm = + (ClassMapping) _conf.getMetaDataRepositoryInstance().getCachedMetaData(pc.getClass()); + FieldMapping[] fmd = cm.getFieldMappings(); + for (int j = 0; j < fmd.length; j++) { + // don't check the oids for basic fields. + if (fmd[j].isTypePC()) { + Object oid = sm.getIntermediate(fmd[j].getIndex()); + // if oid was setIntermediate() previously and it is the same as the owner,generate + // then set the inverse relation + if (oid != null && oid.equals(owner.getObjectId())) { + sm.storeObject(fmd[j].getIndex(), owner.getPersistenceCapable()); + break; + } + } + } + } } } } } - - /** - * Sets inverse relation between given owner and given collection members. - * <br> - * Example: Publisher (1) <---> (M) Magazine <br> - * Publisher has <em>eager</em> OneToMany relation to Magazine<br> - * Magazine has a <em>eager</em> or <em>lazy</em> ManyToOne relation to Publisher<br> - * For each member (Magazine) in the given collection, set the member's inverse - * relation to the Publisher. - */ - private void setInverseRelation(OpenJPAStateManager owner, Collection<?> coll) { - for (Iterator<?> itr = ((Collection<?>) coll).iterator(); itr.hasNext();) { - Object member = itr.next(); - if (member instanceof PersistenceCapable) { - PersistenceCapable pc = (PersistenceCapable) member; - - OpenJPAStateManager sm = (OpenJPAStateManager) pc.pcGetStateManager(); - ClassMapping cm = (ClassMapping)_conf.getMetaDataRepositoryInstance() - .getCachedMetaData(pc.getClass()); - FieldMapping[] fmd = cm.getFieldMappings(); - for (int j = 0; j < fmd.length; j++) { - if (fmd[j].isTypePC()) { - Object oid = sm.getIntermediate(fmd[j].getIndex()); - if (oid != null && oid.equals(owner.getObjectId())) { - sm.storeObject(fmd[j].getIndex(), owner.getPersistenceCapable()); - break; - } - } - } - } - } - } - /** - * Sets the given <tt>mappedBy</tt> instance to the given instance to the field that - * corresponds to the other end of relation for the given field. - * @param sm an instance whose field is to be set - * @param mappedByFieldMapping - * @param mappedBy - */ - protected void setMappedBy(OpenJPAStateManager sm, FieldMapping mappedByFieldMapping, Object mappedBy) { + protected void setMappedBy(OpenJPAStateManager sm, + FieldMapping mappedByFieldMapping, Object mappedByObject) { ClassMapping mapping = (ClassMapping) sm.getMetaData(); - if (mappedByFieldMapping == mapping.getFieldMapping(mappedByFieldMapping.getIndex())) - sm.storeObject(mappedByFieldMapping.getIndex(), mappedBy); + FieldMapping[] fms = mapping.getFieldMappings(); + for (int i = 0; i < fms.length; i++) { + if (fms[i] == mappedByFieldMapping) { + sm.storeObject(fms[i].getIndex(), mappedByObject); + return; + } + } } /** * This method is to provide override for non-JDBC or JDBC-like * implementation of getting version from the result set. */ - protected void getVersion(ClassMapping mapping, OpenJPAStateManager sm, Result res) throws SQLException { + protected void getVersion(ClassMapping mapping, OpenJPAStateManager sm, + Result res) throws SQLException { mapping.getVersion().afterLoad(sm, this); } @@ -635,7 +493,9 @@ public class JDBCStoreManager implements * implementation of checking whether the result set is empty or not. */ protected boolean isEmptyResult(Result res) throws SQLException { - return (res != null && !res.next()); + if (res != null && !res.next()) + return true; + return false; } /** @@ -666,159 +526,78 @@ public class JDBCStoreManager implements } /** - * Executes a SQL select statement to obtain the database result for the given instance. - * - * @param sm the instance whose database data is to be selected - * @param mapping mapping metadata for the given instance - * @param fetch the fetch configuration - * @param subs subclass joining style indicator. See <tt>Select * Select the data for the given instance and return the result. Return * null if there is no data in the current fetch groups to select. */ - private Result getInitializeStateResult(OpenJPAStateManager sm, ClassMapping mapping, - JDBCFetchConfiguration fetch, int subs) + private Result getInitializeStateResult(OpenJPAStateManager sm, + ClassMapping mapping, JDBCFetchConfiguration fetch, int subs) throws SQLException { - Select sel = mapping.getSelect(); - if (requiresLocking(sel)) { - synchronized (sel) { - return getInitializeStateResult(sel, sm, mapping, subs, fetch, JDBCFetchConfiguration.EAGER_JOIN); - } - } else { - return getInitializeStateResult(sel, sm, mapping, subs, fetch, JDBCFetchConfiguration.EAGER_JOIN); - } - } - - /** - * Sets the given select with the primary identifier of the given instance and executes - * it to obtain the result used to populate the given instance. - * <br> - * This method is factored to introduce thread guard for reused selects. - * - * @param sel - * @param sm - * @param mapping - * @param subs - * @param fetch - * @param join - * @return - * @throws SQLException - */ - private Result getInitializeStateResult(Select sel, OpenJPAStateManager sm, ClassMapping mapping, - int subs, JDBCFetchConfiguration fetch, int join) throws SQLException { - if (!select(sel, mapping, subs, sm, null, fetch, join, true, false)) - return null; + FinderQueryImpl fq = getFinder(mapping, fetch); + if (fq != null) + return fq.execute(sm, this, fetch); + Select sel = _sql.newSelect(); + if (!select(sel, mapping, subs, sm, null, fetch, + JDBCFetchConfiguration.EAGER_JOIN, true, false)) + return null; sel.wherePrimaryKey(sm.getObjectId(), mapping, this); sel.setExpectedResultCount(1, false); - return sel.execute(this, fetch); + if (_log.isTraceEnabled()) { + _log.trace("getInitializeStateResult: oid="+sm.getObjectId()+" "+mapping.getDescribedType()); + } + Result result = sel.execute(this, fetch); + cacheFinder(mapping, sel, fetch); + return result; } /** * Select a union of the data for the given instance from possible concrete * mappings and return the result. - * <br> - * This method if factored out to ensure that union statement is populated - * and executed with synchronization for the first time provided the union - * statement is cached and later reused, but subsequent execution of the - * same union statement does not pay any synchronization cost. */ private Result getInitializeStateUnionResult(final OpenJPAStateManager sm, ClassMapping mapping, final ClassMapping[] mappings, final JDBCFetchConfiguration fetch) throws SQLException { - - Union union = mapping.getUnion(mappings.length); - if (requiresLocking(union)) { - synchronized (union) { - return getInitializeStateUnionResult(union, sm, mapping, mappings, fetch); - } - } else { - return getInitializeStateUnionResult(union, sm, mapping, mappings, fetch); - } - } - - /** - * Executes the given union to obtain the database record for the given instance. - * - * @param union an union to be executed to obtain the database record of the given instance. - * @param sm the instance for whom a union statement is executed - * @param mapping the mapping metadata of the given instance - * @param mappings any other independently joinable metadata - * @param fetch fetch configuration - * @return the selected database result - * @throws SQLException when things go wrong - */ - private Result getInitializeStateUnionResult(final Union union, final OpenJPAStateManager sm, - ClassMapping mapping, final ClassMapping[] mappings, - final JDBCFetchConfiguration fetch) throws SQLException { + FinderQueryImpl fq = getFinder(mapping, fetch); + if (fq != null) + return fq.execute(sm, this, fetch); final JDBCStoreManager store = this; - final int eager = Math.min(fetch.getEagerFetchMode(), JDBCFetchConfiguration.EAGER_JOIN); + final int eager = Math.min(fetch.getEagerFetchMode(), + JDBCFetchConfiguration.EAGER_JOIN); + + Union union = _sql.newUnion(mappings.length); union.setExpectedResultCount(1, false); if (fetch.getSubclassFetchMode(mapping) != EagerFetchModes.EAGER_JOIN) union.abortUnion(); union.select(new Union.Selector() { public void select(Select sel, int i) { - sel.select(mappings[i], Select.SUBS_ANY_JOINABLE, store, fetch, eager); + sel.select(mappings[i], Select.SUBS_ANY_JOINABLE, store, fetch, + eager); sel.wherePrimaryKey(sm.getObjectId(), mappings[i], store); } }); - return union.execute(this, fetch); - } - - /** - * Gets the mapping for the least derived type of the given mapping. - */ - ClassMapping getBaseMapping(ClassMapping mapping) { - ClassMapping base = mapping; - while (base.getJoinablePCSuperclassMapping() != null) { - base = base.getJoinablePCSuperclassMapping(); - } - return base; + Result result = union.execute(this, fetch); + cacheFinder(mapping, union, fetch); + return result; } /** * Select primary key data to make sure the given instance exists, locking * if needed. - * <br> - * Creates or reuses a select. If selects are cached, then ensures that - * first preparation and execution is synchronized, but the subsequent - * executions are unsynchronized. */ - private boolean selectPrimaryKey(OpenJPAStateManager sm, ClassMapping mapping, JDBCFetchConfiguration fetch) + private boolean selectPrimaryKey(OpenJPAStateManager sm, + ClassMapping mapping, JDBCFetchConfiguration fetch) throws SQLException { - Select sel = mapping.getSelect(); - if (requiresLocking(sel)) { - synchronized (sel) { - return selectPrimaryKey(sel, sm, mapping, fetch); - } - } else { - return selectPrimaryKey(sel, sm, mapping, fetch); - } - } - - /** - * Affirms if the given select needs to be populated and executed with - * thread synchronization guard. - */ - private boolean requiresLocking(SelectExecutor sel) { - return !sel.isReadOnly() && _conf.getSelectCacheEnabled(); - } - - /** - * Executes the given Select to find whether the given object exists. - * This method is factored out to be executed with synchronization - * at first execution when select caching is turned on by configuration. - * @param sel a select to execute to find existence of the given oject - * @param sm the given object - * @param mapping the mapping for the given object - * @param fetch fetch configuration determines if locking is required - * @return true if the object exists - * @throws SQLException when things go wrong - * @see #selectPrimaryKey(OpenJPAStateManager, ClassMapping, JDBCFetchConfiguration) - */ - private boolean selectPrimaryKey(Select sel, OpenJPAStateManager sm, ClassMapping mapping, - JDBCFetchConfiguration fetch) throws SQLException { - ClassMapping base = getBaseMapping(mapping); + // select pks from base class record to ensure it exists and lock + // it if needed + ClassMapping base = mapping; + while (base.getJoinablePCSuperclassMapping() != null) + base = base.getJoinablePCSuperclassMapping(); + + Select sel = _sql.newSelect(); sel.select(base.getPrimaryKeyColumns()); sel.wherePrimaryKey(sm.getObjectId(), base, this); + if (_log.isTraceEnabled()) { + _log.trace("selectPrimaryKey: oid="+sm.getObjectId()+" "+mapping.getDescribedType()); + } Result exists = sel.execute(this, fetch); try { if (isEmptyResult(exists)) @@ -858,69 +637,48 @@ public class JDBCStoreManager implements // if the instance is hollow and there's a customized // get by id method, use it - if (sm.getLoaded().length() == 0 && mapping.customLoad(sm, this, null, jfetch)) { + if (sm.getLoaded().length() == 0 + && mapping.customLoad(sm, this, null, jfetch)) removeLoadedFields(sm, fields); - } - Select sel = mapping.getSelect(); - - if (requiresLocking(sel)) { - synchronized (sel) { - if (selectAndLoad(sel, mapping, sm, fields, jfetch, lockLevel) == Boolean.FALSE) - return false; - } - } else { - if (selectAndLoad(sel, mapping, sm, fields, jfetch, lockLevel) == Boolean.FALSE) - return false; - } - - // now allow the fields to load themselves individually too - FieldMapping[] fms = mapping.getFieldMappings(); - for (int i = 0; i < fms.length; i++) { - if (fields.get(i) && !sm.getLoaded().get(i)) { - fms[i].load(sm, this, jfetch.traverseJDBC(fms[i])); - } - } - mapping.getVersion().afterLoad(sm, this); - return true; - } catch (ClassNotFoundException cnfe) { - throw new StoreException(cnfe); - } catch (SQLException se) { - throw SQLExceptions.getStore(se, _dict, lockLevel); - } - } - - /** - * Populates the given select, executes it and loads the resultant data into the given instance. - * @param sel - * @param mapping - * @param sm - * @param fields - * @param jfetch - * @param lockLevel - * @return false if the instance does not exist anymore. true if it were loaded. - * null if select is not required - * @throws SQLException - */ - private Boolean selectAndLoad(Select sel, ClassMapping mapping, OpenJPAStateManager sm, BitSet fields, - JDBCFetchConfiguration jfetch, int lockLevel) throws SQLException { - if (select(sel, mapping, Select.SUBS_EXACT, sm, fields, jfetch, + + //### select is kind of a big object, and in some cases we don't + //### use it... would it be worth it to have a small shell select + //### object that only creates a real select when actually used? + + Select sel = _sql.newSelect(); + if (select(sel, mapping, Select.SUBS_EXACT, sm, fields, jfetch, EagerFetchModes.EAGER_JOIN, true, false)) { sel.wherePrimaryKey(sm.getObjectId(), mapping, this); if (_log.isTraceEnabled()) { _log.trace("load: "+mapping.getDescribedType()+" oid: "+sm.getObjectId()); } - Result res = sel.execute(this, jfetch, lockLevel); + res = sel.execute(this, jfetch, lockLevel); try { if (isEmptyResult(res)) return false; load(mapping, sm, jfetch, res); - return true; } finally { res.close(); } } - return null; + // now allow the fields to load themselves individually too + FieldMapping[] fms = mapping.getFieldMappings(); + for (int i = 0; i < fms.length; i++) + if (fields.get(i) && !sm.getLoaded().get(i)) { + if (_log.isTraceEnabled()) { + _log.trace("load field: '"+ fms[i].getName() + "' for oid="+sm.getObjectId() + +" "+mapping.getDescribedType()); + } + fms[i].load(sm, this, jfetch.traverseJDBC(fms[i])); + } + mapping.getVersion().afterLoad(sm, this); + return true; + } catch (ClassNotFoundException cnfe) { + throw new StoreException(cnfe); + } catch (SQLException se) { + throw SQLExceptions.getStore(se, _dict, lockLevel); + } } /** @@ -932,20 +690,26 @@ public class JDBCStoreManager implements fields.clear(i); } - public Collection<Object> loadAll(Collection<OpenJPAStateManager> sms, PCState state, int load, + public Collection loadAll(Collection sms, PCState state, int load, FetchConfiguration fetch, Object context) { return ImplHelper.loadAll(sms, this, state, load, fetch, context); } - public void beforeStateChange(OpenJPAStateManager sm, PCState fromState, PCState toState) { + public void beforeStateChange(OpenJPAStateManager sm, PCState fromState, + PCState toState) { } - public Collection<Exception> flush(Collection<OpenJPAStateManager> sms) { + public Collection flush(Collection sms) { try { if (_conn != null && _conn.getInnermostDelegate().isReadOnly()) _conn.setReadOnly(false); } catch (SQLException e) { } + if (_log.isTraceEnabled()) { + for (OpenJPAStateManager sm: (Collection<OpenJPAStateManager>)sms) { + _log.trace("flush: "+sm.getPCState().getClass().getName() + " for oid="+sm.getObjectId()); + } + } return _conf.getUpdateManagerInstance().flush(sms, this); } @@ -962,8 +726,8 @@ public class JDBCStoreManager implements } try { - for (Statement stmnt : stmnts) - stmnt.cancel(); + for (Iterator<Statement> itr = stmnts.iterator(); itr.hasNext();) + ((Statement) itr.next()).cancel(); return true; } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); @@ -976,7 +740,8 @@ public class JDBCStoreManager implements return ApplicationIds.assign(sm, this, preFlush); // datastore identity - Object val = ImplHelper.generateIdentityValue(_ctx, meta, JavaTypes.LONG); + Object val = ImplHelper.generateIdentityValue(_ctx, meta, + JavaTypes.LONG); if (val == null && meta.getIdentityStrategy() != ValueStrategies.NATIVE) return false; if (val == null) @@ -996,7 +761,9 @@ public class JDBCStoreManager implements } public Class<?> getManagedType(Object oid) { - return (oid instanceof Id) ? ((Id) oid).getType() : null; + if (oid instanceof Id) + return ((Id) oid).getType(); + return null; } public Class<?> getDataStoreIdType(ClassMetaData meta) { @@ -1051,26 +818,34 @@ public class JDBCStoreManager implements if (rops[i] != null) continue; - Select sel = mapping.getSelect(); + Select sel = _sql.newSelect(); sel.setLRS(true); if (_log.isTraceEnabled()) { _log.trace("executeExtent: "+mappings[i].getDescribedType()); sel.logEagerRelations(); } - BitSet paged = selectExtent(sel, mappings[i], jfetch, subclasses); - rops[i] = (paged == null) ? new InstanceResultObjectProvider(sel, mappings[i], this, jfetch) - : new PagingResultObjectProvider(sel, mappings[i], this, jfetch, paged, Long.MAX_VALUE); + BitSet paged = selectExtent(sel, mappings[i], jfetch, + subclasses); + if (paged == null) + rops[i] = new InstanceResultObjectProvider(sel, + mappings[i], this, jfetch); + else + rops[i] = new PagingResultObjectProvider(sel, + mappings[i], this, jfetch, paged, Long.MAX_VALUE); } - return (rops.length == 1) ? rops[0] : new MergedResultObjectProvider(rops); + if (rops.length == 1) + return rops[0]; + return new MergedResultObjectProvider(rops); } // perform a union on all independent classes - Union union = mapping.getUnion(mappings.length); + Union union = _sql.newUnion(mappings.length); union.setLRS(true); final BitSet[] paged = new BitSet[mappings.length]; union.select(new Union.Selector() { public void select(Select sel, int idx) { - paged[idx] = selectExtent(sel, mappings[idx], jfetch, subclasses); + paged[idx] = selectExtent(sel, mappings[idx], jfetch, + subclasses); } }); @@ -1080,7 +855,8 @@ public class JDBCStoreManager implements return new PagingResultObjectProvider(union, mappings, JDBCStoreManager.this, jfetch, paged, Long.MAX_VALUE); } - return new InstanceResultObjectProvider(union, mappings[0], this, jfetch); + return new InstanceResultObjectProvider(union, mappings[0], this, + jfetch); } catch (SQLException se) { throw SQLExceptions.getStore(se, _dict); } @@ -1093,12 +869,15 @@ public class JDBCStoreManager implements JDBCFetchConfiguration fetch, boolean subclasses) { int subs = (subclasses) ? Select.SUBS_JOINABLE : Select.SUBS_NONE; // decide between paging and standard iteration - BitSet paged = PagingResultObjectProvider.getPagedFields(sel, mapping, this, fetch, - JDBCFetchConfiguration.EAGER_PARALLEL, Long.MAX_VALUE); + BitSet paged = PagingResultObjectProvider.getPagedFields(sel, mapping, + this, fetch, JDBCFetchConfiguration.EAGER_PARALLEL, + Long.MAX_VALUE); if (paged == null) - sel.selectIdentifier(mapping, subs, this, fetch, JDBCFetchConfiguration.EAGER_PARALLEL); + sel.selectIdentifier(mapping, subs, this, fetch, + JDBCFetchConfiguration.EAGER_PARALLEL); else - sel.selectIdentifier(mapping, subs, this, fetch, JDBCFetchConfiguration.EAGER_JOIN); + sel.selectIdentifier(mapping, subs, this, fetch, + JDBCFetchConfiguration.EAGER_JOIN); return paged; } @@ -1106,13 +885,14 @@ public class JDBCStoreManager implements ExpressionParser ep = QueryLanguages.parserForLanguage(language); if (ep != null) { return new JDBCStoreQuery(this, ep); - } else if (QueryLanguages.LANG_SQL.equals(language)) { + } + if (QueryLanguages.LANG_SQL.equals(language)) { return new SQLStoreQuery(this); - } else if (QueryLanguages.LANG_PREPARED_SQL.equals(language)) { + } + if (QueryLanguages.LANG_PREPARED_SQL.equals(language)) { return new PreparedSQLStoreQuery(this); - } else { - return null; } + return null; } public StoreQuery newQuery(String language) { @@ -1134,9 +914,10 @@ public class JDBCStoreManager implements } public Seq getDataStoreIdSequence(ClassMetaData meta) { - return (meta.getIdentityStrategy() == ValueStrategies.NATIVE - || meta.getIdentityStrategy() == ValueStrategies.NONE) - ? _conf.getSequenceInstance() : null; + if (meta.getIdentityStrategy() == ValueStrategies.NATIVE + || meta.getIdentityStrategy() == ValueStrategies.NONE) + return _conf.getSequenceInstance(); + return null; } public Seq getValueSequence(FieldMetaData fmd) { @@ -1190,9 +971,13 @@ public class JDBCStoreManager implements /** * Find the object with the given oid. */ - public Object find(Object oid, ValueMapping vm, JDBCFetchConfiguration fetch) { + public Object find(Object oid, ValueMapping vm, + JDBCFetchConfiguration fetch) { if (oid == null) return null; + if (_log.isTraceEnabled()) { + _log.trace("find: oid="+oid+" "+vm.getDeclaredTypeMapping().getDescribedType()); + } Object pc = _ctx.find(oid, fetch, null, null, 0); if (pc == null && vm != null) { OrphanedKeyAction action = _conf.getOrphanedKeyActionInstance(); @@ -1204,13 +989,16 @@ public class JDBCStoreManager implements /** * Load the object in the current row of the given result. */ - public Object load(ClassMapping mapping, JDBCFetchConfiguration fetch, BitSet exclude, Result result) - throws SQLException { + public Object load(ClassMapping mapping, JDBCFetchConfiguration fetch, + BitSet exclude, Result result) throws SQLException { if (!mapping.isMapped()) - throw new InvalidStateException(_loc.get("virtual-mapping", mapping)); + throw new InvalidStateException(_loc.get("virtual-mapping", + mapping)); // get the object id for the row; base class selects pk columns - ClassMapping base = getBaseMapping(mapping); + ClassMapping base = mapping; + while (base.getJoinablePCSuperclassMapping() != null) + base = base.getJoinablePCSuperclassMapping(); Object oid = base.getObjectId(this, result, null, true, null); if (oid == null) return null; @@ -1245,11 +1033,15 @@ public class JDBCStoreManager implements * Load the given state manager with data from the result set. Only * mappings originally selected will be loaded. */ - private void load(ClassMapping mapping, OpenJPAStateManager sm, JDBCFetchConfiguration fetch, Result res) - throws SQLException { + private void load(ClassMapping mapping, OpenJPAStateManager sm, + JDBCFetchConfiguration fetch, Result res) throws SQLException { FieldMapping eagerToMany = load(mapping, sm, fetch, res, null); if (eagerToMany != null) { - eagerToMany.loadEagerJoin(sm, this, fetch.traverseJDBC(eagerToMany), res); + if (_log.isTraceEnabled()) { + _log.trace("Loading eager toMany: "+eagerToMany.getName()+" for "+mapping); + } + eagerToMany.loadEagerJoin(sm, this, fetch.traverseJDBC(eagerToMany), + res); } if (_active && _lm != null && res.isLocking()) _lm.loadedForUpdate(sm); @@ -1267,11 +1059,11 @@ public class JDBCStoreManager implements // load superclass data; base class loads version ClassMapping parent = mapping.getJoinablePCSuperclassMapping(); - if (parent != null) { + if (parent != null) eagerToMany = load(parent, sm, fetch, res, eagerToMany); - } else if (sm.getVersion() == null) { + else if (sm.getVersion() == null) mapping.getVersion().load(sm, this, res); - } + // load unloaded fields FieldMapping[] fms = mapping.getDefinedFieldMappings(); Object eres, processed; @@ -1287,9 +1079,11 @@ public class JDBCStoreManager implements if (eagerToMany == null && fms[i].isEagerSelectToMany()) eagerToMany = fms[i]; else - fms[i].loadEagerJoin(sm, this, fetch.traverseJDBC(fms[i]), res); + fms[i].loadEagerJoin(sm, this, + fetch.traverseJDBC(fms[i]), res); } else if (eres != null) { - processed = fms[i].loadEagerParallel(sm, this, fetch.traverseJDBC(fms[i]), eres); + processed = fms[i].loadEagerParallel(sm, this, + fetch.traverseJDBC(fms[i]), eres); if (processed != eres) res.putEager(fms[i], processed); } else { @@ -1330,11 +1124,9 @@ public class JDBCStoreManager implements public boolean select(Select sel, ClassMapping mapping, int subs, OpenJPAStateManager sm, BitSet fields, JDBCFetchConfiguration fetch, int eager, boolean ident, boolean outer) { - if (sel.isReadOnly()) - return true; // add class conditions so that they're cloned for any batched selects boolean joinedSupers = false; - if (needClassCondition(mapping, subs, sm)) { + if(needClassCondition(mapping, subs, sm)) { joinedSupers = getJoinedSupers(sel, mapping, subs, outer); } @@ -1342,19 +1134,21 @@ public class JDBCStoreManager implements // and cannot be reused during the actual eager select process, // preventing infinite recursion eager = Math.min(eager, fetch.getEagerFetchMode()); - FieldMapping eagerToMany = createEagerSelects(sel, mapping, sm, fields, fetch, eager); + FieldMapping eagerToMany = createEagerSelects(sel, mapping, sm, fields, + fetch, eager); // select all base class mappings; do this after batching so that // the joins needed by these selects don't get in the WHERE clause // of the batched selects int seld = selectBaseMappings(sel, mapping, mapping, sm, fields, - fetch, eager, eagerToMany, ident, joinedSupers); + fetch, eager, eagerToMany, ident, joinedSupers); // select eager to-many relations last because during load they // advance the result set and could exhaust it, so no other mappings - // can load afterwards + // can load afterwords if (eagerToMany != null) - eagerToMany.selectEagerJoin(sel, sm, this, fetch.traverseJDBC(eagerToMany), eager); + eagerToMany.selectEagerJoin(sel, sm, this, + fetch.traverseJDBC(eagerToMany), eager); // optionally select subclass mappings if (subs == Select.SUBS_JOINABLE || subs == Select.SUBS_ANY_JOINABLE) @@ -1370,30 +1164,37 @@ public class JDBCStoreManager implements return mapping.getDiscriminator().addClassConditions(sel, subs == Select.SUBS_JOINABLE, joins); } - private boolean needClassCondition(ClassMapping mapping, int subs, OpenJPAStateManager sm) { - if (sm == null || sm.getPCState() == PCState.TRANSIENT) { - if (subs == Select.SUBS_JOINABLE || subs == Select.SUBS_NONE) { - return true; - } else { - return (mapping.getDiscriminator() != null - && SuperclassDiscriminatorStrategy.class.isInstance(mapping.getDiscriminator().getStrategy()) - && _conf.getCompatibilityInstance().getSuperclassDiscriminatorStrategyByDefault()); + private boolean needClassCondition(ClassMapping mapping, int subs, + OpenJPAStateManager sm) { + boolean retVal = false; + if(sm == null || sm.getPCState() == PCState.TRANSIENT) { + if(subs == Select.SUBS_JOINABLE || subs == Select.SUBS_NONE) { + retVal = true; + } + else { + if (mapping.getDiscriminator() != null + && SuperclassDiscriminatorStrategy.class.isInstance(mapping.getDiscriminator().getStrategy()) + && mapping.getMappingRepository().getConfiguration().getCompatibilityInstance() + .getSuperclassDiscriminatorStrategyByDefault()) { + retVal = true; + } } } - return false; + return retVal; } /** * Mark the fields of this mapping as reserved so that eager fetches can't * get into infinite recursive situations. */ - private FieldMapping createEagerSelects(Select sel, ClassMapping mapping, OpenJPAStateManager sm, - BitSet fields, JDBCFetchConfiguration fetch, int eager) { + private FieldMapping createEagerSelects(Select sel, ClassMapping mapping, + OpenJPAStateManager sm, BitSet fields, JDBCFetchConfiguration fetch, + int eager) { if (mapping == null || eager == JDBCFetchConfiguration.EAGER_NONE) return null; FieldMapping eagerToMany = createEagerSelects(sel, - mapping.getJoinablePCSuperclassMapping(), sm, fields, fetch, eager); + mapping.getJoinablePCSuperclassMapping(), sm, fields, fetch, eager); FieldMapping[] fms = mapping.getDefinedFieldMappings(); boolean inEagerJoin = sel.hasEagerJoin(false); @@ -1439,8 +1240,10 @@ public class JDBCStoreManager implements // finally, try parallel if (eager == EagerFetchModes.EAGER_PARALLEL - && (sels = fms[i].supportsSelect(sel, Select.EAGER_PARALLEL, sm, this, fetch)) != 0) - sel.eagerClone(fms[i], Select.EAGER_PARALLEL, fms[i].isEagerSelectToMany(), sels); + && (sels = fms[i].supportsSelect(sel, Select.EAGER_PARALLEL, sm, + this, fetch)) != 0) + sel.eagerClone(fms[i], Select.EAGER_PARALLEL, + fms[i].isEagerSelectToMany(), sels); } return eagerToMany; } @@ -1452,7 +1255,8 @@ public class JDBCStoreManager implements OpenJPAStateManager sm, BitSet fields, JDBCFetchConfiguration fetch) { if (fields != null) return fields.get(fm.getIndex()); - if (sm != null && sm.getPCState() != PCState.TRANSIENT && sm.getLoaded().get(fm.getIndex())) + if (sm != null && sm.getPCState() != PCState.TRANSIENT + && sm.getLoaded().get(fm.getIndex())) return false; return fetch.requiresFetch(fm) == FetchConfiguration.FETCH_LOAD; } @@ -1472,12 +1276,14 @@ public class JDBCStoreManager implements * @return > 0 if the select is required, 0 if data was * selected but is not required, and < 0 if nothing was selected */ - private int selectBaseMappings(Select sel, ClassMapping mapping, ClassMapping orig, OpenJPAStateManager sm, - BitSet fields, JDBCFetchConfiguration fetch, int eager, FieldMapping eagerToMany, + private int selectBaseMappings(Select sel, ClassMapping mapping, + ClassMapping orig, OpenJPAStateManager sm, BitSet fields, + JDBCFetchConfiguration fetch, int eager, FieldMapping eagerToMany, boolean ident, boolean joined) { ClassMapping parent = mapping.getJoinablePCSuperclassMapping(); if (parent == null && !mapping.isMapped()) - throw new InvalidStateException(_loc.get("virtual-mapping", mapping.getDescribedType())); + throw new InvalidStateException(_loc.get("virtual-mapping", mapping. + getDescribedType())); int seld = -1; int pseld = -1; @@ -1501,18 +1307,23 @@ public class JDBCStoreManager implements seld = 1; // if no instance or no version, select version - if ((sm == null || sm.getVersion() == null) && mapping.getVersion().select(sel, orig)) + if ((sm == null || sm.getVersion() == null) + && mapping.getVersion().select(sel, orig)) seld = 1; - } else { // recurse on parent - pseld = selectBaseMappings(sel, parent, orig, sm, fields, fetch, eager, eagerToMany, ident, joined); + } else { + // recurse on parent + pseld = selectBaseMappings(sel, parent, orig, sm, fields, + fetch, eager, eagerToMany, ident, joined); } - // select the mappings in the given fields set, or based on fetch configuration if no fields given + // select the mappings in the given fields set, or based on fetch + // configuration if no fields given FieldMapping[] fms = mapping.getDefinedFieldMappings(); SelectExecutor esel; int fseld; for (int i = 0; i < fms.length; i++) { - // skip eager to-many select; we do that separately in calling method + // skip eager to-many select; we do that separately in calling + // method if (fms[i] == eagerToMany) continue; @@ -1520,24 +1331,31 @@ public class JDBCStoreManager implements esel = sel.getEager(fms[i]); if (esel != null) { if (esel == sel) - fms[i].selectEagerJoin(sel, sm, this, fetch.traverseJDBC(fms[i]), eager); + fms[i].selectEagerJoin(sel, sm, this, + fetch.traverseJDBC(fms[i]), eager); else - fms[i].selectEagerParallel(esel, sm, this, fetch.traverseJDBC(fms[i]), eager); + fms[i].selectEagerParallel(esel, sm, this, + fetch.traverseJDBC(fms[i]), eager); seld = Math.max(0, seld); } else if (requiresSelect(fms[i], sm, fields, fetch)) { - fseld = fms[i].select(sel, sm, this, fetch.traverseJDBC(fms[i]), eager); + fseld = fms[i].select(sel, sm, this, + fetch.traverseJDBC(fms[i]), eager); seld = Math.max(fseld, seld); } else if (optSelect(fms[i], sel, sm, fetch)) { - fseld = fms[i].select(sel, sm, this, fetch.traverseJDBC(fms[i]), EagerFetchModes.EAGER_NONE); + fseld = fms[i].select(sel, sm, this, + fetch.traverseJDBC(fms[i]), EagerFetchModes.EAGER_NONE); - // don't upgrade seld to > 0 based on these fields, since they're not in the calculated field set + // don't upgrade seld to > 0 based on these fields, since + // they're not in the calculated field set if (fseld >= 0 && seld < 0) seld = 0; } } - // in certain circumstances force join to superclass table to avoid SQL generation error. - if (eagerToMany != null && pseld < 0 && !joined && parent != null) { + // in certain circumstances force join to superclass table to avoid + // SQL generation error. + if ( eagerToMany != null && pseld < 0 && !joined + && parent != null ) { FieldMapping[] pfms = parent.getDefinedFieldMappings(); for (int i = 0; i < pfms.length; i++) { if (pfms[i] == eagerToMany ) { @@ -1547,7 +1365,8 @@ public class JDBCStoreManager implements } } - // join to parent table if the parent / any ancestors have selected anything + // join to parent table if the parent / any ancestors have selected + // anything if (!joined && pseld >= 0 && parent.getTable() != mapping.getTable()) sel.where(mapping.joinSuperclass(sel.newJoins(), false)); @@ -1561,8 +1380,9 @@ public class JDBCStoreManager implements * optimization. */ private boolean optSelect(FieldMapping fm, Select sel, OpenJPAStateManager sm, JDBCFetchConfiguration fetch) { - boolean dfg = fetch.getIgnoreDfgForFkSelect() || - !fm.isInDefaultFetchGroup() && !fm.isDefaultFetchGroupExplicit(); + boolean dfg = + fetch.getIgnoreDfgForFkSelect() || + !fm.isInDefaultFetchGroup() && !fm.isDefaultFetchGroupExplicit(); return dfg && (sm == null || sm.getPCState() == PCState.TRANSIENT || !sm.getLoaded().get(fm.getIndex())) && fm.supportsSelect(sel, Select.TYPE_TWO_PART, sm, this, fetch) > 0; @@ -1577,9 +1397,8 @@ public class JDBCStoreManager implements * @param sm the instance being selected for, or null if none * @param fetch the fetch configuration */ - private void selectSubclassMappings(Select sel, ClassMapping mapping, - OpenJPAStateManager sm, JDBCFetchConfiguration fetch) { - + private void selectSubclassMappings(Select sel, ClassMapping mapping, + OpenJPAStateManager sm, JDBCFetchConfiguration fetch) { loadSubclasses(mapping); ClassMapping[] subMappings = mapping.getJoinablePCSubclassMappings(); if (subMappings.length == 0) @@ -1595,9 +1414,10 @@ public class JDBCStoreManager implements FieldMapping[] fms; boolean joined; boolean canJoin = _dict.joinSyntax != JoinSyntaxes.SYNTAX_TRADITIONAL - && fetch.getSubclassFetchMode(mapping) != JDBCFetchConfiguration.EAGER_NONE; + && fetch.getSubclassFetchMode(mapping) != fetch.EAGER_NONE; for (int i = 0; i < subMappings.length; i++) { - if (!subMappings[i].supportsEagerSelect(sel, sm, this, mapping, fetch)) + if (!subMappings[i].supportsEagerSelect(sel, sm, this, mapping, + fetch)) continue; // initialize so that if we can't join, we pretend we already have @@ -1608,7 +1428,8 @@ public class JDBCStoreManager implements if (fetch.requiresFetch(fms[j]) != FetchConfiguration.FETCH_LOAD && ((!fms[j].isInDefaultFetchGroup() && fms[j].isDefaultFetchGroupExplicit()) - || fms[j].supportsSelect(sel, Select.TYPE_TWO_PART, sm, this, fetch) <= 0)) + || fms[j].supportsSelect(sel, Select.TYPE_TWO_PART, sm, this, + fetch) <= 0)) continue; // if we can join to the subclass, do so; much better chance @@ -1631,8 +1452,10 @@ public class JDBCStoreManager implements * Helper method to join from class to its subclass. Recursive to allow * for multiple hops, starting from the base class. */ - private static Joins joinSubclass(Select sel, ClassMapping base, ClassMapping sub, Joins joins) { - if (sub == base || sub.getTable() == base.getTable() || sel.isSelected(sub.getTable())) + private static Joins joinSubclass(Select sel, ClassMapping base, + ClassMapping sub, Joins joins) { + if (sub == base || sub.getTable() == base.getTable() + || sel.isSelected(sub.getTable())) return null; // recurse first so we go least->most derived @@ -1653,7 +1476,8 @@ public class JDBCStoreManager implements return; // if the subclass list is set, no need to load subs - if (mapping.getRepository().getPersistentTypeNames(false, _ctx.getClassLoader()) != null) { + if (mapping.getRepository().getPersistentTypeNames(false, + _ctx.getClassLoader()) != null) { dsc.setSubclassesLoaded(true); return; } @@ -1681,6 +1505,22 @@ public class JDBCStoreManager implements _stmnts.remove(stmnt); } + FinderQueryImpl getFinder(ClassMapping mapping, FetchConfiguration fetch) { + FinderCache cache = getFinderCache(); + return cache == null + ? null : (FinderQueryImpl)cache.get(mapping, fetch); + } + + boolean cacheFinder(ClassMapping mapping, SelectExecutor select, + FetchConfiguration fetch) { + FinderCache cache = getFinderCache(); + return cache != null && cache.cache(mapping, select, fetch) != null; + } + + FinderCache getFinderCache() { + return (((BrokerImpl)getContext()).getCacheFinderQuery()) + ? getConfiguration().getFinderCacheInstance() : null; + } /** * Connection returned to client code. Makes sure its wrapped connection ref count is decremented on finalize. @@ -1766,24 +1606,27 @@ public class JDBCStoreManager implements } protected Statement createStatement(boolean wrap) throws SQLException { - return new CancelStatement(super.createStatement(false), RefCountConnection.this); + return new CancelStatement(super.createStatement(false), + RefCountConnection.this); } protected Statement createStatement(int rsType, int rsConcur, boolean wrap) throws SQLException { - return new CancelStatement(super.createStatement(rsType, rsConcur, false), RefCountConnection.this); + return new CancelStatement(super.createStatement(rsType, rsConcur, + false), RefCountConnection.this); } protected PreparedStatement prepareStatement(String sql, boolean wrap) throws SQLException { - return new CancelPreparedStatement(super.prepareStatement(sql, false), RefCountConnection.this); + return new CancelPreparedStatement(super.prepareStatement(sql, + false), RefCountConnection.this); } - protected PreparedStatement prepareStatement(String sql, int rsType, int rsConcur, boolean wrap) - throws SQLException { - return new CancelPreparedStatement(super.prepareStatement(sql, rsType, rsConcur, false), - RefCountConnection.this); + protected PreparedStatement prepareStatement(String sql, int rsType, + int rsConcur, boolean wrap) throws SQLException { + return new CancelPreparedStatement(super.prepareStatement(sql, + rsType, rsConcur, false), RefCountConnection.this); } } @@ -1884,9 +1727,11 @@ public class JDBCStoreManager implements * Statement type that adds and removes itself from the set of active * statements so that it can be canceled. */ - private class CancelPreparedStatement extends DelegatingPreparedStatement { + private class CancelPreparedStatement extends + DelegatingPreparedStatement { - public CancelPreparedStatement(PreparedStatement stmnt, Connection conn) { + public CancelPreparedStatement(PreparedStatement stmnt, + Connection conn) { super(stmnt, conn); } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java Mon Feb 13 21:23:54 2012 @@ -83,14 +83,13 @@ import org.apache.openjpa.util.UserExcep * @author Abe White * @nojavadoc */ -@SuppressWarnings({ "serial", "deprecation" }) public class JDBCStoreQuery extends ExpressionStoreQuery { private static final Table INVALID = new Table(); // add all standard filter and aggregate listeners to these maps - private static final Map<String,FilterListener> _listeners = new HashMap<String, FilterListener>(); + private static final Map _listeners = new HashMap(); static { // deprecated extensions @@ -187,8 +186,8 @@ public class JDBCStoreQuery ExpContext ctx = new ExpContext(_store, params, fetch); // add selects with populate WHERE conditions to list - List<Select> sels = new ArrayList<Select>(mappings.length); - List<ClassMapping> selMappings = new ArrayList<ClassMapping>(mappings.length); + List sels = new ArrayList(mappings.length); + List selMappings = new ArrayList(mappings.length); BitSet subclassBits = new BitSet(); BitSet nextBits = new BitSet(); boolean unionable = createWhereSelects(sels, mappings, selMappings, @@ -336,8 +335,8 @@ public class JDBCStoreQuery * Generate the selects with WHERE conditions needed to execute the query * for the given mappings. */ - private boolean createWhereSelects(List<Select> sels, ClassMapping[] mappings, - List<ClassMapping> selMappings, boolean subclasses, BitSet subclassBits, + private boolean createWhereSelects(List sels, ClassMapping[] mappings, + List selMappings, boolean subclasses, BitSet subclassBits, BitSet nextBits, ExpressionFactory[] facts, QueryExpressions[] exps, QueryExpressionsState[] states, ExpContext ctx, int subclassMode) { Number optHint = (Number) ctx.fetch.getHint @@ -365,12 +364,12 @@ public class JDBCStoreQuery else if (this.ctx.isUnique()) sel.setExpectedResultCount(1, false); - List<ClassMapping> selectFrom = getJoinedTableMeta(sel); + List selectFrom = getJoinedTableMeta(sel); int size = 0; if (selectFrom != null) { size = selectFrom.size(); for (int j = 0; j < size; j++) { - ClassMapping vert = selectFrom.get(j); + ClassMapping vert = (ClassMapping)selectFrom.get(j); selMappings.add(vert); if (j == size - 1) { nextBits.set(sels.size()); @@ -389,7 +388,7 @@ public class JDBCStoreQuery nextBits.set(sels.size()); sels.add(sel); } else - sels.add((Select)sel.fullClone(1)); + sels.add(sel.fullClone(1)); } } @@ -401,17 +400,17 @@ public class JDBCStoreQuery return unionable; } - private List<ClassMapping> getJoinedTableMeta(Select sel) { - List<ClassMapping> selectFrom = sel.getJoinedTableClassMeta(); - List<ClassMapping> exSelectFrom = sel.getExcludedJoinedTableClassMeta(); + private List getJoinedTableMeta(Select sel) { + List selectFrom = sel.getJoinedTableClassMeta(); + List exSelectFrom = sel.getExcludedJoinedTableClassMeta(); if (exSelectFrom == null) return selectFrom; if (selectFrom == null) return null; int size = selectFrom.size(); - List<ClassMapping> retList = new ArrayList<ClassMapping>(size); + List retList = new ArrayList(size); for (int i = 0; i < size; i++) { - ClassMapping obj = selectFrom.get(i); + Object obj = selectFrom.get(i); if (!exSelectFrom.contains(obj)) retList.add(obj); } @@ -431,15 +430,15 @@ public class JDBCStoreQuery || !hasVerticalSubclasses(mapping)) return new ClassMapping[] { mapping }; - List<ClassMapping> subs = new ArrayList<ClassMapping>(4); + List subs = new ArrayList(4); addSubclasses(mapping, subs); - return subs.toArray(new ClassMapping[subs.size()]); + return (ClassMapping[]) subs.toArray(new ClassMapping[subs.size()]); } /** * Recursive helper to add mappings for subclasses to the given list. */ - private void addSubclasses(ClassMapping mapping, Collection<ClassMapping> subs) { + private void addSubclasses(ClassMapping mapping, Collection subs) { // possible future optimizations: // - if no fields in meta or its subclasses (and not in an // already-selected table) are in the current fetch @@ -700,8 +699,8 @@ public class JDBCStoreQuery ExpContext ctx = new ExpContext(_store, params, fetch); // add selects with populate WHERE conditions to list - List<Select> sels = new ArrayList<Select>(mappings.length); - List<ClassMapping> selMappings = new ArrayList<ClassMapping>(mappings.length); + List sels = new ArrayList(mappings.length); + List selMappings = new ArrayList(mappings.length); BitSet subclassBits = new BitSet(); BitSet nextBits = new BitSet(); boolean unionable = createWhereSelects(sels, mappings, selMappings, @@ -798,11 +797,11 @@ public class JDBCStoreQuery (org.apache.openjpa.jdbc.kernel.exps.Math) value; Val value1 = mathVal.getVal1(); Object val1 = getValue(value1, ob, params, sm); - Class<?> c1 = value1.getType(); + Class c1 = value1.getType(); Val value2 = mathVal.getVal2(); Object val2 = getValue(value2, ob, params, sm); - Class<?> c2 = value2.getType(); + Class c2 = value2.getType(); String op = mathVal.getOperation(); if (op.equals(org.apache.openjpa.jdbc.kernel.exps.Math.ADD)) @@ -943,7 +942,7 @@ public class JDBCStoreQuery org.apache.openjpa.jdbc.kernel.exps.Abs absVal = (org.apache.openjpa.jdbc.kernel.exps.Abs) value; Object val = getValue(absVal.getValue(), ob, params, sm); - Class<?> c = val.getClass(); + Class c = val.getClass(); if (c == Integer.class) return Integer.valueOf(java.lang.Math.abs(((Integer) val).intValue())); else if (c == Float.class) @@ -960,7 +959,7 @@ public class JDBCStoreQuery org.apache.openjpa.jdbc.kernel.exps.Sqrt sqrtVal = (org.apache.openjpa.jdbc.kernel.exps.Sqrt) value; Object val = getValue(sqrtVal.getValue(), ob, params, sm); - Class<?> c = val.getClass(); + Class c = val.getClass(); if (c == Integer.class) return Double.valueOf(java.lang.Math.sqrt(((Integer) val).doubleValue())); else if (c == Float.class) Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java Mon Feb 13 21:23:54 2012 @@ -32,7 +32,6 @@ import org.apache.openjpa.jdbc.meta.Clas import org.apache.openjpa.jdbc.meta.FieldMapping; import org.apache.openjpa.jdbc.meta.MappingRepository; import org.apache.openjpa.jdbc.schema.Column; -import org.apache.openjpa.jdbc.sql.BindParameter; import org.apache.openjpa.jdbc.sql.LogicalUnion; import org.apache.openjpa.jdbc.sql.SQLBuffer; import org.apache.openjpa.jdbc.sql.SelectExecutor; @@ -431,10 +430,10 @@ public class PreparedQueryImpl implement } } - void setParameters(List<BindParameter> list) { + void setParameters(List list) { Map<Integer, Object> tmp = new HashMap<Integer, Object>(); for (int i = 0; list != null && i < list.size(); i++) { - tmp.put(i, list.get(i).getValue()); + tmp.put(i, list.get(i)); } _template = Collections.unmodifiableMap(tmp); } From commits-return-9379-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 13 21:24:34 2012 Return-Path: <commits-return-9379-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org> X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC39E981B for <apmail-openjpa-commits-archive@www.apache.org>; Mon, 13 Feb 2012 21:24:34 +0000 (UTC) Received: (qmail 78500 invoked by uid 500); 13 Feb 2012 21:24:34 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 78386 invoked by uid 500); 13 Feb 2012 21:24:34 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: <mailto:commits-help@openjpa.apache.org> List-Unsubscribe: <mailto:commits-unsubscribe@openjpa.apache.org> List-Post: <mailto:commits@openjpa.apache.org> List-Id: <commits.openjpa.apache.org> Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 78367 invoked by uid 99); 13 Feb 2012 21:24:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 496EE2388A67 for <commits@openjpa.apache.org>; Mon, 13 Feb 2012 21:23:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1243702 [4/5] - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/... Date: Mon, 13 Feb 2012 21:23:56 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120213212358.496EE2388A67@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java Mon Feb 13 21:23:54 2012 @@ -39,6 +39,7 @@ import java.util.Stack; import java.util.TreeMap; import org.apache.commons.collections.iterators.EmptyIterator; +import org.apache.commons.lang.StringUtils; import org.apache.openjpa.jdbc.conf.JDBCConfiguration; import org.apache.openjpa.jdbc.kernel.EagerFetchModes; import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration; @@ -63,39 +64,11 @@ import org.apache.openjpa.util.Id; import org.apache.openjpa.util.InternalException; /** - * Standard {@link Select} implementation. - * <br> - * This critical construct holds information to form a SQL <tt>SELECT</tt> statement. - * The structure imitates SQL components such a {@link Selects projection terms}, - * {@link SelectImpl#_where <tt>WHERE</tt>} clause, {@link SelectImpl#_ordering - * <tt>ORDER BY</tt>} clause, {@link SelectImpl#_subsels sub-queries} etc. - * It also maintains tables and columns involved in the selection along with - * their join information. - * <br> - * This structure is capable of holding other independent instances for fetching - * data for related fields by either eager or parallel execution. - * <br> - * This instance is {@link #execute(JDBCStore, JDBCFetchConfiguration) executable}. - * After execution, this instance becomes {@link #isReadOnly() immutable} i.e. any - * structural modification is {@link #assertMutable() prohibited}. The only modification - * possible is by {@link #bindParameter(SQLBuffer, Object[], Column[], PathJoins) binding} - * different values to existing {@link BindParameter parameters}. - * <br> - * The {@link SelectResult result} from executing this instance of a <tt>JDBC</tt>-enabled - * database is available for field values to be populated in in-memory persistent entities. - * The access mechanics is critical to performance, and hence an {@link Selects#isOptimizable() - * heuristics} is applied for optimization. - * <br> - * Usage note: - * <LI>a) though this class implements {@link Joins}, it should not be used for - * joining directly. Instead, use the return value of {@link #newJoins}. - * <LI>b) if this instance is concurrently shared based on {@link JDBCConfiguration#getSelectCacheEnabled() - * <tt>openjpa.jdbc.CachesSelect</tt>} setting, then the caller must ensure that the - * parameters are bound in the same or {@link BindParameter#isEquivalent(Thread, Thread) equivalent} - * thread in which this instance is executed. + * Standard {@link Select} implementation. Usage note: though this class + * implements {@link Joins}, it should not be used for joining directly. + * Instead, use the return value of {@link #newJoins}. * * @author Abe White - * @author Pinaki Poddar * @nojavadoc */ public class SelectImpl @@ -144,15 +117,15 @@ public class SelectImpl // field of type Address: // 'address.street' should map to a different table alias than // 'parent.address.street' for the purposes of comparisons - private Map<Object,Integer> _aliases = null; + private Map _aliases = null; // map of indexes to table aliases like 'TABLENAME t0' - private SortedMap<Integer,String> _tables = null; + private SortedMap _tables = null; // combined list of selected ids and map of each id to its alias protected final Selects _selects = newSelects(); - private List<Object> _ordered = null; - private List<Object> _grouped = null; + private List _ordered = null; + private List _grouped = null; // flags private int _flags = 0; @@ -174,15 +147,15 @@ public class SelectImpl // joins to add to the end of our where clause, and joins to prepend to // all selects (see select(classmapping) method) private SelectJoins _joins = null; - private Stack<PathJoins> _preJoins = null; + private Stack _preJoins = null; // map of joins+keys to eager selects and global set of eager keys; the // same key can't be used more than once - private Map<Object,SelectExecutor> _eager = null; - private Set<FieldMapping> _eagerKeys = null; + private Map _eager = null; + private Set _eagerKeys = null; // subselect support - private List<Select> _subsels = null; + private List<SelectImpl> _subsels = null; private SelectImpl _parent = null; private String _subPath = null; private boolean _hasSub = false; @@ -197,10 +170,8 @@ public class SelectImpl // A path navigation is begin with this schema alias private String _schemaAlias = null; private ClassMapping _tpcMeta = null; - private List<ClassMapping> _joinedTables = null; - private List<ClassMapping> _exJoinedTables = null; - - private boolean _readOnly = false; + private List _joinedTables = null; + private List _exJoinedTables = null; public ClassMapping getTablePerClassMeta() { return _tpcMeta; @@ -209,19 +180,19 @@ public class SelectImpl _tpcMeta = meta; } - public void setJoinedTableClassMeta(List<ClassMapping> meta) { + public void setJoinedTableClassMeta(List meta) { _joinedTables = meta; } - public List<ClassMapping> getJoinedTableClassMeta() { + public List getJoinedTableClassMeta() { return _joinedTables; } - public void setExcludedJoinedTableClassMeta(List<ClassMapping> meta) { + public void setExcludedJoinedTableClassMeta(List meta) { _exJoinedTables = meta; } - public List<ClassMapping> getExcludedJoinedTableClassMeta() { + public List getExcludedJoinedTableClassMeta() { return _exJoinedTables; } @@ -283,8 +254,6 @@ public class SelectImpl } public SQLBuffer toSelect(boolean forUpdate, JDBCFetchConfiguration fetch) { - if (_readOnly) - return _full; _full = _dict.toSelect(this, forUpdate, fetch); return _full; } @@ -372,8 +341,10 @@ public class SelectImpl public boolean hasMultipleSelects() { if (_eager == null) return false; - for (Iterator<Map.Entry<Object,SelectExecutor>> itr = _eager.entrySet().iterator(); itr.hasNext();) { - if (itr.next().getValue() != this) + Map.Entry entry; + for (Iterator itr = _eager.entrySet().iterator(); itr.hasNext();) { + entry = (Map.Entry) itr.next(); + if (entry.getValue() != this) return true; } return false; @@ -408,10 +379,12 @@ public class SelectImpl throws SQLException { if (fetch == null) fetch = store.getFetchConfiguration(); - return execute(store.getContext(), store, fetch, fetch.getReadLockLevel()); + return execute(store.getContext(), store, fetch, + fetch.getReadLockLevel()); } - public Result execute(JDBCStore store, JDBCFetchConfiguration fetch, int lockLevel) + public Result execute(JDBCStore store, JDBCFetchConfiguration fetch, + int lockLevel) throws SQLException { if (fetch == null) fetch = store.getFetchConfiguration(); @@ -422,7 +395,8 @@ public class SelectImpl * Execute this select in the context of the given store manager. The * context is passed in separately for profiling purposes. */ - protected Result execute(StoreContext ctx, JDBCStore store, JDBCFetchConfiguration fetch, int lockLevel) + protected Result execute(StoreContext ctx, JDBCStore store, + JDBCFetchConfiguration fetch, int lockLevel) throws SQLException { boolean forUpdate = false; if (!isAggregate() && _grouping == null) { @@ -455,13 +429,9 @@ public class SelectImpl try { conn.close(); } catch (SQLException se2) {} throw se; } - try { - return getEagerResult(conn, stmnt, rs, store, fetch, forUpdate, sql); - } finally { - makeReadOnly(); - } + return getEagerResult(conn, stmnt, rs, store, fetch, forUpdate, sql); } - + /** * Execute our eager selects, adding the results under the same keys * to the given result. @@ -473,9 +443,11 @@ public class SelectImpl return; // execute eager selects + Map.Entry entry; Result eres; - Map<Object,Object> eager; - for (Map.Entry<Object,SelectExecutor> entry : sel._eager.entrySet()) { + Map eager; + for (Iterator itr = sel._eager.entrySet().iterator(); itr.hasNext();) { + entry = (Map.Entry) itr.next(); // simulated batched selects for inner/outer joins; for separate // selects, don't pass on lock level, because they're probably @@ -483,11 +455,12 @@ public class SelectImpl if (entry.getValue() == sel) eres = res; else - eres = entry.getValue().execute(store, fetch); + eres = ((SelectExecutor) entry.getValue()).execute(store, + fetch); eager = res.getEagerMap(false); if (eager == null) { - eager = new HashMap<Object,Object>(); + eager = new HashMap(); res.setEagerMap(eager); } eager.put(entry.getKey(), eres); @@ -574,10 +547,8 @@ public class SelectImpl return 0; } - public List<Select> getSubselects() { - if (_subsels == null) - return Collections.emptyList(); - return _subsels; + public List getSubselects() { + return (_subsels == null) ? Collections.EMPTY_LIST : _subsels; } public Select getParent() { @@ -608,7 +579,7 @@ public class SelectImpl _parent = (SelectImpl) parent; if (_parent != null) { if (_parent._subsels == null) - _parent._subsels = new ArrayList<Select>(2); + _parent._subsels = new ArrayList(2); _parent._subsels.add(this); if (_parent._joinSyntax == JoinSyntaxes.SYNTAX_SQL92) _joinSyntax = JoinSyntaxes.SYNTAX_TRADITIONAL; @@ -625,7 +596,7 @@ public class SelectImpl return _hasSub; } - public Map<Object,Integer> getAliases() { + public Map getAliases() { return _aliases; } @@ -633,7 +604,7 @@ public class SelectImpl _aliases.remove(key); } - public Map<Integer,String> getTables() { + public Map getTables() { return _tables; } @@ -670,21 +641,19 @@ public class SelectImpl return getTableIndex(table, pj, false) != -1; } - public Collection<String> getTableAliases() { - if (_tables == null) - return Collections.emptySet(); - return _tables.values(); + public Collection getTableAliases() { + return (_tables == null) ? Collections.EMPTY_SET : _tables.values(); } - public List<Object> getSelects() { + public List getSelects() { return Collections.unmodifiableList(_selects); } - public List<Object> getSelectAliases() { + public List getSelectAliases() { return _selects.getAliases(false, _outer != null); } - public List<Object> getIdentifierAliases() { + public List getIdentifierAliases() { return _selects.getAliases(true, _outer != null); } @@ -705,14 +674,13 @@ public class SelectImpl } public void addJoinClassConditions() { - assertMutable(); if (_joins == null || _joins.joins() == null) return; // join set iterator allows concurrent modification Join j; - for (Iterator<Join> itr = _joins.joins().iterator(); itr.hasNext();) { - j = itr.next(); + for (Iterator itr = _joins.joins().iterator(); itr.hasNext();) { + j = (Join) itr.next(); if (j.getRelationTarget() != null) { j.getRelationTarget().getDiscriminator().addClassConditions (this, j.getSubclasses() == SUBS_JOINABLE, @@ -726,7 +694,7 @@ public class SelectImpl return _joins; } - public Iterator<Join> getJoinIterator() { + public Iterator getJoinIterator() { if (_joins == null || _joins.isEmpty()) return EmptyIterator.INSTANCE; return _joins.joins().joinIterator(); @@ -774,9 +742,9 @@ public class SelectImpl public String getColumnAlias(Column col, Object path) { Table table = col.getTable(); String tableAlias = null; - Iterator<Join> itr = getJoinIterator(); + Iterator itr = getJoinIterator(); while (itr.hasNext()) { - Join join = itr.next(); + Join join = (Join) itr.next(); if (join != null) { if (join.getTable1() == table) tableAlias = join.getAlias1(); @@ -834,7 +802,6 @@ public class SelectImpl } public void clearSelects() { - assertMutable(); _selects.clear(); } @@ -902,7 +869,6 @@ public class SelectImpl * to count from the back of the select list. */ public void insertPlaceholder(String sql, int pos) { - assertMutable(); Object holder = (_placeholders >= PLACEHOLDERS.length) ? new Placeholder() : PLACEHOLDERS[_placeholders++]; _selects.insertAlias(pos, holder, sql); @@ -912,17 +878,14 @@ public class SelectImpl * Clear selected placeholders, and return removed select indexes. */ public void clearPlaceholderSelects() { - assertMutable(); _selects.clearPlaceholders(); } public boolean select(Column col) { - assertMutable(); return select(col, (Joins) null); } public boolean select(Column col, Joins joins) { - assertMutable(); if (!isGrouping()) return select(col, getJoins(joins, true), false); groupBy(col, joins); @@ -930,12 +893,10 @@ public class SelectImpl } public int select(Column[] cols) { - assertMutable(); return select(cols, null); } public int select(Column[] cols, Joins joins) { - assertMutable(); if (cols == null || cols.length == 0) return 0; if (isGrouping()) { @@ -954,7 +915,6 @@ public class SelectImpl * Select the given column after making the given joins. */ private boolean select(Column col, PathJoins pj, boolean ident) { - assertMutable(); // we cache on column object if there are no joins so that when // looking up columns in the result we don't have to create a string // buffer for the table + column alias; if there are joins, then @@ -976,14 +936,12 @@ public class SelectImpl public void select(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager) { - assertMutable(); select(mapping, subclasses, store, fetch, eager, null); } public void select(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager, Joins joins) { - assertMutable(); select(this, mapping, subclasses, store, fetch, eager, joins, false); } @@ -993,7 +951,6 @@ public class SelectImpl void select(Select wrapper, ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager, Joins joins, boolean ident) { - assertMutable(); // note that this is one case where we don't want to use the result // of getJoins(); just use the given joins, which will either be clean // or the result of previous pre-joins. this way we don't push extra @@ -1010,7 +967,7 @@ public class SelectImpl boolean hasJoins = pj != null && pj.isDirty(); if (hasJoins) { if (_preJoins == null) - _preJoins = new Stack<PathJoins>(); + _preJoins = new Stack(); _preJoins.push(pj); } @@ -1032,12 +989,10 @@ public class SelectImpl } public boolean selectIdentifier(Column col) { - assertMutable(); return selectIdentifier(col, (Joins) null); } public boolean selectIdentifier(Column col, Joins joins) { - assertMutable(); if (!isGrouping()) return select(col, getJoins(joins, true), true); groupBy(col, joins); @@ -1045,12 +1000,10 @@ public class SelectImpl } public int selectIdentifier(Column[] cols) { - assertMutable(); return selectIdentifier(cols, null); } public int selectIdentifier(Column[] cols, Joins joins) { - assertMutable(); if (cols == null || cols.length == 0) return 0; if (isGrouping()) { @@ -1067,24 +1020,20 @@ public class SelectImpl public void selectIdentifier(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager) { - assertMutable(); selectIdentifier(mapping, subclasses, store, fetch, eager, null); } public void selectIdentifier(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, int eager, Joins joins) { - assertMutable(); select(this, mapping, subclasses, store, fetch, eager, joins, true); } public int selectPrimaryKey(ClassMapping mapping) { - assertMutable(); return selectPrimaryKey(mapping, null); } public int selectPrimaryKey(ClassMapping mapping, Joins joins) { - assertMutable(); return primaryKeyOperation(mapping, true, null, joins, false); } @@ -1093,7 +1042,6 @@ public class SelectImpl */ private int primaryKeyOperation(ClassMapping mapping, boolean sel, Boolean asc, Joins joins, boolean aliasOrder) { - assertMutable(); if (!sel && asc == null) return 0; @@ -1150,7 +1098,6 @@ public class SelectImpl */ private boolean columnOperation(Column col, boolean sel, Boolean asc, PathJoins pj, boolean aliasOrder) { - assertMutable(); String as = null; if (asc != null && (aliasOrder || (_flags & RECORD_ORDERED) != 0)) { Object id; @@ -1160,7 +1107,7 @@ public class SelectImpl id = getColumnAlias(col, pj); if ((_flags & RECORD_ORDERED) != 0) { if (_ordered == null) - _ordered = new ArrayList<Object>(5); + _ordered = new ArrayList(5); _ordered.add(id); } if (aliasOrder) { @@ -1181,7 +1128,6 @@ public class SelectImpl * Append ordering information to our internal buffer. */ private void appendOrdering(Object orderBy, boolean asc) { - assertMutable(); if (_ordering == null) _ordering = new SQLBuffer(_dict); else @@ -1217,12 +1163,10 @@ public class SelectImpl } public boolean orderBy(Column col, boolean asc, boolean sel) { - assertMutable(); return orderBy(col, asc, null, sel); } public boolean orderBy(Column col, boolean asc, Joins joins, boolean sel) { - assertMutable(); return orderBy(col, asc, joins, sel, false); } @@ -1231,18 +1175,15 @@ public class SelectImpl */ boolean orderBy(Column col, boolean asc, Joins joins, boolean sel, boolean aliasOrder) { - assertMutable(); return columnOperation(col, sel, (asc) ? Boolean.TRUE : Boolean.FALSE, getJoins(joins, true), aliasOrder); } public int orderBy(Column[] cols, boolean asc, boolean sel) { - assertMutable(); return orderBy(cols, asc, null, sel); } public int orderBy(Column[] cols, boolean asc, Joins joins, boolean sel) { - assertMutable(); return orderBy(cols, asc, joins, sel, false); } @@ -1251,7 +1192,6 @@ public class SelectImpl */ int orderBy(Column[] cols, boolean asc, Joins joins, boolean sel, boolean aliasOrder) { - assertMutable(); PathJoins pj = getJoins(joins, true); int seld = 0; for (int i = 0; i < cols.length; i++) @@ -1261,29 +1201,29 @@ public class SelectImpl return seld; } - public boolean orderBy(SQLBuffer sql, boolean asc, boolean sel, Value selAs) { - assertMutable(); + public boolean orderBy(SQLBuffer sql, boolean asc, boolean sel, Value selAs) + { return orderBy(sql, asc, (Joins) null, sel, selAs); } - public boolean orderBy(SQLBuffer sql, boolean asc, Joins joins, boolean sel, Value selAs) { - assertMutable(); + public boolean orderBy(SQLBuffer sql, boolean asc, Joins joins, + boolean sel, Value selAs) { return orderBy(sql, asc, joins, sel, false, selAs); } /** * Allow unions to set aliases on order columns. */ - boolean orderBy(SQLBuffer sql, boolean asc, Joins joins, boolean sel, boolean aliasOrder, Value selAs) { - assertMutable(); + boolean orderBy(SQLBuffer sql, boolean asc, Joins joins, boolean sel, + boolean aliasOrder, Value selAs) { return orderBy((Object) sql, asc, joins, sel, aliasOrder, selAs); } /** * Order on a SQL buffer or string. */ - private boolean orderBy(Object sql, boolean asc, Joins joins, boolean sel, boolean aliasOrder, Value selAs) { - assertMutable(); + private boolean orderBy(Object sql, boolean asc, Joins joins, boolean sel, + boolean aliasOrder, Value selAs) { Object order = sql; if (aliasOrder) { order = toOrderAlias(_orders++); @@ -1291,7 +1231,7 @@ public class SelectImpl } if ((_flags & RECORD_ORDERED) != 0) { if (_ordered == null) - _ordered = new ArrayList<Object>(5); + _ordered = new ArrayList(5); _ordered.add(selAs == null ? sql : selAs); } @@ -1308,25 +1248,22 @@ public class SelectImpl } public boolean orderBy(String sql, boolean asc, boolean sel) { - assertMutable(); return orderBy(sql, asc, null, sel); } public boolean orderBy(String sql, boolean asc, Joins joins, boolean sel) { - assertMutable(); return orderBy(sql, asc, joins, sel, false); } /** * Allow unions to set aliases on order columns. */ - boolean orderBy(String sql, boolean asc, Joins joins, boolean sel, boolean aliasOrder) { - assertMutable(); + boolean orderBy(String sql, boolean asc, Joins joins, boolean sel, + boolean aliasOrder) { return orderBy((Object) sql, asc, joins, sel, aliasOrder, null); } public void clearOrdering() { - assertMutable(); _ordering = null; _orders = 0; } @@ -1335,9 +1272,9 @@ public class SelectImpl * Allow unions to record the select list indexes of items we order by. */ void setRecordOrderedIndexes(boolean record) { - if (record) { + if (record) _flags |= RECORD_ORDERED; - } else { + else { _ordered = null; _flags &= ~RECORD_ORDERED; } @@ -1347,16 +1284,17 @@ public class SelectImpl * Return the indexes in the select list of all items we're ordering * by, or null if none. For use with unions. */ - List<Integer> getOrderedIndexes() { + List getOrderedIndexes() { if (_ordered == null) return null; - List<Integer> idxs = new ArrayList<Integer>(_ordered.size()); + List idxs = new ArrayList(_ordered.size()); for (int i = 0; i < _ordered.size(); i++) idxs.add(_selects.indexOf(_ordered.get(i))); return idxs; } - public void wherePrimaryKey(Object oid, ClassMapping mapping, JDBCStore store) { + public void wherePrimaryKey(Object oid, ClassMapping mapping, + JDBCStore store) { wherePrimaryKey(oid, mapping, null, store); } @@ -1366,7 +1304,8 @@ public class SelectImpl * primary key, we will recursively join to its superclass until we find * an ancestor that does. */ - private void wherePrimaryKey(Object oid, ClassMapping mapping, Joins joins, JDBCStore store) { + private void wherePrimaryKey(Object oid, ClassMapping mapping, Joins joins, + JDBCStore store) { // if this mapping's identifiers include something other than // the pk values, join to super and recurse if (!mapping.isPrimaryKeyObjectId(false)) { @@ -1379,10 +1318,12 @@ public class SelectImpl } Column[] cols = mapping.getPrimaryKeyColumns(); - where(oid, mapping, cols, cols, null, null, getJoins(joins, true), store); + where(oid, mapping, cols, cols, null, null, getJoins(joins, true), + store); } - public void whereForeignKey(ForeignKey fk, Object oid, ClassMapping mapping, JDBCStore store) { + public void whereForeignKey(ForeignKey fk, Object oid, + ClassMapping mapping, JDBCStore store) { whereForeignKey(fk, oid, mapping, null, store); } @@ -1392,7 +1333,8 @@ public class SelectImpl * * @see #wherePrimaryKey */ - private void whereForeignKey(ForeignKey fk, Object oid, ClassMapping mapping, Joins joins, JDBCStore store) { + private void whereForeignKey(ForeignKey fk, Object oid, + ClassMapping mapping, Joins joins, JDBCStore store) { // if this mapping's identifiers include something other than // the pk values, or if this foreign key doesn't link to only // identifiers, join to table and do a getPrimaryKey @@ -1414,8 +1356,12 @@ public class SelectImpl return; } - where(oid, mapping, fk.getPrimaryKeyColumns(), fk.getColumns(), - fk.getConstants(), fk.getConstantColumns(), getJoins(joins, true), store); + Column[] fromCols = fk.getColumns(); + Column[] toCols = fk.getPrimaryKeyColumns(); + Column[] constCols = fk.getConstantColumns(); + Object[] consts = fk.getConstants(); + where(oid, mapping, toCols, fromCols, consts, constCols, + getJoins(joins, true), store); } /** @@ -1432,78 +1378,52 @@ public class SelectImpl return; } - Object[] params = getBindParameter(oid, mapping, toCols, fromCols, pj, store); - - SQLBuffer buf = isReadOnly() ? _where : new SQLBuffer(_dict); - bindParameter(buf, params, fromCols, pj); - - if (constCols != null && constCols.length > 0) { - bindParameter(buf, vals, constCols, pj); - } - if (!isReadOnly()) { - where(buf, pj); - } - } - - /** - * Gets the binding parameter values to join the given object identifier. - * @param oid the object identifier - * @param mapping the class mapping of the identifier - * @param toCols the target column(s) - * @param fromCols the source column(s) - * @param pj joins - * @param store data store - * @return - */ - Object[] getBindParameter(Object oid, ClassMapping mapping, Column[] toCols, - Column[] fromCols, PathJoins pj, JDBCStore store) { + // only bother to pack pk values into array if app id Object[] pks = null; boolean relationId = RelationStrategies.isRelationId(fromCols); if (!relationId && mapping.getIdentityType() == ClassMapping.ID_APPLICATION) pks = ApplicationIds.toPKValues(oid, mapping); + + SQLBuffer buf = new SQLBuffer(_dict); + Joinable join; Object val; int count = 0; - Joinable join; - Object[] result = new Object[toCols.length]; for (int i = 0; i < toCols.length; i++, count++) { if (pks == null) { val = (oid == null) ? null : relationId ? oid : ((Id) oid).getId(); } else { // must be app identity; use pk index to get correct pk value join = mapping.assertJoinable(toCols[i]); - val = pks[mapping.getField(join.getFieldIndex()).getPrimaryKeyIndex()]; + val = pks[mapping.getField(join.getFieldIndex()). + getPrimaryKeyIndex()]; val = join.getJoinValue(val, toCols[i], store); } - result[i] = val; + + if (count > 0) + buf.append(" AND "); + buf.append(getColumnAlias(fromCols[i], pj)); + if (val == null) + buf.append(" IS "); + else + buf.append(" = "); + buf.appendValue(val, fromCols[i]); } - return result; - } - - /** - * Binds the parameters to the given SQL buffer. - * @param buf a sql buffer - * @param params the parameter values to bind - * @param fromCols the corresponding columns to which the parameters bind. Same size of the values. - * @param pj the joins, if any, for the columns - */ - void bindParameter(SQLBuffer buf, Object[] params, Column[] fromCols, PathJoins pj) { - if (isReadOnly()) { - for (int i = 0; i < params.length; i++) { - buf.bind(params[i], fromCols[i]); - } - return; - } - for (int i = 0; i < params.length; i++) { - if (i > 0) - buf.append(" AND "); - buf.append(getColumnAlias(fromCols[i], pj)); - // WARNING: Potential bug hides here - // A parameter value appearing as null and non-null in two binding operation - // will expose this bug. Requires more structure to BindParameter to accept - // an opcode. - buf.append(params[i] == null ? " IS " : " = "); - buf.appendValue(params[i], fromCols[i]); - } + + if (constCols != null && constCols.length > 0) { + for (int i = 0; i < constCols.length; i++, count++) { + if (count > 0) + buf.append(" AND "); + buf.append(getColumnAlias(constCols[i], pj)); + + if (vals[i] == null) + buf.append(" IS "); + else + buf.append(" = "); + buf.appendValue(vals[i], constCols[i]); + } + } + + where(buf, pj); } /** @@ -1526,22 +1446,22 @@ public class SelectImpl } public void where(Joins joins) { - assertMutable(); if (joins != null) - getJoins(joins, true); + where((String) null, joins); + } + + public void where(SQLBuffer sql) { + where(sql, (Joins) null); } public void where(SQLBuffer sql, Joins joins) { - assertMutable(); - where(joins); - where(sql); + where(sql, getJoins(joins, true)); } /** * Add the given condition to the WHERE clause. */ - public void where(SQLBuffer sql) { - assertMutable(); + private void where(SQLBuffer sql, PathJoins pj) { // no need to use joins... if (sql == null || sql.isEmpty()) return; @@ -1553,14 +1473,34 @@ public class SelectImpl _where.append(sql); } + public void where(String sql) { + where(sql, (Joins) null); + } + + public void where(String sql, Joins joins) { + where(sql, getJoins(joins, true)); + } + + /** + * Add the given condition to the WHERE clause. + */ + private void where(String sql, PathJoins pj) { + // no need to use joins... + if (StringUtils.isEmpty(sql)) + return; + + if (_where == null) + _where = new SQLBuffer(_dict); + else if (!_where.isEmpty()) + _where.append(" AND "); + _where.append(sql); + } public void having(SQLBuffer sql) { - assertMutable(); having(sql, (Joins) null); } public void having(SQLBuffer sql, Joins joins) { - assertMutable(); having(sql, getJoins(joins, true)); } @@ -1568,7 +1508,6 @@ public class SelectImpl * Add the given condition to the HAVING clause. */ private void having(SQLBuffer sql, PathJoins pj) { - assertMutable(); // no need to use joins... if (sql == null || sql.isEmpty()) return; @@ -1580,46 +1519,61 @@ public class SelectImpl _having.append(sql); } + public void having(String sql) { + having(sql, (Joins) null); + } + + public void having(String sql, Joins joins) { + having(sql, getJoins(joins, true)); + } + + /** + * Add the given condition to the HAVING clause. + */ + private void having(String sql, PathJoins pj) { + // no need to use joins... + if (StringUtils.isEmpty(sql)) + return; + + if (_having == null) + _having = new SQLBuffer(_dict); + else if (!_having.isEmpty()) + _having.append(" AND "); + _having.append(sql); + } + public void groupBy(SQLBuffer sql) { - assertMutable(); groupBy(sql, (Joins) null); } public void groupBy(SQLBuffer sql, Joins joins) { - assertMutable(); getJoins(joins, true); groupByAppend(sql.getSQL()); } public void groupBy(String sql) { - assertMutable(); groupBy(sql, (Joins) null); } public void groupBy(String sql, Joins joins) { - assertMutable(); getJoins(joins, true); groupByAppend(sql); } public void groupBy(Column col) { - assertMutable(); groupBy(col, null); } public void groupBy(Column col, Joins joins) { - assertMutable(); PathJoins pj = getJoins(joins, true); groupByAppend(getColumnAlias(col, pj)); } public void groupBy(Column[] cols) { - assertMutable(); groupBy(cols, null); } public void groupBy(Column[] cols, Joins joins) { - assertMutable(); PathJoins pj = getJoins(joins, true); for (int i = 0; i < cols.length; i++) { groupByAppend(getColumnAlias(cols[i], pj)); @@ -1627,11 +1581,10 @@ public class SelectImpl } private void groupByAppend(String sql) { - assertMutable(); if (_grouped == null || !_grouped.contains(sql)) { if (_grouping == null) { _grouping = new SQLBuffer(_dict); - _grouped = new ArrayList<Object>(); + _grouped = new ArrayList(); } else _grouping.append(", "); @@ -1642,13 +1595,11 @@ public class SelectImpl public void groupBy(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch) { - assertMutable(); groupBy(mapping, subclasses, store, fetch, null); } public void groupBy(ClassMapping mapping, int subclasses, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins) { - assertMutable(); // we implement this by putting ourselves into grouping mode, where // all select invocations are re-routed to group-by invocations instead. // this allows us to utilize the same select APIs of the store manager @@ -1657,7 +1608,8 @@ public class SelectImpl boolean wasGrouping = isGrouping(); _flags |= GROUPING; try { - select(mapping, subclasses, store, fetch, EagerFetchModes.EAGER_NONE, joins); + select(mapping, subclasses, store, fetch, + EagerFetchModes.EAGER_NONE, joins); } finally { if (!wasGrouping) _flags &= ~GROUPING; @@ -1671,7 +1623,7 @@ public class SelectImpl private boolean isGrouping() { return (_flags & GROUPING) != 0; } - + /** * Return the joins to use for column aliases, etc. * @@ -1683,14 +1635,14 @@ public class SelectImpl boolean pre = (pj == null || !pj.isDirty()) && _preJoins != null && !_preJoins.isEmpty(); if (pre) - pj = (PathJoins)_preJoins.peek(); + pj = (PathJoins) _preJoins.peek(); if (pj == null || !pj.isDirty()) pj = _joins; else if (!pre) { if ((_flags & OUTER) != 0) pj = (PathJoins) outer(pj); - if (record && !_readOnly) { + if (record) { if (!pj.isEmpty()) { if (_joins == null) _joins = new SelectJoins(this); @@ -1722,9 +1674,9 @@ public class SelectImpl sel._joinSyntax = _joinSyntax; sel._schemaAlias = _schemaAlias; if (_aliases != null) - sel._aliases = new HashMap<Object,Integer>(_aliases); + sel._aliases = new HashMap(_aliases); if (_tables != null) - sel._tables = new TreeMap<Integer,String>(_tables); + sel._tables = new TreeMap(_tables); if (_joins != null) sel._joins = _joins.clone(sel); if (_where != null) @@ -1734,7 +1686,7 @@ public class SelectImpl sel._from._outer = sel; } if (_subsels != null) { - sel._subsels = new ArrayList<Select>(_subsels.size()); + sel._subsels = new ArrayList(_subsels.size()); SelectImpl sub, selSub; for (int j = 0; j < _subsels.size(); j++) { sub = (SelectImpl) _subsels.get(j); @@ -1798,7 +1750,7 @@ public class SelectImpl // global set of eager keys if (_eagerKeys == null) - _eagerKeys = new HashSet<FieldMapping>(); + _eagerKeys = new HashSet(); _eagerKeys.add(key); SelectExecutor sel; @@ -1818,7 +1770,7 @@ public class SelectImpl } if (_eager == null) - _eager = new HashMap<Object,SelectExecutor>(); + _eager = new HashMap(); _eager.put(toEagerKey(key, getJoins(null, false)), sel); return sel; } @@ -1831,8 +1783,9 @@ public class SelectImpl sel._flags &= ~NONAUTO_DISTINCT; sel._eagerKeys = _eagerKeys; if (_preJoins != null && !_preJoins.isEmpty()) { - sel._preJoins = new Stack<PathJoins>(); - sel._preJoins.push(((SelectJoins) _preJoins.peek()).clone(sel)); + sel._preJoins = new Stack(); + sel._preJoins.push(((SelectJoins) _preJoins.peek()). + clone(sel)); } return sel; } @@ -1840,7 +1793,7 @@ public class SelectImpl /** * Return view of eager selects. May be null. */ - public Map<Object,SelectExecutor> getEagerMap() { + public Map getEagerMap() { return _eager; } @@ -1881,7 +1834,6 @@ public class SelectImpl } public void append(SQLBuffer buf, Joins joins) { - assertMutable(); if (joins == null || joins.isEmpty()) return; if (_joinSyntax == JoinSyntaxes.SYNTAX_SQL92) @@ -1890,9 +1842,9 @@ public class SelectImpl if (!buf.isEmpty()) buf.append(" AND "); Join join = null; - for (Iterator<Join> itr = ((PathJoins) joins).joins().joinIterator(); + for (Iterator itr = ((PathJoins) joins).joins().joinIterator(); itr.hasNext();) { - join = itr.next(); + join = (Join) itr.next(); switch (_joinSyntax) { case JoinSyntaxes.SYNTAX_TRADITIONAL: buf.append(_dict.toTraditionalJoin(join)); @@ -1910,7 +1862,6 @@ public class SelectImpl } public Joins and(Joins joins1, Joins joins2) { - assertMutable(); return and((PathJoins) joins1, (PathJoins) joins2, true); } @@ -1922,7 +1873,6 @@ public class SelectImpl * Combine the given joins. */ private SelectJoins and(PathJoins j1, PathJoins j2, boolean nullJoins) { - assertMutable(); if ((j1 == null || j1.isEmpty()) && (j2 == null || j2.isEmpty())) return null; @@ -1960,7 +1910,6 @@ public class SelectImpl } public Joins or(Joins joins1, Joins joins2) { - assertMutable(); PathJoins j1 = (PathJoins) joins1; PathJoins j2 = (PathJoins) joins2; @@ -2020,8 +1969,8 @@ public class SelectImpl Join join; Join rec; boolean hasJoins = _joins != null && _joins.joins() != null; - for (Iterator<Join> itr = pj.joins().iterator(); itr.hasNext();) { - join = itr.next(); + for (Iterator itr = pj.joins().iterator(); itr.hasNext();) { + join = (Join) itr.next(); if (join.getType() == Join.TYPE_INNER) { if (!hasJoins) join.setType(Join.TYPE_OUTER); @@ -2053,8 +2002,8 @@ public class SelectImpl } Join join; - for (Iterator<Join> itr = pj.joins().iterator(); itr.hasNext();) { - join = itr.next(); + for (Iterator itr = pj.joins().iterator(); itr.hasNext();) { + join = (Join) itr.next(); if (join.getType() == Join.TYPE_INNER) { if (join.getForeignKey() != null && !_dict.canOuterJoin(_joinSyntax, join.getForeignKey())) { @@ -2083,7 +2032,7 @@ public class SelectImpl Integer i = null; Object key = table.getFullIdentifier().getName(); if (pj != null && pj.path() != null) - key = new Key(pj.path().toString(), key); + key = new Key(pj.getPathStr(), key); if (_ctx != null && (_parent != null || _subsels != null || _hasSub)) { i = findAliasForQuery(table, pj, key, create); @@ -2102,6 +2051,10 @@ public class SelectImpl // not found; create alias i = aliasSize(false, null); +// System.out.println("GetTableIndex\t"+ +// ((_parent != null) ? "Sub" :"") + +// " created alias: "+ +// i.intValue()+ " "+ key); recordTableAlias(table, key, i); return i.intValue(); } @@ -2151,29 +2104,38 @@ public class SelectImpl (corrVar == null || (thisCtx != null && ctx() == thisCtx))); } - /** - * Find the alias for the key starting lookup in this instance only. - */ private Integer getAlias(Table table, Object key) { - return _aliases == null ? null : _aliases.get(key); + Integer alias = null; + if (_aliases != null) + alias = (Integer) _aliases.get(key); + return alias; } private int createAlias(Table table, Object key) { Integer i = ctx().nextAlias(); +// System.out.println("\t"+ +// ((_parent != null) ? "Sub" :"") + +// "Query created alias: "+ +// i.intValue()+ " "+ key); recordTableAlias(table, key, i); return i.intValue(); } - /** - * Find the alias for the key starting lookup in this instance and searching the parents - * as well if necessary. - */ private Integer findAlias(Table table, Object key) { - Integer alias = getAlias(table, key); - if (alias != null) { - return alias; + Integer alias = null; + if (_aliases != null) { + alias = (Integer) _aliases.get(key); + if (alias != null) { + return alias; + } } - return (_parent != null) ? _parent.findAlias(table, key) : null; + if (_parent != null) { + alias = _parent.findAlias(table, key); + if (alias != null) { + return alias; + } + } + return alias; } /** @@ -2181,13 +2143,13 @@ public class SelectImpl */ private void recordTableAlias(Table table, Object key, Integer alias) { if (_aliases == null) - _aliases = new HashMap<Object,Integer>(); + _aliases = new HashMap(); _aliases.put(key, alias); String tableString = _dict.getFullName(table, false) + " " + toAlias(alias.intValue()); if (_tables == null) - _tables = new TreeMap<Integer,String>(); + _tables = new TreeMap(); _tables.put(alias, tableString); } @@ -2201,9 +2163,9 @@ public class SelectImpl int aliases = (fromParent || _parent == null) ? 0 : _parent.aliasSize(false, this); aliases += (_aliases == null) ? 0 : _aliases.size(); if (_subsels != null) { - for (Select sub : _subsels) { + for (SelectImpl sub : _subsels) { if (sub != fromSub) - aliases += ((SelectImpl)sub).aliasSize(true, null); + aliases += sub.aliasSize(true, null); } } return aliases; @@ -2257,38 +2219,32 @@ public class SelectImpl } public Joins join(ForeignKey fk, boolean inverse, boolean toMany) { - assertMutable(); return new SelectJoins(this).join(fk, inverse, toMany); } public Joins outerJoin(ForeignKey fk, boolean inverse, boolean toMany) { - assertMutable(); return new SelectJoins(this).outerJoin(fk, inverse, toMany); } public Joins joinRelation(String name, ForeignKey fk, ClassMapping target, int subs, boolean inverse, boolean toMany) { - assertMutable(); return new SelectJoins(this).joinRelation(name, fk, target, subs, inverse, toMany); } public Joins outerJoinRelation(String name, ForeignKey fk, ClassMapping target, int subs, boolean inverse, boolean toMany) { - assertMutable(); return new SelectJoins(this).outerJoinRelation(name, fk, target, subs, inverse, toMany); } public Joins setVariable(String var) { - assertMutable(); if (var == null) return this; return new SelectJoins(this).setVariable(var); } public Joins setSubselect(String alias) { - assertMutable(); if (alias == null) return this; return new SelectJoins(this).setSubselect(alias); @@ -2349,6 +2305,10 @@ public class SelectImpl public String toString() { return _path + "|" + _key; } + + Object getKey() { + return _key; + } } /** @@ -2358,11 +2318,12 @@ public class SelectImpl extends ResultSetResult implements PathJoins { - private SelectImpl _sel; + private SelectImpl _sel = null; + private Map<Column, Object> cachedColumnAlias_ = null; // position in selected columns list where we expect the next load private int _pos = 0; - private Stack<Joins> _preJoins = null; + private Stack _preJoins = null; /** * Constructor. @@ -2371,7 +2332,7 @@ public class SelectImpl DBDictionary dict) { super(conn, stmnt, rs, dict); } - + /** * Select for this result. */ @@ -2384,10 +2345,6 @@ public class SelectImpl */ public void setSelect(SelectImpl sel) { _sel = sel; - if (_sel.isReadOnly()) { - _preJoins = new Stack<Joins>(); - _preJoins.push(_sel.getJoins()); - } } public Object getEager(FieldMapping key) { @@ -2395,28 +2352,29 @@ public class SelectImpl // eager results if (_sel._eager == null || !_sel._eagerKeys.contains(key)) return null; - Map<Object,Object> map = SelectResult.this.getEagerMap(true); + Map map = SelectResult.this.getEagerMap(true); if (map == null) return null; - return map.get(SelectImpl.toEagerKey(key, getJoins(null))); + return map.get(_sel.toEagerKey(key, getJoins(null))); } public void putEager(FieldMapping key, Object res) { - Map<Object,Object> map = SelectResult.this.getEagerMap(true); + Map map = SelectResult.this.getEagerMap(true); if (map == null) { - map = new HashMap<Object,Object>(); + map = new HashMap(); setEagerMap(map); } - map.put(SelectImpl.toEagerKey(key, getJoins(null)), res); + map.put(_sel.toEagerKey(key, getJoins(null)), res); } public Object load(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins) throws SQLException { - boolean hasJoins = joins != null && ((PathJoins) joins).path() != null; + boolean hasJoins = joins != null + && ((PathJoins) joins).path() != null; if (hasJoins) { if (_preJoins == null) - _preJoins = new Stack<Joins>(); + _preJoins = new Stack(); _preJoins.push(joins); } @@ -2441,12 +2399,14 @@ public class SelectImpl protected boolean containsInternal(Object obj, Joins joins) { // we key directly on objs and join-less cols, or on the alias // for cols with joins - if (_sel._selects.isOptimizable()) { - return obj instanceof Column && _sel._selects.getObjectIndex((Column)obj) != null; - } PathJoins pj = getJoins(joins); if (pj != null && pj.path() != null) { Object columnAlias = getColumnAlias((Column) obj, pj); + if (joins == null) { + if (cachedColumnAlias_ == null) + cachedColumnAlias_ = new HashMap<Column, Object>(); + cachedColumnAlias_.put((Column) obj, columnAlias); + } return columnAlias != null && _sel._selects.contains(columnAlias); } return obj != null && _sel._selects.contains(obj); @@ -2485,16 +2445,8 @@ public class SelectImpl return super.nextInternal(); } - - /** - * Finds index of the given object with optional join information. - * The index refers to the position of the value in the JDBC result set. - */ protected int findObject(Object obj, Joins joins) throws SQLException { - if (_sel._selects.isOptimizable()) { - return _sel._selects.getObjectIndex((Column)obj); - } if (_pos == _sel._selects.size()) _pos = 0; @@ -2505,16 +2457,21 @@ public class SelectImpl if (pj != null && pj.path() != null) { Column col = (Column) obj; pk = (col.isPrimaryKey()) ? Boolean.TRUE : Boolean.FALSE; - obj = getColumnAlias(col, pj); + if (joins == null && cachedColumnAlias_ != null) { + obj = cachedColumnAlias_.get(col); + if (obj == null) + obj = getColumnAlias(col, pj); + } else { + obj = getColumnAlias(col, pj); + } if (obj == null) throw new SQLException(col.getTable() + ": " + pj.path() + " (" + _sel._aliases + ")"); } // we load in the same order we select, more or less... - if (_sel._selects.get(_pos).equals(obj)) { + if (_sel._selects.get(_pos).equals(obj)) return ++_pos; - } // if we're looking for a primary key, try back a couple places, // since pks might be selected in a slightly different order than @@ -2524,9 +2481,8 @@ public class SelectImpl ? Boolean.TRUE : Boolean.FALSE; if (pk.booleanValue()) { for (int i = _pos - 1; i >= 0 && i >= _pos - 3; i--) - if (_sel._selects.get(i).equals(obj)) { + if (_sel._selects.get(i).equals(obj)) return i + 1; - } } // search forward on the assumption that we might be skipping @@ -2544,9 +2500,8 @@ public class SelectImpl // position marker at its current place cause subsequent loads will // still probably start from there for (int i = 0; i < _pos; i++) - if (_sel._selects.get(i).equals(obj)) { + if (_sel._selects.get(i).equals(obj)) return i + 1; - } // somethings's wrong... throw new SQLException(obj.toString()); @@ -2554,8 +2509,6 @@ public class SelectImpl /** * Return the joins to use to find column data. - * If the given join is non-null and has a path then it is returned. - * Otherwise, returns the {@link #getPreJoins() pre joins}. */ private PathJoins getJoins(Joins joins) { PathJoins pj = (PathJoins) joins; @@ -2565,7 +2518,7 @@ public class SelectImpl } /** - * Return the pre joins for this result, or null if none. Note that + * Return the pre joins for the result, or null if none. Note that * we have to take the Select's pre joins into account too, since * batched selects can have additional pre joins on the stack even * on execution. @@ -2585,14 +2538,15 @@ public class SelectImpl private String getColumnAlias(Column col, PathJoins pj) { String alias; if (_sel._from != null) { - alias = SelectImpl.toAlias(_sel._from.getTableIndex(col.getTable(), pj, false)); + alias = _sel.toAlias(_sel._from.getTableIndex + (col.getTable(), pj, false)); if (alias == null) return null; if (_sel._dict.requiresAliasForSubselect) return FROM_SELECT_ALIAS + "." + alias + "_" + col; return alias + "_" + col; } - alias = SelectImpl.toAlias(_sel.getTableIndex(col.getTable(), pj, false)); + alias = _sel.toAlias(_sel.getTableIndex(col.getTable(), pj, false)); return (alias == null) ? null : alias + "." + col; } @@ -2698,6 +2652,7 @@ public class SelectImpl protected String correlatedVar = null; protected Context context = null; protected Context lastContext = null; + protected String pathStr = null; public Select getSelect() { return null; @@ -2735,6 +2690,10 @@ public class SelectImpl return this; } + public String getVariable() { + return var; + } + public Joins setCorrelatedVariable(String var) { this.correlatedVar = var; return this; @@ -2798,12 +2757,20 @@ public class SelectImpl path = new StringBuilder(str); else path.append('.').append(str); + pathStr = null; } } + public String getPathStr() { + if (pathStr == null) { + pathStr = path.toString(); + } + return pathStr; + } public String toString() { - return "PathJoinsImpl<" + hashCode() + ">: " + String.valueOf(path); + return "PathJoinsImpl<" + hashCode() + ">: " + + String.valueOf(path); } public void moveJoinsToParent() { @@ -3011,24 +2978,25 @@ public class SelectImpl return; } - Integer aliases[] = _sel._aliases.values().toArray(new Integer[_sel._aliases.size()]); + Object aliases[] = _sel._aliases.values().toArray(); boolean found1 = false; boolean found2 = false; for (int i = 0; i < aliases.length; i++) { - int alias = aliases[i].intValue(); + int alias = ((Integer)aliases[i]).intValue(); if (alias == j.getIndex1()) found1 = true; if (alias == j.getIndex2()) found2 = true; } - if (found1 && found2) { + if (found1 && found2) return; - } else if (!found1 && !found2) { + else if (!found1 && !found2) { j.setIsNotMyJoin(); return; - } else { + } + else { j.setCorrelated(); } } @@ -3038,8 +3006,8 @@ public class SelectImpl return; Join j = null; List<Join> removed = new ArrayList<Join>(5); - for (Iterator<Join> itr = _joins.iterator(); itr.hasNext();) { - j = itr.next(); + for (Iterator itr = _joins.iterator(); itr.hasNext();) { + j = (Join) itr.next(); if (j.isNotMyJoin()) { addJoinsToParent(_sel._parent, j); removed.add(j); @@ -3095,7 +3063,6 @@ public class SelectImpl } protected Selects newSelects() { - assertMutable(); return new Selects(); } @@ -3109,36 +3076,35 @@ public class SelectImpl * the alias of each selected id. */ protected static class Selects - extends AbstractList<Object> { + extends AbstractList { - protected List<Object> _ids = null; - protected List<Object> _idents = null; - protected Map<Object,Object> _aliases = null; - protected Map<Object,String> _selectAs = null; + protected List _ids = null; + protected List _idents = null; + protected Map _aliases = null; + protected Map _selectAs = null; protected DBDictionary _dict = null; - /** * Add all aliases from another instance. */ public void addAll(Selects sels) { if (_ids == null && sels._ids != null) - _ids = new ArrayList<Object>(sels._ids); + _ids = new ArrayList(sels._ids); else if (sels._ids != null) _ids.addAll(sels._ids); if (_idents == null && sels._idents != null) - _idents = new ArrayList<Object>(sels._idents); + _idents = new ArrayList(sels._idents); else if (sels._idents != null) _idents.addAll(sels._idents); if (_aliases == null && sels._aliases != null) - _aliases = new HashMap<Object,Object>(sels._aliases); + _aliases = new HashMap(sels._aliases); else if (sels._aliases != null) _aliases.putAll(sels._aliases); if (_selectAs == null && sels._selectAs != null) - _selectAs = new HashMap<Object,String>(sels._selectAs); + _selectAs = new HashMap(sels._selectAs); else if (sels._selectAs != null) _selectAs.putAll(sels._selectAs); } @@ -3155,20 +3121,20 @@ public class SelectImpl */ public int setAlias(Object id, Object alias, boolean ident) { if (_ids == null) { - _ids = new ArrayList<Object>(); - _aliases = new HashMap<Object,Object>(); + _ids = new ArrayList(); + _aliases = new HashMap(); } int idx; - if (_aliases.put(id, alias) != null) { + if (_aliases.put(id, alias) != null) idx = _ids.indexOf(id); - } else { + else { _ids.add(id); idx = _ids.size() - 1; if (ident) { if (_idents == null) - _idents = new ArrayList<Object>(3); + _idents = new ArrayList(3); _idents.add(id); } } @@ -3211,11 +3177,11 @@ public class SelectImpl * A list representation of the aliases, in select order, with * AS aliases present. */ - public List<Object> getAliases(final boolean ident, final boolean inner) { + public List getAliases(final boolean ident, final boolean inner) { if (_ids == null) - return Collections.emptyList(); + return Collections.EMPTY_LIST; - return new AbstractList<Object>() { + return new AbstractList() { public int size() { return (ident && _idents != null) ? _idents.size() : _ids.size(); @@ -3256,7 +3222,7 @@ public class SelectImpl */ public void setSelectAs(Object id, String as) { if (_selectAs == null) - _selectAs = new HashMap<Object,String>((int) (5 * 1.33 + 1)); + _selectAs = new HashMap((int) (5 * 1.33 + 1)); _selectAs.put(id, as); } @@ -3268,7 +3234,7 @@ public class SelectImpl return; Object id; - for (Iterator<Object> itr = _ids.iterator(); itr.hasNext();) { + for (Iterator itr = _ids.iterator(); itr.hasNext();) { id = itr.next(); if (id instanceof Placeholder) { itr.remove(); @@ -3297,71 +3263,7 @@ public class SelectImpl _selectAs = null; _idents = null; } - - // Selected column lookup optimization. - private Boolean _optimizable; - Map<String,Integer> _indices = new HashMap<String, Integer>(); - - /** - * A set of selected terms become optimized for lookup if all the terms - * are columns (may be some with joins) but their names are distinct - * In such case, an index lookup is possible only by the name of the column - * without any need to recompute alias every time (i.e. for every term for - * every row) during lookup. - * <br> - * This routine computes once and only once per instance to determine - * whether such optimization is permissible. - * If {@link JDBCConfiguration#getSelectCacheEnabled()} select caching is in effect, - * then the same {@link Selects projection term} will be reused and such optimization - * may prove useful. - */ - boolean isOptimizable() { - if (_optimizable != null) { - return _optimizable.booleanValue(); - } - _optimizable = true; - int N = size(); - String columnName = null; - for (int i = 0; i < N; i++) { - Object key = get(i); - if (key instanceof Column) { - columnName = ((Column) key).getIdentifier().getName(); - } else if (key instanceof String) { - int dot = ((String)key).lastIndexOf('.'); - if (dot != -1) { - columnName = ((String)key).substring(dot+1); - } - } else { - columnName = null; - } - if (columnName != null && !_indices.containsKey(columnName)) { - _indices.put(columnName, i+1); - } else { - _indices.clear(); - _optimizable = false; - break; - } - } - return _optimizable; - } - - /** - * Gets index of the given column assuming that this instance is optimized. - * @return JDBC index of the given column - * @see #isOptimizable() - */ - Integer getObjectIndex(Column col) { - return _indices.get(col.getIdentifier().getName()); - } - - // for debugging - String toString(Object o) { - if (o == null) return "null"; - return o.toString() + '[' + o.getClass().getSimpleName() + '@' - + Integer.toHexString(System.identityHashCode(o)) + ']'; - } } - // ------------- end of SelectImpl$Selects ----------------------------------------- public Joins setCorrelatedVariable(String var) { if (var == null) @@ -3380,31 +3282,6 @@ public class SelectImpl } public void moveJoinsToParent() { - assertMutable(); - } - - /** - * Affirms if this instance is (structurally) immutable. - */ - public boolean isReadOnly() { - return _readOnly; - } - - /** - * Marks this instance immutable. - */ - private void makeReadOnly() { - _readOnly = true; - } - - /** - * Raises illegal state exception if this instance is immutable. - */ - public void assertMutable() { - if (_readOnly) { - throw new IllegalStateException("Select@" + Integer.toHexString(System.identityHashCode(this)) + - " is read-only"); - } } } @@ -3447,8 +3324,11 @@ interface PathJoins public void nullJoins(); /** - * Gets the select who owns this join. + * The select owner of this join + * @return */ public Select getSelect(); + + public String getPathStr(); } Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingQuery.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingQuery.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingQuery.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingQuery.java Mon Feb 13 21:23:54 2012 @@ -271,14 +271,11 @@ public class DelegatingQuery } } - public void setCandidateType(Class<?> cls, boolean subs) { + public void setCandidateType(Class cls, boolean subs) { try { - lock(); _query.setCandidateType(cls, subs); } catch (RuntimeException re) { throw translate(re); - } finally { - unlock(); } } @@ -292,12 +289,9 @@ public class DelegatingQuery public void setReadOnly(boolean readOnly) { try { - lock(); _query.setReadOnly(readOnly); } catch (RuntimeException re) { throw translate(re); - } finally { - unlock(); } } Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java Mon Feb 13 21:23:54 2012 @@ -27,20 +27,19 @@ import java.util.Comparator; * @author Abe White * @nojavadoc */ -@SuppressWarnings("serial") public class InheritanceComparator implements Comparator, Serializable { - private Class<?> _base = Object.class; + private Class _base = Object.class; /** * Set the least-derived type possible; defaults to <code>null</code>. */ - public void setBase(Class<?> base) { + public void setBase(Class base) { _base = base; } - public Class<?> getBase() { + public Class getBase() { return _base; } @@ -48,8 +47,8 @@ public class InheritanceComparator * Subclasses can override this method to extract the class to compare * on from the elements of the collection. */ - protected Class<?> toClass(Object elem) { - return (Class<?>) elem; + protected Class toClass(Object elem) { + return (Class) elem; } public int compare(Object o1, Object o2) { @@ -60,8 +59,8 @@ public class InheritanceComparator if (o2 == null) return 1; - Class<?> c1 = toClass(o1); - Class<?> c2 = toClass(o2); + Class c1 = toClass(o1); + Class c2 = toClass(o2); if (c1 == c2) return 0; if (c1 == null) @@ -90,7 +89,7 @@ public class InheritanceComparator /** * Count the levels of inheritance between this class and our base class. */ - private int levels(Class<?> to) { + private int levels(Class to) { if (to.isInterface()) return to.getInterfaces().length; for (int i = 0; to != null; i++, to = to.getSuperclass()) Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java Mon Feb 13 21:23:54 2012 @@ -25,11 +25,10 @@ package org.apache.openjpa.meta; * @author Abe White * @nojavadoc */ -@SuppressWarnings("serial") public class MetaDataInheritanceComparator extends InheritanceComparator { - protected Class<?> toClass(Object elem) { + protected Class toClass(Object elem) { if (elem == null) return null; return ((ClassMetaData) elem).getDescribedType(); Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java Mon Feb 13 21:23:54 2012 @@ -106,7 +106,8 @@ public class MetaDataRepository implemen // system sequence private SequenceMetaData _sysSeq = null; - // cache of parsed metadata, oid class to class, and interface class to metadatas + // cache of parsed metadata, oid class to class, and interface class + // to metadatas private Map<Class<?>, ClassMetaData> _metas = new HashMap<Class<?>, ClassMetaData>(); private Map<String, ClassMetaData> _metaStringMap = new ConcurrentHashMap<String, ClassMetaData>(); private Map<Class<?>, Class<?>> _oids = Collections.synchronizedMap(new HashMap<Class<?>, Class<?>>()); @@ -123,8 +124,7 @@ public class MetaDataRepository implemen private Map<Class<?>, Class<?>> _metamodel = Collections.synchronizedMap(new HashMap<Class<?>, Class<?>>()); // map of classes to lists of their subclasses - private Map<Class<?>, Collection<Class<?>>> _subs = - Collections.synchronizedMap(new HashMap<Class<?>, Collection<Class<?>>>()); + private Map<Class<?>, List<Class<?>>> _subs = Collections.synchronizedMap(new HashMap<Class<?>, List<Class<?>>>()); // xml mapping protected final XMLMetaData[] EMPTY_XMLMETAS; @@ -283,7 +283,7 @@ public class MetaDataRepository implemen } /** - * Affirms if this repository will load all known persistent classes at initialization. + * Sets whether this repository will load all known persistent classes at initialization. * Defaults to false. */ public boolean getPreload() { @@ -304,11 +304,11 @@ public class MetaDataRepository implemen * MetaData for all persistent classes and will remove locking from this class. */ public synchronized void preload() { - if (!_preload) { + if (_preload == false) { return; } // If pooling EMFs, this method may be invoked more than once. Only perform this work once. - if (_preloadComplete) { + if (_preloadComplete == true) { return; } @@ -316,7 +316,7 @@ public class MetaDataRepository implemen MultiClassLoader multi = AccessController.doPrivileged(J2DoPrivHelper.newMultiClassLoaderAction()); multi.addClassLoader(AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction())); multi.addClassLoader(AccessController.doPrivileged(J2DoPrivHelper - .getClassLoaderAction(MetaDataRepository.class))); + .getClassLoaderAction(MetaDataRepository.class))); // If a ClassLoader was passed into Persistence.createContainerEntityManagerFactory on the PersistenceUnitInfo // we need to add that loader to the chain of classloaders ClassResolver resolver = _conf.getClassResolverInstance(); @@ -359,7 +359,8 @@ public class MetaDataRepository implemen } } - // Hook in this class as a listener and process registered classes list to populate _aliases list. + // Hook in this class as a listener and process registered classes list to populate _aliases + // list. PCRegistry.addRegisterClassListener(this); processRegisteredClasses(multi); _locking = false; @@ -855,8 +856,9 @@ public class MetaDataRepository implemen } private ClassMetaData[] getMetaDatasInternal() { - // prevent concurrent modification errors when resolving one metadata introduces others - ClassMetaData[] metas = _metas.values().toArray(new ClassMetaData[_metas.size()]); + // prevent concurrent mod errors when resolving one metadata + // introduces others + ClassMetaData[] metas = (ClassMetaData[]) _metas.values().toArray(new ClassMetaData[_metas.size()]); for (int i = 0; i < metas.length; i++) if (metas[i] != null) getMetaData(metas[i].getDescribedType(), metas[i].getEnvClassLoader(), true); @@ -1798,8 +1800,7 @@ public class MetaDataRepository implemen /** * Add the given value to the collection cached in the given map under the given key. */ - private void addToCollection(Map<Class<?>, Collection<Class<?>>> map, Class<?> key, Class<?> value, - boolean inheritance) { + private void addToCollection(Map map, Class<?> key, Class<?> value, boolean inheritance) { if (_locking) { synchronized (map) { addToCollectionInternal(map, key, value, inheritance); @@ -1809,17 +1810,15 @@ public class MetaDataRepository implemen } } - private void addToCollectionInternal(Map<Class<?>, Collection<Class<?>>> map, Class<?> key, - Class<?> value, boolean inheritance) { - Collection<Class<?>> coll = map.get(key); + private void addToCollectionInternal(Map map, Class<?> key, Class<?> value, boolean inheritance) { + Collection coll = (Collection) map.get(key); if (coll == null) { if (inheritance) { InheritanceComparator comp = new InheritanceComparator(); comp.setBase(key); coll = new TreeSet<Class<?>>(comp); - } else { + } else coll = new LinkedList<Class<?>>(); - } map.put(key, coll); } coll.add(value); @@ -1893,7 +1892,7 @@ public class MetaDataRepository implemen _aliases = new HashMap<String, List<Class<?>>>(); _pawares = new HashMap<Class<?>, NonPersistentMetaData>(); _nonMapped = new HashMap<Class<?>, NonPersistentMetaData>(); - _subs = new HashMap<Class<?>, Collection<Class<?>>>(); + _subs = new HashMap<Class<?>, List<Class<?>>>(); // Wait till we're done loading MetaData to flip _lock boolean. } } Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java Mon Feb 13 21:23:54 2012 @@ -58,11 +58,11 @@ import org.apache.openjpa.conf.OpenJPACo public class ImplHelper { // Cache for from/to type assignments - private static final Map<Class<?>,Map<?,?>> _assignableTypes = + private static final Map _assignableTypes = new ConcurrentReferenceHashMap(ReferenceMap.WEAK, ReferenceMap.HARD); // map of all new unenhanced instances active in this classloader - public static final Map<Object,PersistenceCapable> _unenhancedInstanceMap = + public static final Map _unenhancedInstanceMap = new ConcurrentReferenceHashMap(ReferenceMap.WEAK, ReferenceMap.HARD) { protected boolean eq(Object x, Object y) { @@ -91,13 +91,13 @@ public class ImplHelper { * @see StoreManager#loadAll * @since 0.4.0 */ - public static Collection<Object> loadAll(Collection<OpenJPAStateManager> sms, StoreManager store, + public static Collection loadAll(Collection sms, StoreManager store, PCState state, int load, FetchConfiguration fetch, Object context) { - Collection<Object> failed = null; + Collection failed = null; OpenJPAStateManager sm; LockManager lm; - for (Iterator<OpenJPAStateManager> itr = sms.iterator(); itr.hasNext();) { - sm = itr.next(); + for (Iterator itr = sms.iterator(); itr.hasNext();) { + sm = (OpenJPAStateManager) itr.next(); if (sm.getManagedInstance() == null) { if (!store.initialize(sm, state, fetch, context)) failed = addFailedId(sm, failed); @@ -110,23 +110,23 @@ public class ImplHelper { } else if (!store.exists(sm, context)) failed = addFailedId(sm, failed); } - if (failed == null) return Collections.emptyList(); - return failed; + return (failed == null) ? Collections.EMPTY_LIST : failed; } /** * Add identity of given instance to collection. */ - private static Collection<Object> addFailedId(OpenJPAStateManager sm, Collection<Object> failed) { + private static Collection addFailedId(OpenJPAStateManager sm, + Collection failed) { if (failed == null) - failed = new ArrayList<Object>(); + failed = new ArrayList(); failed.add(sm.getId()); return failed; } /** * Generate a value for the given metadata, or return null. Generates - * values for the following strategies: {@link ValueStrategies#SEQUENCE}, + * values for hte following strategies: {@link ValueStrategies#SEQUENCE}, * {@link ValueStrategies#UUID_STRING}, {@link ValueStrategies#UUID_HEX} */ public static Object generateIdentityValue(StoreContext ctx, @@ -136,7 +136,7 @@ public class ImplHelper { /** * Generate a value for the given metadata, or return null. Generates - * values for the following strategies: {@link ValueStrategies#SEQUENCE}, + * values for hte following strategies: {@link ValueStrategies#SEQUENCE}, * {@link ValueStrategies#UUID_STRING}, {@link ValueStrategies#UUID_HEX} */ public static Object generateFieldValue(StoreContext ctx, @@ -218,9 +218,11 @@ public class ImplHelper { * * @since 1.0.0 */ - public static boolean isManagedType(OpenJPAConfiguration conf, Class<?> type) { - return (type != null && PersistenceCapable.class.isAssignableFrom(type) - || ((conf == null || conf.getRuntimeUnenhancedClassesConstant()== RuntimeUnenhancedClassesModes.SUPPORTED) + public static boolean isManagedType(OpenJPAConfiguration conf, Class type) { + return (PersistenceCapable.class.isAssignableFrom(type) + || (type != null + && (conf == null || conf.getRuntimeUnenhancedClassesConstant() + == RuntimeUnenhancedClassesModes.SUPPORTED) && PCRegistry.isRegistered(type))); } @@ -244,7 +246,7 @@ public class ImplHelper { * @param to second class instance to be checked for assignability * @return true if the "to" class is assignable to the "from" class */ - public static boolean isAssignable(Class<?> from, Class<?> to) { + public static boolean isAssignable(Class from, Class to) { if (from == null || to == null) return false; @@ -306,7 +308,8 @@ public class ImplHelper { } } - public static void registerPersistenceCapable(ReflectingPersistenceCapable pc) { + public static void registerPersistenceCapable( + ReflectingPersistenceCapable pc) { _unenhancedInstanceMap.put(pc.getManagedInstance(), pc); } Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java (original) +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataSerializer.java Mon Feb 13 21:23:54 2012 @@ -1511,9 +1511,11 @@ public class AnnotationPersistenceMetaDa * then name order. */ private class FieldComparator - implements Comparator<FieldMetaData> { + implements Comparator { - public int compare(FieldMetaData fmd1, FieldMetaData fmd2) { + public int compare(Object o1, Object o2) { + FieldMetaData fmd1 = (FieldMetaData) o1; + FieldMetaData fmd2 = (FieldMetaData) o2; if (fmd1.isPrimaryKey()) { if (fmd2.isPrimaryKey()) return fmd1.compareTo(fmd2); Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java (original) +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java Mon Feb 13 21:23:54 2012 @@ -87,22 +87,22 @@ public interface OpenJPAQuery<X> extends * Return the candidate collection, or <code>null</code> if an * extent was specified instead of a collection. */ - public Collection<?> getCandidateCollection(); + public Collection getCandidateCollection(); /** * Set a collection of candidates. */ - public OpenJPAQuery<X> setCandidateCollection(Collection<?> coll); + public OpenJPAQuery<X> setCandidateCollection(Collection coll); /** * Query result element type. */ - public Class<?> getResultClass(); + public Class getResultClass(); /** * Query result element type. */ - public OpenJPAQuery<X> setResultClass(Class<?> type); + public OpenJPAQuery<X> setResultClass(Class type); /** * Whether subclasses are included in the query results. @@ -150,7 +150,7 @@ public interface OpenJPAQuery<X> extends /** * Set parameters. */ - public OpenJPAQuery<X> setParameters(Map<?,?> params); + public OpenJPAQuery<X> setParameters(Map params); /** * Set parameters. @@ -169,7 +169,7 @@ public interface OpenJPAQuery<X> extends * * @param params the named parameter map for the query invocation */ - public String[] getDataStoreActions(Map<?,?> params); + public String[] getDataStoreActions(Map params); public OpenJPAQuery<X> setMaxResults(int maxResult); @@ -207,7 +207,7 @@ public interface OpenJPAQuery<X> extends * Gets whether the type of user-supplied bind parameter value and the type of target persistent * property they bind to are checked with strong or weak constraint. * - * @return the boolean state. False by default, i.e. the type of a bind parameter value is checked + * @return the booelan state. False by default, i.e. the type of a bind parameter value is checked * strongly against the target property type. */ public boolean getRelaxBindParameterTypeChecking(); Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java (original) +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java Mon Feb 13 21:23:54 2012 @@ -213,14 +213,14 @@ public class QueryImpl<X> extends Abstra return this; } - public Class<?> getResultClass() { - Class<?> res = _query.getResultType(); + public Class getResultClass() { + Class res = _query.getResultType(); if (res != null) return res; return _query.getCandidateType(); } - public OpenJPAQuery<X> setResultClass(Class<?> cls) { + public OpenJPAQuery<X> setResultClass(Class cls) { _em.assertNotCloseInvoked(); if (ImplHelper.isManagedType(_em.getConfiguration(), cls)) _query.setCandidateType(cls, true); Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml (original) +++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_caching.xml Mon Feb 13 21:23:54 2012 @@ -1351,29 +1351,4 @@ for a JPQL query. </para> </section> - <section id="ref_guide_cache_select"> - <title>Select Cache - - caching - Select Cache - - - OpenJPA generates SQL SELECT statements to fetch database records and populates the persistent entity states - from the result data. Under certain assumptions, these select statements are invariant for an entity - or its relations except that their binding parameters vary between executions. In version 2.2.0, OpenJPA - allows these select statements be reused. Such reuse avoids the cost of regenerating these statements in - every execution. - - - This facility can be activated by openjpa.jdbc.CachesSelect configuration - property. This property accepts boolean value of true or - false. By default, the property value is false. - The property value can be changed once and only once. - - - The assumption that a select statement for a persistent entity is invariant holds only if the fetch plan - is not dynamically modified. OpenJPA runtime currently makes no attempt to ensure that the assumption - is held true i.e. the application is not modifying the fetch plan dynamically. - -
      From commits-return-9380-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 13 21:24:34 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BFCFE9822 for ; Mon, 13 Feb 2012 21:24:34 +0000 (UTC) Received: (qmail 78562 invoked by uid 500); 13 Feb 2012 21:24:34 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 78423 invoked by uid 500); 13 Feb 2012 21:24:34 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 78371 invoked by uid 99); 13 Feb 2012 21:24:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 21:24:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 455AC23889B3 for ; Mon, 13 Feb 2012 21:23:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1243702 [2/5] - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/... Date: Mon, 13 Feb 2012 21:23:56 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120213212358.455AC23889B3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java Mon Feb 13 21:23:54 2012 @@ -31,7 +31,6 @@ import java.util.concurrent.ConcurrentHa import org.apache.openjpa.enhance.PersistenceCapable; import org.apache.openjpa.enhance.Reflection; -import org.apache.openjpa.jdbc.conf.JDBCConfiguration; import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration; import org.apache.openjpa.jdbc.kernel.JDBCStore; import org.apache.openjpa.jdbc.meta.strats.NoneClassStrategy; @@ -45,8 +44,6 @@ import org.apache.openjpa.jdbc.sql.Joins import org.apache.openjpa.jdbc.sql.Result; import org.apache.openjpa.jdbc.sql.RowManager; import org.apache.openjpa.jdbc.sql.Select; -import org.apache.openjpa.jdbc.sql.SelectExecutor; -import org.apache.openjpa.jdbc.sql.Union; import org.apache.openjpa.kernel.FetchConfiguration; import org.apache.openjpa.kernel.OpenJPAStateManager; import org.apache.openjpa.kernel.PCState; @@ -63,22 +60,17 @@ import org.apache.openjpa.util.OpenJPAId /** * Specialization of metadata for relational databases. - *
      - * The mapping may reuse the same {@link SelectExecutor select} if the - * {@link JDBCConfiguration#getSelectCacheEnabled() configuration option} - * instructs to do so. * * @author Abe White - * @author Pinaki Poddar (select caching) */ -@SuppressWarnings("serial") public class ClassMapping extends ClassMetaData implements ClassStrategy { public static final ClassMapping[] EMPTY_MAPPINGS = new ClassMapping[0]; - private static final Localizer _loc = Localizer.forPackage(ClassMapping.class); + private static final Localizer _loc = Localizer.forPackage + (ClassMapping.class); private final ClassMappingInfo _info; private final Discriminator _discrim; @@ -96,9 +88,6 @@ public class ClassMapping // maps columns to joinables private final Map _joinables = new ConcurrentHashMap(); - - private Select _select; - private Union _union; /** * Constructor. Supply described type and owning repository. @@ -1120,48 +1109,4 @@ public class ClassMapping return true; return false; } - - /** - * Gets the {@link Select select} used for selecting instances of this mapping. - * If {@link JDBCConfiguration#getSelectCacheEnabled() aggressive caching} of - * select statements is enabled, then a select is generated for the first call, - * cached in this mapping and subsequently returned. A cached select becomes - * {@link Select#isReadOnly() immutable} i.e. no structural modification is - * allowed after its corresponding SQL has been executed on the database. - * - * @return a new or cached select to select instances of this mapping. - */ - public Select getSelect() { - Select result = _select; - if (result == null) { - JDBCConfiguration conf = (JDBCConfiguration)getMappingRepository().getConfiguration(); - result = conf.getSQLFactoryInstance().newSelect(); - if (conf.getSelectCacheEnabled()) { - _select = result; - } - } - return result; - } - - /** - * Gets the {@link Union union} used for selecting instances of this mapping. - * If {@link JDBCConfiguration#getSelectCacheEnabled() aggressive caching} of - * union statements is enabled, then a union is generated for the first call, - * cached in this mapping and subsequently returned. A cached union becomes - * {@link Select#isReadOnly() immutable} i.e. no structural modification is - * allowed after its corresponding SQL has been executed on the database. - * - * @return a new or cached union to select instances of this mapping. - */ - public Union getUnion(int selects) { - Union result = _union; - if (result == null) { - JDBCConfiguration conf = (JDBCConfiguration)getMappingRepository().getConfiguration(); - result = conf.getSQLFactoryInstance().newUnion(selects); - if (conf.getSelectCacheEnabled()) { - _union = result; - } - } - return result; - } } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java Mon Feb 13 21:23:54 2012 @@ -81,19 +81,19 @@ public class FieldMapping private boolean _outer = false; private int _fetchMode = Integer.MAX_VALUE; private Unique[] _joinTableUniques; // Unique constraints on JoinTable - private Boolean _bidirectionalJoinTableOwner; - private Boolean _bidirectionalJoinTableNonOwner; + private Boolean _bidirectionalJoinTableOwner = null; + private Boolean _bidirectionalJoinTableNonOwner = null; - private Boolean _bidirectionalManyToOneJoinTable; - private Boolean _unidirectionalOneToManyForeignKey; - private Boolean _unidirectionalManyToOneJoinTable; - private Boolean _unidirectionalOneToOneJoinTable; - private Boolean _bidirectionalOneToOneJoinTable; + private Boolean _bi_MTo1_JT = null; + private Boolean _uni_1ToM_FK = null; + private Boolean _uni_MTo1_JT = null; + private Boolean _uni_1To1_JT = null; + private Boolean _bi_1To1_JT = null; - private FieldMapping _bidirectionalOneToManyJoinTableField; - private FieldMapping _bidirectionalManyToOneJoinTableField; - private ForeignKey _bidirectionalOneToManyJoinForeignKey; - private ForeignKey _bidirectionalOneToManyElementForeignKey; + private FieldMapping _bi_1ToM_JT_Field = null; + private FieldMapping _bi_MTo1_JT_Field = null; + private ForeignKey _bi_1ToM_Join_FK = null; + private ForeignKey _bi_1ToM_Elem_FK = null; private boolean _hasMapsIdCols = false; @@ -1271,90 +1271,85 @@ public class FieldMapping return _bidirectionalJoinTableNonOwner.booleanValue(); } - public boolean isBidirectionalManyToOneJoinTable() { - if (_bidirectionalManyToOneJoinTable == null) { - _bidirectionalManyToOneJoinTable = getMappingRepository().isBidirectionalManyToOneJoinTable(this); + public boolean isBiMTo1JT() { + if (_bi_MTo1_JT == null) { + _bi_MTo1_JT = getMappingRepository().isBiMTo1JT(this); } - return _bidirectionalManyToOneJoinTable; + return _bi_MTo1_JT; } - public boolean isUnidirectionalOneToManyForeignKey() { - if (_unidirectionalOneToManyForeignKey == null) - _unidirectionalOneToManyForeignKey = getMappingRepository().isUnidirectionalOneToManyForeignKey(this); - return _unidirectionalOneToManyForeignKey; + public boolean isUni1ToMFK() { + if (_uni_1ToM_FK == null) + _uni_1ToM_FK = getMappingRepository().isUni1ToMFK(this); + return _uni_1ToM_FK; } - public boolean isUnidirectionalManyToOneJoinTable() { - if (_unidirectionalManyToOneJoinTable == null) - _unidirectionalManyToOneJoinTable = getMappingRepository().isUnidirectionalManyToOneJoinTable(this); - return _unidirectionalManyToOneJoinTable; - } - - public boolean isUnidirectionalOneToOneJoinTable() { - if (_unidirectionalOneToOneJoinTable == null) - _unidirectionalOneToOneJoinTable = getMappingRepository().isUnidirectionalOneToOneJoinTable(this); - return _unidirectionalOneToOneJoinTable; - } - - public boolean isBidirectionalOneToOneJoinTable() { - if (_bidirectionalOneToOneJoinTable == null) - _bidirectionalOneToOneJoinTable = getMappingRepository().isBidirectionalOneToOneJoinTable(this); - return _bidirectionalOneToOneJoinTable; + public boolean isUniMTo1JT() { + if (_uni_MTo1_JT == null) + _uni_MTo1_JT = getMappingRepository().isUniMTo1JT(this); + return _uni_MTo1_JT; + } + + public boolean isUni1To1JT() { + if (_uni_1To1_JT == null) + _uni_1To1_JT = getMappingRepository().isUni1To1JT(this); + return _uni_1To1_JT; + } + + public boolean isBi1To1JT() { + if (_bi_1To1_JT == null) + _bi_1To1_JT = getMappingRepository().isBi1To1JT(this); + return _bi_1To1_JT; } - public FieldMapping getBidirectionalOneToManyJoinTableField() { - if (_bidirectionalOneToManyJoinTableField == null) { - _bidirectionalOneToManyJoinTableField = - getMappingRepository().getBidirectionalOneToManyJoinTableField(this); + public FieldMapping getBi_1ToM_JTField() { + if (_bi_1ToM_JT_Field == null) { + _bi_1ToM_JT_Field = getMappingRepository().getBi_1ToM_JoinTableField(this); } - return _bidirectionalOneToManyJoinTableField; + return _bi_1ToM_JT_Field; } - public FieldMapping getBidirectionalManyToOneJoinTableField() { - if (_bidirectionalManyToOneJoinTableField == null) { - _bidirectionalManyToOneJoinTableField = - getMappingRepository().getBidirectionalManyToOneJoinTableField(this); + public FieldMapping getBi_MTo1_JTField() { + if (_bi_MTo1_JT_Field == null) { + _bi_MTo1_JT_Field = getMappingRepository().getBi_MTo1_JoinTableField(this); } - return _bidirectionalManyToOneJoinTableField; + return _bi_MTo1_JT_Field; } - public ForeignKey getBidirectionalOneToManyJoinForeignKey() { - if (_bidirectionalOneToManyJoinForeignKey == null) { - getBidirectionalOneToManyJoinTableField(); - if (_bidirectionalOneToManyJoinTableField != null) - _bidirectionalOneToManyJoinForeignKey = _bidirectionalOneToManyJoinTableField.getJoinForeignKey(); + public ForeignKey getBi1ToMJoinFK() { + if (_bi_1ToM_Join_FK == null) { + getBi_1ToM_JTField(); + if (_bi_1ToM_JT_Field != null) + _bi_1ToM_Join_FK = _bi_1ToM_JT_Field.getJoinForeignKey(); } - return _bidirectionalOneToManyJoinForeignKey; + return _bi_1ToM_Join_FK; } - public ForeignKey getBidirectionalOneToManyElementForeignKey() { - if (_bidirectionalOneToManyElementForeignKey == null) { - getBidirectionalOneToManyJoinTableField(); - if (_bidirectionalOneToManyJoinTableField != null) - _bidirectionalOneToManyElementForeignKey = - _bidirectionalOneToManyJoinTableField.getElementMapping().getForeignKey(); + public ForeignKey getBi1ToMElemFK() { + if (_bi_1ToM_Elem_FK == null) { + getBi_1ToM_JTField(); + if (_bi_1ToM_JT_Field != null) + _bi_1ToM_Elem_FK = _bi_1ToM_JT_Field.getElementMapping().getForeignKey(); } - return _bidirectionalOneToManyElementForeignKey; + return _bi_1ToM_Elem_FK; } - public void setBidirectionalOneToManyJoinTableInfo() { + public void setBi1MJoinTableInfo() { if (getAssociationType() == FieldMetaData.ONE_TO_MANY) { - FieldMapping mapped = getBidirectionalManyToOneJoinTableField(); + FieldMapping mapped = getBi_MTo1_JTField(); if (mapped != null) { FieldMappingInfo info = getMappingInfo(); FieldMappingInfo mappedInfo = mapped.getMappingInfo(); info.setTableIdentifier(mappedInfo.getTableIdentifier()); info.setColumns(mapped.getElementMapping().getValueInfo().getColumns()); - getElementMapping().getValueInfo().setColumns(mappedInfo.getColumns()); + getElementMapping().getValueInfo().setColumns( + mappedInfo.getColumns()); } } } public boolean isNonDefaultMappingUsingJoinTableStrategy() { - return isBidirectionalOneToOneJoinTable() - || isUnidirectionalOneToOneJoinTable() - || isUnidirectionalManyToOneJoinTable() - || isBidirectionalManyToOneJoinTable(); + return isBi1To1JT() || isUni1To1JT() || isUniMTo1JT() || isBiMTo1JT(); } public void setMapsIdCols(boolean hasMapsIdCols) { Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMappingInfo.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMappingInfo.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMappingInfo.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMappingInfo.java Mon Feb 13 21:23:54 2012 @@ -165,7 +165,7 @@ public class FieldMappingInfo public ForeignKey getJoinForeignKey (final FieldMapping field, Table table, boolean adapt) { - if (field.isUnidirectionalOneToManyForeignKey()) { + if (field.isUni1ToMFK()) { List cols = field.getElementMapping().getValueInfo().getColumns(); return getJoin(field, table, adapt, cols); } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java Mon Feb 13 21:23:54 2012 @@ -105,14 +105,15 @@ import org.apache.openjpa.util.UserExcep * * @author Abe White */ -@SuppressWarnings("serial") public class MappingRepository extends MetaDataRepository { - private static final Localizer _loc = Localizer.forPackage(MappingRepository.class); + private static final Localizer _loc = Localizer.forPackage + (MappingRepository.class); private transient DBDictionary _dict = null; private transient MappingDefaults _defaults = null; + // object->queryresultmapping private Map _results = new HashMap(); private SchemaGroup _schema = null; private StrategyInstaller _installer = null; @@ -259,10 +260,12 @@ public class MappingRepository extends M public QueryResultMapping[] getQueryResultMappings() { if (_locking) { synchronized (this) { - return _results.values().toArray(new QueryResultMapping[_results.size()]); + Collection values = _results.values(); + return (QueryResultMapping[]) values.toArray(new QueryResultMapping[values.size()]); } } else { - return _results.values().toArray(new QueryResultMapping[_results.size()]); + Collection values = _results.values(); + return (QueryResultMapping[]) values.toArray(new QueryResultMapping[values.size()]); } } @@ -270,7 +273,7 @@ public class MappingRepository extends M * Return the cached query result mapping with the given name, or null if * none. */ - public QueryResultMapping getCachedQueryResultMapping(Class cls, String name) { + public QueryResultMapping getCachedQueryResultMapping(Class cls, String name) { if (_locking) { synchronized (this) { return (QueryResultMapping) _results.get(getQueryResultKey(cls, name)); @@ -283,7 +286,7 @@ public class MappingRepository extends M /** * Add a query result mapping. */ - public QueryResultMapping addQueryResultMapping(Class cls, String name) { + public QueryResultMapping addQueryResultMapping(Class cls, String name) { if (_locking) { synchronized (this) { return addQueryResultMappingInternal(cls, name); @@ -293,7 +296,7 @@ public class MappingRepository extends M } } - private QueryResultMapping addQueryResultMappingInternal(Class cls, String name) { + private QueryResultMapping addQueryResultMappingInternal(Class cls, String name) { QueryResultMapping res = new QueryResultMapping(name, this); res.setDefiningType(cls); _results.put(getQueryResultKey(res), res); @@ -316,7 +319,7 @@ public class MappingRepository extends M /** * Remove a query result mapping. */ - public boolean removeQueryResultMapping(Class cls, String name) { + public boolean removeQueryResultMapping(Class cls, String name) { if (_locking) { synchronized (this) { if (name == null) @@ -1005,7 +1008,8 @@ public class MappingRepository extends M protected FieldStrategy handlerCollectionStrategy(FieldMapping field, ValueHandler ehandler, boolean installHandlers) { // TODO: JPA 2.0 should ignore this flag and not to serialize - if (getConfiguration().getCompatibilityInstance().getStoreMapCollectionInEntityAsBlob()) + if (getConfiguration().getCompatibilityInstance() + .getStoreMapCollectionInEntityAsBlob()) return null; if (installHandlers) field.getElementMapping().setHandler(ehandler); @@ -1020,7 +1024,8 @@ public class MappingRepository extends M ValueHandler khandler, ValueHandler vhandler, boolean krel, boolean vrel, boolean installHandlers) { // TODO: JPA 2.0 should ignore this flag and not to serialize - if (getConfiguration().getCompatibilityInstance().getStoreMapCollectionInEntityAsBlob()) + if (getConfiguration().getCompatibilityInstance() + .getStoreMapCollectionInEntityAsBlob()) return null; if (installHandlers) { field.getKeyMapping().setHandler(khandler); @@ -1043,13 +1048,14 @@ public class MappingRepository extends M FieldMapping mapped = field.getMappedByMapping(); if (mapped != null) { //bi-/M-1/JoinTable ==> join table strategy - if (isBidirectionalManyToOneJoinTable(field)) + if (isBiMTo1JT(field)) return false; if (mapped.getTypeCode() == JavaTypes.PC || mapped.getTypeCode() == JavaTypes.PC_UNTYPED) return true; if (mapped.getElement().getTypeCode() == JavaTypes.PC) return false; - throw new MetaDataException(_loc.get("bad-mapped-by", field, mapped)); + throw new MetaDataException(_loc.get("bad-mapped-by", field, + mapped)); } // without a mapped-by, we have to look for clues as to the mapping. @@ -1058,84 +1064,82 @@ public class MappingRepository extends M // an association table FieldMappingInfo info = field.getMappingInfo(); ValueMapping elem = field.getElementMapping(); - boolean useInverseKeyMapping = DBIdentifier.isNull(info.getTableIdentifier()) - && info.getColumns().isEmpty() - && !elem.getValueInfo().getColumns().isEmpty(); + boolean useInverseKeyMapping = DBIdentifier.isNull(info.getTableIdentifier()) && info.getColumns().isEmpty() + && !elem.getValueInfo().getColumns().isEmpty(); // JPA 2.0: non-default mapping: uni-/1-M/JoinColumn ==> foreign key strategy - if (isUnidirectionalOneToManyForeignKey(field)) { + if (isUni1ToMFK(field)) { return true; } return useInverseKeyMapping; } public boolean isNonDefaultMappingAllowed() { - return getMetaDataFactory().getDefaults().isNonDefaultMappingAllowed(getConfiguration()); + OpenJPAConfiguration conf = getConfiguration(); + return getMetaDataFactory().getDefaults().isNonDefaultMappingAllowed(conf); } - public boolean isUnidirectionalManyToOneJoinTable(FieldMapping field) { - if (isNonDefaultMappingAllowed() - && field.getAssociationType() == FieldMetaData.MANY_TO_ONE - && hasJoinTable(field) - && !isBidirectional(field)) { + public boolean isUniMTo1JT(FieldMapping field) { + if (isNonDefaultMappingAllowed() && + field.getAssociationType() == FieldMetaData.MANY_TO_ONE && + hasJoinTable(field) && + !isBidirectional(field)) { field.getValueMapping().getValueInfo().setColumns(field.getElementMapping().getValueInfo().getColumns()); return true; } return false; } - public boolean isUnidirectionalOneToOneJoinTable(FieldMapping field) { - if (isNonDefaultMappingAllowed() - && field.getAssociationType() == FieldMetaData.ONE_TO_ONE - && hasJoinTable(field) - && !isBidirectional(field)) { + public boolean isUni1To1JT(FieldMapping field) { + if (isNonDefaultMappingAllowed() && + field.getAssociationType() == FieldMetaData.ONE_TO_ONE && + hasJoinTable(field) && + !isBidirectional(field)) { field.getValueMapping().getValueInfo().setColumns(field.getElementMapping().getValueInfo().getColumns()); return true; } return false; } - public boolean isBidirectionalOneToOneJoinTable(FieldMapping field) { - if (isNonDefaultMappingAllowed() - && field.getAssociationType() == FieldMetaData.ONE_TO_ONE - && hasJoinTable(field) - && isBidirectional(field)) { + public boolean isBi1To1JT(FieldMapping field) { + if (isNonDefaultMappingAllowed() && + field.getAssociationType() == FieldMetaData.ONE_TO_ONE && + hasJoinTable(field) && + isBidirectional(field)) { field.getValueMapping().getValueInfo().setColumns(field.getElementMapping().getValueInfo().getColumns()); return true; } return false; } - public boolean isUnidirectionalOneToManyForeignKey(FieldMapping field) { - if (isNonDefaultMappingAllowed() - && field.getAssociationType() == FieldMetaData.ONE_TO_MANY - && hasJoinColumn(field) - && !isBidirectional(field)) { + public boolean isUni1ToMFK(FieldMapping field) { + if (isNonDefaultMappingAllowed() && + field.getAssociationType() == FieldMetaData.ONE_TO_MANY && + hasJoinColumn(field) && + !isBidirectional(field)) { field.getElementMapping().getValueInfo().setColumns(field.getValueInfo().getColumns()); return true; } return false; } - public boolean isBidirectionalManyToOneJoinTable(FieldMapping field) { + public boolean isBiMTo1JT(FieldMapping field) { FieldMapping mapped = field.getMappedByMapping(); if (isNonDefaultMappingAllowed()) { if (field.getAssociationType() == FieldMetaData.ONE_TO_MANY ) { if (mapped != null && hasJoinTable(mapped)) return true; } else if (field.getAssociationType() == FieldMetaData.MANY_TO_ONE) { - if (getBidirectionalOneToManyJoinTableField(field) != null) + if (getBi_1ToM_JoinTableField(field) != null) return true; } } return false; } - /** - * Gets the inverse field of bidirectional many to one relation using join table strategy - * for the given field. - */ - public FieldMapping getBidirectionalOneToManyJoinTableField(FieldMapping field) { + // return the inverse field of bidirectional many to one + // relation using join table strategy + public FieldMapping getBi_1ToM_JoinTableField(FieldMapping field) { if (isNonDefaultMappingAllowed()) { if (field.getAssociationType() == FieldMetaData.ONE_TO_MANY) { FieldMapping mappedBy = field.getMappedByMapping(); @@ -1155,10 +1159,9 @@ public class MappingRepository extends M return null; } - /** - * Gets the owning field of bidirectional one to many relation using join table strategy of the given field. - */ - public FieldMapping getBidirectionalManyToOneJoinTableField(FieldMapping field) { + // return the owning field of bidirectional one to many + // relation using join table strategy + public FieldMapping getBi_MTo1_JoinTableField(FieldMapping field) { if (isNonDefaultMappingAllowed()) { if (field.getAssociationType() == FieldMetaData.MANY_TO_ONE) { if (!hasJoinTable(field)) Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerFieldStrategy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerFieldStrategy.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerFieldStrategy.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerFieldStrategy.java Mon Feb 13 21:23:54 2012 @@ -37,10 +37,8 @@ import org.apache.openjpa.jdbc.sql.Row; import org.apache.openjpa.jdbc.sql.RowManager; import org.apache.openjpa.jdbc.sql.SQLBuffer; import org.apache.openjpa.jdbc.sql.Select; -import org.apache.openjpa.jdbc.sql.SelectExecutor; import org.apache.openjpa.kernel.OpenJPAStateManager; import org.apache.openjpa.lib.util.Localizer; -import org.apache.openjpa.lib.util.ThreadGate; import org.apache.openjpa.meta.JavaTypes; import org.apache.openjpa.meta.ValueStrategies; import org.apache.openjpa.util.InternalException; @@ -51,26 +49,23 @@ import org.apache.openjpa.util.UserExcep * Mapping for a single-valued field that delegates to a {@link ValueHandler}. * * @author Abe White - * @author Pinaki Poddar (select cache) * @since 0.4.0 */ -@SuppressWarnings("serial") public class HandlerFieldStrategy extends AbstractFieldStrategy implements Joinable, Embeddable { private static final Object NULL = new Object(); - private static final Localizer _loc = Localizer.forPackage(HandlerFieldStrategy.class); + private static final Localizer _loc = Localizer.forPackage + (HandlerFieldStrategy.class); protected Column[] _cols = null; protected ColumnIO _io = null; protected Object[] _args = null; protected boolean _load = false; protected boolean _lob = false; - private Select _executor; - private ThreadGate _lock = new ThreadGate(); - + public void map(boolean adapt) { if (field.getHandler() == null) throw new MetaDataException(_loc.get("no-handler", field)); @@ -225,34 +220,21 @@ public class HandlerFieldStrategy return; } } - Select sel; + + Select sel = store.getSQLFactory().newSelect(); + sel.select(_cols); + field.wherePrimaryKey(sel, sm, store); + + Result res = sel.execute(store, fetch); + Object val = null; try { - _lock.lock(); - if (_executor == null) { - sel = store.getSQLFactory().newSelect(); - if (store.getConfiguration().getSelectCacheEnabled()) { - _executor = sel; - } - sel.select(_cols); - } else { - sel = _executor; - } - - field.wherePrimaryKey(sel, sm, store); - - Result res = sel.execute(store, fetch); - Object val = null; - try { - if (res.next()) - val = HandlerStrategies.loadDataStore(field, res, null, _cols); - } finally { - res.close(); - } - - loadEmbedded(sm, store, fetch, val); + if (res.next()) + val = HandlerStrategies.loadDataStore(field, res, null, _cols); } finally { - _lock.unlock(); + res.close(); } + + loadEmbedded(sm, store, fetch, val); } public Object toDataStoreValue(Object val, JDBCStore store) { Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerRelationMapTableFieldStrategy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerRelationMapTableFieldStrategy.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerRelationMapTableFieldStrategy.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/HandlerRelationMapTableFieldStrategy.java Mon Feb 13 21:23:54 2012 @@ -87,7 +87,7 @@ public class HandlerRelationMapTableFiel union.select(new Union.Selector() { public void select(Select sel, int idx) { sel.select(_kcols); - if (field.isUnidirectionalOneToManyForeignKey()) { + if (field.isUni1ToMFK()) { sel.whereForeignKey(field.getElementMapping().getForeignKey(), sm.getObjectId(), field.getElementMapping().getDeclaredTypeMapping(), store); sel.select(vals[idx], field.getElementMapping(). @@ -146,11 +146,10 @@ public class HandlerRelationMapTableFiel throw new MetaDataException(_loc.get("not-relation", val)); FieldMapping mapped = field.getMappedByMapping(); - if (field.isUnidirectionalOneToManyForeignKey() - || (!field.isBidirectionalManyToOneJoinTable() && mapped != null)) { + if (field.isUni1ToMFK() || (!field.isBiMTo1JT() && mapped != null)) { // map to the owner table handleMappedByForeignKey(adapt); - } else if (field.isBidirectionalManyToOneJoinTable() || mapped == null) { + } else if (field.isBiMTo1JT() || mapped == null) { // map to a separate table field.mapJoin(adapt, true); if (val.getTypeMapping().isMapped()) { @@ -187,11 +186,11 @@ public class HandlerRelationMapTableFiel if (map == null || map.isEmpty()) return; - if (!field.isBidirectionalManyToOneJoinTable() && field.getMappedBy() != null) + if (!field.isBiMTo1JT() && field.getMappedBy() != null) return; Row row = null; - if (!field.isUnidirectionalOneToManyForeignKey()) { + if (!field.isUni1ToMFK()) { row = rm.getSecondaryRow(field.getTable(), Row.ACTION_INSERT); row.setForeignKey(field.getJoinForeignKey(), field.getJoinColumnIO(), sm); @@ -205,7 +204,7 @@ public class HandlerRelationMapTableFiel entry = (Map.Entry) itr.next(); valsm = RelationStrategies.getStateManager(entry.getValue(), ctx); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ row = rm.getRow(field.getElementMapping().getDeclaredTypeMapping().getTable(), Row.ACTION_UPDATE, valsm, true); row.wherePrimaryKey(valsm); @@ -224,7 +223,7 @@ public class HandlerRelationMapTableFiel // from the view point of the owned side PersistenceCapable obj = sm.getPersistenceCapable(); if (!populateKey(row, valsm, obj, ctx, rm, store)) { - if (!field.isUnidirectionalOneToManyForeignKey()) + if (!field.isUni1ToMFK()) rm.flushSecondaryRow(row); } } @@ -239,7 +238,7 @@ public class HandlerRelationMapTableFiel public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException { - if (field.getMappedBy() != null && !field.isBidirectionalManyToOneJoinTable()) + if (field.getMappedBy() != null && !field.isBiMTo1JT()) return; Map map = (Map) sm.fetchObject(field.getIndex()); @@ -270,7 +269,7 @@ public class HandlerRelationMapTableFiel Object mkey; if (canChange && !change.isEmpty()) { Row changeRow = null; - if (!field.isUnidirectionalOneToManyForeignKey()) { + if (!field.isUni1ToMFK()) { changeRow = rm.getSecondaryRow(field.getTable(), Row.ACTION_UPDATE); changeRow.whereForeignKey(field.getJoinForeignKey(), sm); @@ -279,7 +278,7 @@ public class HandlerRelationMapTableFiel for (Iterator itr = change.iterator(); itr.hasNext();) { mkey = itr.next(); valsm = RelationStrategies.getStateManager(map.get(mkey), ctx); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ changeRow = rm.getRow(field.getElementMapping().getDeclaredTypeMapping().getTable(), Row.ACTION_UPDATE, valsm, true); changeRow.wherePrimaryKey(valsm); @@ -289,7 +288,7 @@ public class HandlerRelationMapTableFiel } HandlerStrategies.where(key, mkey, store, changeRow, _kcols); - if (!field.isUnidirectionalOneToManyForeignKey()) + if (!field.isUni1ToMFK()) rm.flushSecondaryRow(changeRow); } } @@ -298,14 +297,14 @@ public class HandlerRelationMapTableFiel Collection rem = ct.getRemoved(); if (!rem.isEmpty() || (!canChange && !change.isEmpty())) { Row delRow = null; - if (!field.isUnidirectionalOneToManyForeignKey()) { + if (!field.isUni1ToMFK()) { delRow = rm.getSecondaryRow(field.getTable(), Row.ACTION_DELETE); delRow.whereForeignKey(field.getJoinForeignKey(), sm); } for (Iterator itr = rem.iterator(); itr.hasNext();) { mkey = itr.next(); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ updateSetNull(sm, mkey, store, rm); } else { HandlerStrategies.where(key, mkey, store, delRow, _kcols); @@ -315,7 +314,7 @@ public class HandlerRelationMapTableFiel if (!canChange && !change.isEmpty()) { for (Iterator itr = change.iterator(); itr.hasNext();) { mkey = itr.next(); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ updateSetNull(sm, mkey, store, rm); } else { HandlerStrategies.where(key, itr.next(), store, delRow, _kcols); @@ -329,7 +328,7 @@ public class HandlerRelationMapTableFiel Collection add = ct.getAdded(); if (!add.isEmpty() || (!canChange && !change.isEmpty())) { Row addRow = null; - if (!field.isUnidirectionalOneToManyForeignKey()) { + if (!field.isUni1ToMFK()) { addRow = rm.getSecondaryRow(field.getTable(), Row.ACTION_INSERT); addRow.setForeignKey(field.getJoinForeignKey(), @@ -338,7 +337,7 @@ public class HandlerRelationMapTableFiel for (Iterator itr = add.iterator(); itr.hasNext();) { mkey = itr.next(); valsm = RelationStrategies.getStateManager(map.get(mkey), ctx); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ addRow = rm.getRow(field.getElementMapping().getDeclaredTypeMapping().getTable(), Row.ACTION_UPDATE, valsm, true); addRow.wherePrimaryKey(valsm); @@ -349,14 +348,14 @@ public class HandlerRelationMapTableFiel HandlerStrategies.set(key, mkey, store, addRow, _kcols, _kio, true); - if (!field.isUnidirectionalOneToManyForeignKey()) + if (!field.isUni1ToMFK()) rm.flushSecondaryRow(addRow); } if (!canChange && !change.isEmpty()) { for (Iterator itr = change.iterator(); itr.hasNext();) { mkey = itr.next(); valsm = RelationStrategies.getStateManager(map.get(mkey), ctx); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ addRow = rm.getRow(field.getElementMapping().getDeclaredTypeMapping().getTable(), Row.ACTION_UPDATE, valsm, true); addRow.wherePrimaryKey(valsm); @@ -367,7 +366,7 @@ public class HandlerRelationMapTableFiel HandlerStrategies.set(key, mkey, store, addRow, _kcols, _kio, true); - if (!field.isUnidirectionalOneToManyForeignKey()) + if (!field.isUni1ToMFK()) rm.flushSecondaryRow(addRow); } } @@ -414,9 +413,9 @@ public class HandlerRelationMapTableFiel public void delete(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException { - if ((field.getMappedBy() != null && !field.isBidirectionalManyToOneJoinTable())) + if ((field.getMappedBy() != null && !field.isBiMTo1JT())) return; - if (field.isUnidirectionalOneToManyForeignKey()) { + if (field.isUni1ToMFK()) { Map mapObj = (Map)sm.fetchObject(field.getIndex()); updateSetNull(sm, store, rm, mapObj.keySet()); return; Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MapTableFieldStrategy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MapTableFieldStrategy.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MapTableFieldStrategy.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MapTableFieldStrategy.java Mon Feb 13 21:23:54 2012 @@ -112,10 +112,10 @@ public abstract class MapTableFieldStrat throw new MetaDataException(_loc.get("mapped-by-key", field)); // Non-default mapping Uni-/OneToMany/ForeignKey allows schema components - if (field.isUnidirectionalOneToManyForeignKey()) + if (field.isUni1ToMFK()) return; - if (field.isBidirectionalManyToOneJoinTable()) - field.setBidirectionalOneToManyJoinTableInfo(); + if (field.isBiMTo1JT()) + field.setBi1MJoinTableInfo(); field.getValueInfo().assertNoSchemaComponents(field, !adapt); } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationFieldStrategy.java Mon Feb 13 21:23:54 2012 @@ -28,7 +28,6 @@ import java.util.Set; import org.apache.openjpa.enhance.PersistenceCapable; import org.apache.openjpa.enhance.ReflectingPersistenceCapable; -import org.apache.openjpa.jdbc.conf.JDBCConfiguration; import org.apache.openjpa.jdbc.identifier.DBIdentifier; import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration; import org.apache.openjpa.jdbc.kernel.JDBCStore; @@ -38,6 +37,7 @@ import org.apache.openjpa.jdbc.meta.Fiel import org.apache.openjpa.jdbc.meta.FieldStrategy; import org.apache.openjpa.jdbc.meta.Joinable; import org.apache.openjpa.jdbc.meta.MappingInfo; +import org.apache.openjpa.jdbc.meta.ValueHandler; import org.apache.openjpa.jdbc.meta.ValueMapping; import org.apache.openjpa.jdbc.meta.ValueMappingImpl; import org.apache.openjpa.jdbc.meta.ValueMappingInfo; @@ -55,14 +55,13 @@ import org.apache.openjpa.jdbc.sql.SQLBu import org.apache.openjpa.jdbc.sql.Select; import org.apache.openjpa.jdbc.sql.SelectExecutor; import org.apache.openjpa.jdbc.sql.Union; +import org.apache.openjpa.kernel.LockManager; import org.apache.openjpa.kernel.OpenJPAStateManager; import org.apache.openjpa.lib.log.Log; import org.apache.openjpa.lib.util.Localizer; -import org.apache.openjpa.lib.util.ThreadGate; import org.apache.openjpa.meta.ClassMetaData; import org.apache.openjpa.meta.FieldMetaData; import org.apache.openjpa.meta.JavaTypes; -import org.apache.openjpa.meta.MetaDataModes; import org.apache.openjpa.util.ApplicationIds; import org.apache.openjpa.util.ImplHelper; import org.apache.openjpa.util.InternalException; @@ -75,34 +74,27 @@ import org.apache.openjpa.util.Unsupport /** * Mapping for a single-valued relation to another entity. * - *
      - * The strategy may reuse the same {@link SelectExecutor select} if the - * {@link JDBCConfiguration#getSelectCacheEnabled() configuration option} - * instructs to do so. - * @author Abe White - * @author Pinaki Poddar (select caching) * @since 0.4.0 */ -@SuppressWarnings("serial") public class RelationFieldStrategy extends AbstractFieldStrategy implements Joinable, Embeddable { - private static final Localizer _loc = Localizer.forPackage(RelationFieldStrategy.class); + private static final Localizer _loc = Localizer.forPackage + (RelationFieldStrategy.class); private Boolean _fkOid = null; - private SelectExecutor _executor; - private ThreadGate _lock = new ThreadGate(); - public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.PC || field.isEmbeddedPC()) throw new MetaDataException(_loc.get("not-relation", field)); - field.getKeyMapping().getValueInfo().assertNoSchemaComponents(field.getKey(), !adapt); + field.getKeyMapping().getValueInfo().assertNoSchemaComponents + (field.getKey(), !adapt); if (!field.isNonDefaultMappingUsingJoinTableStrategy()) - field.getElementMapping().getValueInfo().assertNoSchemaComponents(field.getElement(), !adapt); + field.getElementMapping().getValueInfo().assertNoSchemaComponents + (field.getElement(), !adapt); boolean criteria = field.getValueInfo().getUseClassCriteria(); // check for named inverse @@ -110,33 +102,40 @@ public class RelationFieldStrategy if (mapped != null) { field.getMappingInfo().assertNoSchemaComponents(field, !adapt); field.getValueInfo().assertNoSchemaComponents(field, !adapt); - mapped.resolve(MetaDataModes.MODE_META | MetaDataModes.MODE_MAPPING); + mapped.resolve(mapped.MODE_META | mapped.MODE_MAPPING); if (!mapped.isMapped() || mapped.isSerialized()) - throw new MetaDataException(_loc.get("mapped-by-unmapped", field, mapped)); + throw new MetaDataException(_loc.get("mapped-by-unmapped", + field, mapped)); if (mapped.getTypeCode() == JavaTypes.PC) { - if (mapped.getJoinDirection() == FieldMapping.JOIN_FORWARD) { - field.setJoinDirection(FieldMapping.JOIN_INVERSE); - field.setColumns(mapped.getDefiningMapping().getPrimaryKeyColumns()); + if (mapped.getJoinDirection() == mapped.JOIN_FORWARD) { + field.setJoinDirection(field.JOIN_INVERSE); + field.setColumns(mapped.getDefiningMapping(). + getPrimaryKeyColumns()); } else if (isTypeUnjoinedSubclass(mapped)) throw new MetaDataException(_loc.get - ("mapped-inverse-unjoined", field.getName(), field.getDefiningMapping(), mapped)); + ("mapped-inverse-unjoined", field.getName(), + field.getDefiningMapping(), mapped)); - field.setForeignKey(mapped.getForeignKey(field.getDefiningMapping())); + field.setForeignKey(mapped.getForeignKey + (field.getDefiningMapping())); } else if (mapped.getElement().getTypeCode() == JavaTypes.PC) { if (isTypeUnjoinedSubclass(mapped.getElementMapping())) throw new MetaDataException(_loc.get - ("mapped-inverse-unjoined", field.getName(), field.getDefiningMapping(), mapped)); + ("mapped-inverse-unjoined", field.getName(), + field.getDefiningMapping(), mapped)); // warn the user about making the collection side the owner Log log = field.getRepository().getLog(); if (log.isInfoEnabled()) log.info(_loc.get("coll-owner", field, mapped)); - field.setForeignKey(mapped.getElementMapping().getForeignKey()); - } else { - throw new MetaDataException(_loc.get("not-inv-relation", field, mapped)); - } + field.setForeignKey(mapped.getElementMapping(). + getForeignKey()); + } else + throw new MetaDataException(_loc.get("not-inv-relation", + field, mapped)); + field.setUseClassCriteria(criteria); return; } @@ -158,22 +157,24 @@ public class RelationFieldStrategy field.getMappingInfo().setColumns(null); } - if (!field.isBidirectionalManyToOneJoinTable()) + if (!field.isBiMTo1JT()) field.mapJoin(adapt, false); if (field.getTypeMapping().isMapped()) { if (field.getMappedByIdValue() != null) setMappedByIdColumns(); - if (!field.isBidirectionalManyToOneJoinTable()) { - ForeignKey fk = vinfo.getTypeJoin(field, field.getName(), true, adapt); + if (!field.isBiMTo1JT()) { + ForeignKey fk = vinfo.getTypeJoin(field, field.getName(), true, + adapt); field.setForeignKey(fk); } field.setColumnIO(vinfo.getColumnIO()); - if (vinfo.getJoinDirection() == MappingInfo.JOIN_INVERSE) - field.setJoinDirection(FieldMapping.JOIN_INVERSE); - } else { - RelationStrategies.mapRelationToUnmappedPC(field, field.getName(), adapt); - } + if (vinfo.getJoinDirection() == vinfo.JOIN_INVERSE) + field.setJoinDirection(field.JOIN_INVERSE); + } else + RelationStrategies.mapRelationToUnmappedPC(field, field.getName(), + adapt); + field.setUseClassCriteria(criteria); field.mapPrimaryKey(adapt); PrimaryKey pk = field.getTable().getPrimaryKey(); @@ -208,10 +209,11 @@ public class RelationFieldStrategy } } - private List getMappedByIdColumns(FieldMapping pk) { - ClassMetaData embeddedId = ((ValueMappingImpl)pk.getValue()).getEmbeddedMetaData(); + private List getMappedByIdColumns(FieldMapping pk) { + ClassMetaData embeddedId = ((ValueMappingImpl)pk.getValue()). + getEmbeddedMetaData(); Column[] pkCols = null; - List cols = new ArrayList(); + List cols = new ArrayList(); String mappedByIdValue = field.getMappedByIdValue(); if (embeddedId != null) { FieldMetaData[] fmds = embeddedId.getFields(); @@ -219,19 +221,20 @@ public class RelationFieldStrategy if ((fmds[i].getName().equals(mappedByIdValue)) || mappedByIdValue.length() == 0) { if (fmds[i].getValue().getEmbeddedMetaData() != null) { - EmbedValueHandler.getEmbeddedIdCols((FieldMapping)fmds[i], cols); - } else { - EmbedValueHandler.getIdColumns((FieldMapping)fmds[i], cols); - } + EmbedValueHandler.getEmbeddedIdCols( + (FieldMapping)fmds[i], cols); + } else + EmbedValueHandler.getIdColumns( + (FieldMapping)fmds[i], cols); } } return cols; } else { // primary key is single-value - Class pkType = pk.getDeclaredType(); + Class pkType = pk.getDeclaredType(); FieldMetaData[] pks = field.getValue().getDeclaredTypeMetaData(). getPrimaryKeyFields(); if (pks.length != 1 || pks[0].getDeclaredType() != pkType) - return Collections.emptyList(); + return Collections.EMPTY_LIST; pkCols = pk.getColumns(); for (int i = 0; i < pkCols.length; i++) cols.add(pkCols[i]); @@ -268,11 +271,11 @@ public class RelationFieldStrategy OpenJPAStateManager rel = RelationStrategies.getStateManager (sm.fetchObjectField(field.getIndex()), store.getContext()); - if (field.getJoinDirection() == FieldMapping.JOIN_INVERSE) + if (field.getJoinDirection() == field.JOIN_INVERSE) updateInverse(sm, rel, store, rm); else { Row row = field.getRow(sm, store, rm, Row.ACTION_INSERT); - if (row != null && !field.isBidirectionalManyToOneJoinTable()) { + if (row != null && !field.isBiMTo1JT()) { field.setForeignKey(row, rel); // this is for bi-directional maps, the key and value of the // map are stored in the table of the mapped-by entity @@ -292,7 +295,7 @@ public class RelationFieldStrategy if (mapField == null) return; - Map mapObj = (Map)rel.fetchObjectField(mapField.getIndex()); + Map mapObj = (Map)rel.fetchObjectField(mapField.getIndex()); Object keyObj = getMapKeyObj(mapObj, sm.getPersistenceCapable()); ValueMapping key = mapField.getKeyMapping(); if (!key.isEmbedded()) { @@ -308,11 +311,14 @@ public class RelationFieldStrategy } else { // key is an embeddable or basic type FieldStrategy strategy = mapField.getStrategy(); - if (strategy instanceof HandlerRelationMapTableFieldStrategy) { - HandlerRelationMapTableFieldStrategy strat = (HandlerRelationMapTableFieldStrategy) strategy; + if (strategy instanceof + HandlerRelationMapTableFieldStrategy) { + HandlerRelationMapTableFieldStrategy strat = + (HandlerRelationMapTableFieldStrategy) strategy; Column[] kcols = strat.getKeyColumns((ClassMapping)meta); ColumnIO kio = strat.getKeyColumnIO(); - HandlerStrategies.set(key, keyObj, store, row, kcols, kio, true); + HandlerStrategies.set(key, keyObj, store, row, kcols, + kio, true); } } } @@ -321,18 +327,19 @@ public class RelationFieldStrategy FieldMapping[] fields = ((ClassMapping)meta).getFieldMappings(); for (int i = 0; i < fields.length; i++) { FieldMetaData mappedBy = fields[i].getMappedByMetaData(); - if (fields[i].getDeclaredTypeCode() == JavaTypes.MAP && mappedBy == field) + if (fields[i].getDeclaredTypeCode() == JavaTypes.MAP && + mappedBy == field) return fields[i]; } return null; } - private Object getMapKeyObj(Map mapObj, Object value) { + private Object getMapKeyObj(Map mapObj, Object value) { if (value instanceof ReflectingPersistenceCapable) value = ((ReflectingPersistenceCapable)value).getManagedInstance(); - Set> entries = mapObj.entrySet(); - for (Map.Entry entry : entries) { + Set entries = mapObj.entrySet(); + for (Map.Entry entry : entries) { if (entry.getValue() == value) return entry.getKey(); } @@ -348,7 +355,7 @@ public class RelationFieldStrategy OpenJPAStateManager rel = RelationStrategies.getStateManager (sm.fetchObjectField(field.getIndex()), store.getContext()); - if (field.getJoinDirection() == FieldMapping.JOIN_INVERSE) { + if (field.getJoinDirection() == field.JOIN_INVERSE) { nullInverse(sm, rm); updateInverse(sm, rel, store, rm); } else { @@ -356,22 +363,22 @@ public class RelationFieldStrategy field.isBidirectionalJoinTableMappingNonOwner()) ? Row.ACTION_DELETE : Row.ACTION_UPDATE; Row row = field.getRow(sm, store, rm, action); - if (row != null && !field.isBidirectionalManyToOneJoinTable()) { + if (row != null && !field.isBiMTo1JT()) { field.setForeignKey(row, rel); // this is for bi-directional maps, the key and value of the // map are stored in the table of the mapped-by entity setMapKey(sm, rel, store, row); } - if (field.isBidirectionalManyToOneJoinTable()) { // also need to update the join table + if (field.isBiMTo1JT()) { // also need to update the join table PersistenceCapable invPC = (PersistenceCapable)sm.fetchObject( - field.getBidirectionalOneToManyJoinTableField().getIndex()); + field.getBi_1ToM_JTField().getIndex()); Row secondaryRow = null; if (invPC != null) { - secondaryRow = rm.getSecondaryRow(field.getBidirectionalOneToManyJoinForeignKey().getTable(), + secondaryRow = rm.getSecondaryRow(field.getBi1ToMJoinFK().getTable(), Row.ACTION_INSERT); - secondaryRow.setForeignKey(field.getBidirectionalOneToManyElementForeignKey(), null, sm); - secondaryRow.setForeignKey(field.getBidirectionalOneToManyJoinForeignKey(), null, + secondaryRow.setForeignKey(field.getBi1ToMElemFK(), null, sm); + secondaryRow.setForeignKey(field.getBi1ToMJoinFK(), null, RelationStrategies.getStateManager(invPC, store.getContext())); rm.flushSecondaryRow(secondaryRow); @@ -385,7 +392,7 @@ public class RelationFieldStrategy if (field.getMappedBy() != null) return; - if (field.getJoinDirection() == FieldMapping.JOIN_INVERSE) { + if (field.getJoinDirection() == field.JOIN_INVERSE) { if (sm.getLoaded().get(field.getIndex())) { OpenJPAStateManager rel = RelationStrategies.getStateManager(sm. fetchObjectField(field.getIndex()), store.getContext()); @@ -497,7 +504,7 @@ public class RelationFieldStrategy public int supportsSelect(Select sel, int type, OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch) { if (type == Select.TYPE_JOINLESS) - return (field.getJoinDirection() != FieldMapping.JOIN_INVERSE + return (field.getJoinDirection() != field.JOIN_INVERSE && sel.isSelected(field.getTable())) ? 1 : 0; if (type == Select.TYPE_TWO_PART) return 1; @@ -528,15 +535,17 @@ public class RelationFieldStrategy final OpenJPAStateManager sm, final JDBCStore store, final JDBCFetchConfiguration fetch, final int eagerMode) { final ClassMapping[] clss = field.getIndependentTypeMappings(); - if (!(sel instanceof Union)) { + if (!(sel instanceof Union)) selectEagerParallel((Select) sel, clss[0], store, fetch, eagerMode); - } else { + else { Union union = (Union) sel; - if (fetch.getSubclassFetchMode (field.getTypeMapping()) != JDBCFetchConfiguration.EAGER_JOIN) + if (fetch.getSubclassFetchMode (field.getTypeMapping()) + != JDBCFetchConfiguration.EAGER_JOIN) union.abortUnion(); union.select(new Union.Selector() { public void select(Select sel, int idx) { - selectEagerParallel(sel, clss[idx], store, fetch, eagerMode); + selectEagerParallel(sel, clss[idx], store, fetch, + eagerMode); } }); } @@ -547,7 +556,7 @@ public class RelationFieldStrategy */ private void selectEagerParallel(Select sel, ClassMapping cls, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode) { - if (field.isBidirectionalManyToOneJoinTable()) + if (field.isBiMTo1JT()) return; sel.selectPrimaryKey(field.getDefiningMapping()); // set a variable name that does not conflict with any in the query; @@ -562,7 +571,7 @@ public class RelationFieldStrategy public void selectEagerJoin(Select sel, OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode) { - if (field.isBidirectionalManyToOneJoinTable()) + if (field.isBiMTo1JT()) return; // limit the eager mode to single on recursive eager fetching b/c @@ -581,7 +590,7 @@ public class RelationFieldStrategy * Add the joins needed to select/load eager data. */ private Joins eagerJoin(Joins joins, ClassMapping cls, boolean forceInner) { - boolean inverse = field.getJoinDirection() == FieldMapping.JOIN_INVERSE; + boolean inverse = field.getJoinDirection() == field.JOIN_INVERSE; if (!inverse) { joins = join(joins, false); joins = setEmbeddedVariable(joins); @@ -609,7 +618,7 @@ public class RelationFieldStrategy public int select(Select sel, OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode) { - if (field.getJoinDirection() == FieldMapping.JOIN_INVERSE) + if (field.getJoinDirection() == field.JOIN_INVERSE) return -1; // already cached oid? if (sm != null && sm.getIntermediate(field.getIndex()) != null) @@ -624,11 +633,11 @@ public class RelationFieldStrategy JDBCFetchConfiguration fetch, Object res) throws SQLException { // process batched results if we haven't already - Map rels; + Map rels; if (res instanceof Result) rels = processEagerParallelResult(sm, store, fetch, (Result) res); else - rels = (Map) res; + rels = (Map) res; // store object for this oid in instance sm.storeObject(field.getIndex(), rels.remove(sm.getObjectId())); @@ -638,7 +647,7 @@ public class RelationFieldStrategy /** * Process the given batched result. */ - private Map processEagerParallelResult(OpenJPAStateManager sm, + private Map processEagerParallelResult(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Result res) throws SQLException { // do same joins as for load @@ -648,7 +657,7 @@ public class RelationFieldStrategy Joins joins = res.newJoins().setVariable("*"); eagerJoin(joins, clss[0], true); - Map rels = new HashMap(); + Map rels = new HashMap(); ClassMapping owner = field.getDefiningMapping(); ClassMapping cls; Object oid; @@ -667,7 +676,7 @@ public class RelationFieldStrategy public void loadEagerJoin(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Result res) throws SQLException { - if (field.isBidirectionalManyToOneJoinTable()) + if (field.isBiMTo1JT()) return; ClassMapping cls = field.getIndependentTypeMappings()[0]; @@ -710,7 +719,7 @@ public class RelationFieldStrategy public void load(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Result res) throws SQLException { - if (field.getJoinDirection() == FieldMapping.JOIN_INVERSE) + if (field.getJoinDirection() == field.JOIN_INVERSE) return; // cached oid? if (sm != null && sm.getIntermediate(field.getIndex()) != null) @@ -723,7 +732,7 @@ public class RelationFieldStrategy // get the related object's oid ClassMapping relMapping = field.getTypeMapping(); Object oid = null; - if (relMapping.isMapped() && !field.isBidirectionalManyToOneJoinTable()) { + if (relMapping.isMapped() && !field.isBiMTo1JT()) { oid = relMapping.getObjectId(store, res, field.getForeignKey(), field.getPolymorphic() != ValueMapping.POLY_FALSE, null); } else { @@ -737,7 +746,8 @@ public class RelationFieldStrategy if (cols.length == 1) { Object val = res.getObject(cols[0], null, null); if (val != null) - oid = ApplicationIds.fromPKValues(new Object[]{ val }, relMapping); + oid = ApplicationIds.fromPKValues(new Object[]{ val }, + relMapping); } else { Object[] vals = new Object[cols.length]; for (int i = 0; i < cols.length; i++) { @@ -757,7 +767,8 @@ public class RelationFieldStrategy sm.setIntermediate(field.getIndex(), oid); } - public void load(final OpenJPAStateManager sm, final JDBCStore store, final JDBCFetchConfiguration fetch) + public void load(final OpenJPAStateManager sm, final JDBCStore store, + final JDBCFetchConfiguration fetch) throws SQLException { // check for cached oid value, or load oid if no way to join if (Boolean.TRUE.equals(_fkOid)) { @@ -776,64 +787,44 @@ public class RelationFieldStrategy // select related mapping columns; joining from the related type // back to our fk table if not an inverse mapping (in which case we // can just make sure the inverse cols == our pk values) - Union union; + Union union = store.getSQLFactory().newUnion(rels.length); + union.setExpectedResultCount(1, false); + if (fetch.getSubclassFetchMode(field.getTypeMapping()) + != JDBCFetchConfiguration.EAGER_JOIN) + union.abortUnion(); + union.select(new Union.Selector() { + public void select(Select sel, int idx) { + if (field.getJoinDirection() == field.JOIN_INVERSE) + sel.whereForeignKey(field.getForeignKey(rels[idx]), + sm.getObjectId(), field.getDefiningMapping(), store); + else { + if (!field.isBiMTo1JT()) { + resJoins[idx] = sel.newJoins().joinRelation(field.getName(), + field.getForeignKey(rels[idx]), rels[idx], + field.getSelectSubclasses(), false, false); + field.wherePrimaryKey(sel, sm, store); + } else { + resJoins[idx] = sel.newJoins().joinRelation(null, + field.getBi1ToMJoinFK(), rels[idx], + field.getSelectSubclasses(), false, false); + sel.whereForeignKey(field.getBi1ToMElemFK(), sm.getObjectId(), + field.getDefiningMapping(), store); + } + } + sel.select(rels[idx], subs, store, fetch, fetch.EAGER_JOIN, + resJoins[idx]); + } + }); + + Result res = union.execute(store, fetch); try { - _lock.lock(); - if (_executor == null) { - union = store.getSQLFactory().newUnion(rels.length); - union.setExpectedResultCount(1, false); - if (fetch.getSubclassFetchMode(field.getTypeMapping()) != JDBCFetchConfiguration.EAGER_JOIN) - union.abortUnion(); - if (((JDBCConfiguration)field.getMappingRepository().getConfiguration()).getSelectCacheEnabled()) { - _executor = union; - } - } else { - union = (Union)_executor; - } - union.select(new Union.Selector() { - public void select(Select sel, int idx) { - ForeignKey fk = field.getForeignKey(rels[idx]); - ClassMapping mapping = field.getDefiningMapping(); - Object oid = sm.getObjectId(); - if (field.getJoinDirection() == FieldMapping.JOIN_INVERSE) { - sel.whereForeignKey(fk, oid, mapping, store); - } else { - if (!field.isBidirectionalManyToOneJoinTable()) { - if (sel.isReadOnly()) { - resJoins[idx] = sel.getJoins(); - } else { - resJoins[idx] = sel.newJoins().joinRelation(field.getName(), fk, rels[idx], - subs, false, false); - } - field.wherePrimaryKey(sel, sm, store); - } else { - if (sel.isReadOnly()) { - resJoins[idx] = sel.getJoins(); - } else { - resJoins[idx] = sel.newJoins().joinRelation(null, - field.getBidirectionalOneToManyJoinForeignKey(), rels[idx], - subs, false, false); - } - sel.whereForeignKey(field.getBidirectionalOneToManyElementForeignKey(), - oid, mapping, store); - } - } - if (!sel.isReadOnly()) { - sel.select(rels[idx], subs, store, fetch, - JDBCFetchConfiguration.EAGER_JOIN, resJoins[idx]); - } - } - }); - - Result res = union.execute(store, fetch); - try { - sm.storeObject(field.getIndex(), res.next() - ? res.load(rels[res.indexOf()], store, fetch, resJoins[res.indexOf()]) : null); - } finally { - res.close(); - } + Object val = null; + if (res.next()) + val = res.load(rels[res.indexOf()], store, fetch, + resJoins[res.indexOf()]); + sm.storeObject(field.getIndex(), val); } finally { - _lock.unlock(); + res.close(); } } @@ -846,7 +837,7 @@ public class RelationFieldStrategy // because it'll be in the primary table) and see if fk cols are null; // if inverse, then we have to do a sub-select to see if any inverse // objects point back to this field's owner - if (field.getJoinDirection() != FieldMapping.JOIN_INVERSE) { + if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); @@ -855,9 +846,8 @@ public class RelationFieldStrategy else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS ").appendValue(null, cols[0]); - } else { + } else testInverseNull(sql, sel, joins, true); - } } public void appendIsNotNull(SQLBuffer sql, Select sel, Joins joins) { @@ -865,7 +855,7 @@ public class RelationFieldStrategy // because it'll be in the primary table) and see if fk cols aren't // null; if inverse, then we have to do a sub-select to see if any // inverse objects point back to this field's owner - if (field.getJoinDirection() != FieldMapping.JOIN_INVERSE) { + if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); @@ -896,27 +886,30 @@ public class RelationFieldStrategy sql.append("0 < "); ForeignKey fk = field.getForeignKey(); - ContainerFieldStrategy.appendJoinCount(sql, sel, joins, dict, field, fk); + ContainerFieldStrategy.appendJoinCount(sql, sel, joins, dict, field, + fk); } public Joins join(Joins joins, boolean forceOuter) { // if we're not in an inverse object table join normally, otherwise // already traversed the relation; just join back to owner table - if (field.getJoinDirection() != FieldMapping.JOIN_INVERSE) + if (field.getJoinDirection() != field.JOIN_INVERSE) return field.join(joins, forceOuter, false); ClassMapping[] clss = field.getIndependentTypeMappings(); if (clss.length != 1) throw RelationStrategies.uninversable(field); if (forceOuter) return joins.outerJoinRelation(field.getName(), - field.getForeignKey(), clss[0], field.getSelectSubclasses(), true, false); + field.getForeignKey(), clss[0], field.getSelectSubclasses(), + true, false); return joins.joinRelation(field.getName(), field.getForeignKey(), clss[0], field.getSelectSubclasses(), true, false); } - public Joins joinRelation(Joins joins, boolean forceOuter, boolean traverse) { + public Joins joinRelation(Joins joins, boolean forceOuter, + boolean traverse) { // if this is an inverse mapping it's already joined to the relation - if (field.getJoinDirection() == FieldMapping.JOIN_INVERSE) + if (field.getJoinDirection() == field.JOIN_INVERSE) return joins; ClassMapping[] clss = field.getIndependentTypeMappings(); if (clss.length != 1) { @@ -953,7 +946,8 @@ public class RelationFieldStrategy long id = res.getLong(col, joins); if (field.getObjectIdFieldTypeCode() == JavaTypes.LONG) return id; - return store.newDataStoreId(id, relmapping, field.getPolymorphic() != ValueMapping.POLY_FALSE); + return store.newDataStoreId(id, relmapping, field.getPolymorphic() + != ValueMapping.POLY_FALSE); } if (relmapping.isOpenJPAIdentity()) @@ -1006,21 +1000,27 @@ public class RelationFieldStrategy fieldVal = store.getContext().getObjectId(fieldVal); if (fieldVal instanceof OpenJPAId) fieldVal = ((OpenJPAId) fieldVal).getIdObject(); - if (relmapping.getObjectIdType() != null && relmapping.getObjectIdType().isInstance(fieldVal)) { + if (relmapping.getObjectIdType() != null + && relmapping.getObjectIdType().isInstance(fieldVal)) { Object[] pks = ApplicationIds.toPKValues(fieldVal, relmapping); - fieldVal = pks[relmapping.getField(j.getFieldIndex()).getPrimaryKeyIndex()]; + fieldVal = pks[relmapping.getField(j.getFieldIndex()). + getPrimaryKeyIndex()]; } else if (relmapping.getObjectIdType() == ObjectId.class && relmapping.getPrimaryKeyFieldMappings()[0].getValueMapping().isEmbedded()) { - return j.getJoinValue((fieldVal == null) ? savedFieldVal : fieldVal, col, store); + if (fieldVal == null) + return j.getJoinValue(savedFieldVal, col, store); + return j.getJoinValue(fieldVal, col, store); } return j.getJoinValue(fieldVal, col, store); } - public Object getJoinValue(OpenJPAStateManager sm, Column col, JDBCStore store) { + public Object getJoinValue(OpenJPAStateManager sm, Column col, + JDBCStore store) { return getJoinValue(sm.fetch(field.getIndex()), col, store); } - public void setAutoAssignedValue(OpenJPAStateManager sm, JDBCStore store, Column col, Object autoInc) { + public void setAutoAssignedValue(OpenJPAStateManager sm, JDBCStore store, + Column col, Object autoInc) { throw new UnsupportedException(); } @@ -1048,7 +1048,8 @@ public class RelationFieldStrategy return UNSUPPORTED; } - public void loadEmbedded(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Object val) + public void loadEmbedded(OpenJPAStateManager sm, JDBCStore store, + JDBCFetchConfiguration fetch, Object val) throws SQLException { ClassMapping relMapping = field.getTypeMapping(); Object oid; @@ -1058,7 +1059,8 @@ public class RelationFieldStrategy oid = store.newDataStoreId(((Number) val).longValue(), relMapping, field.getPolymorphic() != ValueMapping.POLY_FALSE); else { - Object[] pks = (getColumns().length == 1) ? new Object[]{ val } : (Object[]) val; + Object[] pks = (getColumns().length == 1) ? new Object[]{ val } + : (Object[]) val; boolean nulls = true; for (int i = 0; nulls && i < pks.length; i++) nulls = pks[i] == null; @@ -1066,15 +1068,17 @@ public class RelationFieldStrategy oid = null; else { oid = ApplicationIds.fromPKValues(pks, relMapping); - if (field.getPolymorphic() == ValueMapping.POLY_FALSE && oid instanceof OpenJPAId) { - ((OpenJPAId) oid).setManagedInstanceType(relMapping.getDescribedType()); + if (field.getPolymorphic() == ValueMapping.POLY_FALSE + && oid instanceof OpenJPAId) { + ((OpenJPAId) oid).setManagedInstanceType(relMapping. + getDescribedType()); } } } - if (oid == null) { + if (oid == null) sm.storeObject(field.getIndex(), null); - } else { + else { if (JavaTypes.maybePC(field.getValue()) && field.getElement().getEmbeddedMetaData() == null) { Object obj = store.find(oid, field, fetch); Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationRelationMapTableFieldStrategy.java Mon Feb 13 21:23:54 2012 @@ -82,7 +82,7 @@ public class RelationRelationMapTableFie kunion.select(new Union.Selector() { public void select(Select sel, int idx) { ForeignKey joinFK = null; - if (field.isUnidirectionalOneToManyForeignKey()) { + if (field.isUni1ToMFK()) { ValueMapping val = field.getElementMapping(); ValueMappingInfo vinfo = val.getValueInfo(); Table table = vinfo.getTable(val); @@ -117,7 +117,7 @@ public class RelationRelationMapTableFie vunion.setLRS(lrs); vunion.select(new Union.Selector() { public void select(Select sel, int idx) { - if (field.isUnidirectionalOneToManyForeignKey()) { + if (field.isUni1ToMFK()) { sel.orderBy(field.getKeyMapping().getColumns(), true, true); sel.select(vals[idx], field.getElementMapping(). getSelectSubclasses(), store, fetch, eagerMode, null); @@ -203,11 +203,10 @@ public class RelationRelationMapTableFie FieldMapping mapped = field.getMappedByMapping(); DBDictionary dict = field.getMappingRepository().getDBDictionary(); DBIdentifier keyName = null; - if (field.isUnidirectionalOneToManyForeignKey() - || (!field.isBidirectionalManyToOneJoinTable() && mapped != null)) { + if (field.isUni1ToMFK() || (!field.isBiMTo1JT() && mapped != null)) { handleMappedByForeignKey(adapt); keyName = dict.getValidColumnName(DBIdentifier.newColumn("vkey"), field.getTable()); - } else if (field.isBidirectionalManyToOneJoinTable() || mapped == null) { + } else if (field.isBiMTo1JT() || mapped == null) { field.mapJoin(adapt, true); mapTypeJoin(val, DBIdentifier.newColumn("value"), adapt); keyName = dict.getValidColumnName(DBIdentifier.newColumn("key"), field.getTable()); @@ -246,11 +245,11 @@ public class RelationRelationMapTableFie if (map == null || map.isEmpty()) return; - if (!field.isBidirectionalManyToOneJoinTable() && field.getMappedBy() != null) + if (!field.isBiMTo1JT() && field.getMappedBy() != null) return; Row row = null; - if (!field.isUnidirectionalOneToManyForeignKey()) { + if (!field.isUni1ToMFK()) { row = rm.getSecondaryRow(field.getTable(), Row.ACTION_INSERT); row.setForeignKey(field.getJoinForeignKey(), field.getJoinColumnIO(), sm); @@ -264,7 +263,7 @@ public class RelationRelationMapTableFie entry = (Map.Entry) itr.next(); keysm = RelationStrategies.getStateManager(entry.getKey(), ctx); valsm = RelationStrategies.getStateManager(entry.getValue(), ctx); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ row = rm.getRow(field.getElementMapping().getDeclaredTypeMapping().getTable(), Row.ACTION_UPDATE, valsm, true); row.wherePrimaryKey(valsm); @@ -282,14 +281,14 @@ public class RelationRelationMapTableFie // from the view point of the owned side PersistenceCapable obj = sm.getPersistenceCapable(); if (!populateKey(row, valsm, obj, ctx, rm, store)) - if (!field.isUnidirectionalOneToManyForeignKey()) + if (!field.isUni1ToMFK()) rm.flushSecondaryRow(row); } } public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException { - if (field.getMappedBy() != null && !field.isBidirectionalManyToOneJoinTable()) + if (field.getMappedBy() != null && !field.isBiMTo1JT()) return; Map map = (Map) sm.fetchObject(field.getIndex()); @@ -320,7 +319,7 @@ public class RelationRelationMapTableFie Object mkey; if (canChange && !change.isEmpty()) { Row changeRow = null; - if (!field.isUnidirectionalOneToManyForeignKey()) { + if (!field.isUni1ToMFK()) { changeRow = rm.getSecondaryRow(field.getTable(), Row.ACTION_UPDATE); changeRow.whereForeignKey(field.getJoinForeignKey(), sm); @@ -340,7 +339,7 @@ public class RelationRelationMapTableFie keysm = RelationStrategies.getStateManager(mkey, ctx); valsm = RelationStrategies.getStateManager(mval, ctx); key.whereForeignKey(changeRow, keysm); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ changeRow = rm.getRow(field.getElementMapping().getDeclaredTypeMapping().getTable(), Row.ACTION_UPDATE, valsm, true); changeRow.wherePrimaryKey(valsm); @@ -356,7 +355,7 @@ public class RelationRelationMapTableFie Collection rem = ct.getRemoved(); if (!rem.isEmpty() || (!canChange && !change.isEmpty())) { Row delRow = null; - if (!field.isUnidirectionalOneToManyForeignKey()) { + if (!field.isUni1ToMFK()) { delRow = rm.getSecondaryRow(field.getTable(), Row.ACTION_DELETE); delRow.whereForeignKey(field.getJoinForeignKey(), sm); @@ -364,7 +363,7 @@ public class RelationRelationMapTableFie for (Iterator itr = rem.iterator(); itr.hasNext();) { Object pc = itr.next(); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ updateSetNull(sm, rm, pc); } else { keysm = RelationStrategies.getStateManager(pc, ctx); @@ -375,7 +374,7 @@ public class RelationRelationMapTableFie if (!canChange && !change.isEmpty()) { for (Iterator itr = change.iterator(); itr.hasNext();) { Object pc = itr.next(); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ updateSetNull(sm, rm, pc); } else { keysm = RelationStrategies.getStateManager(pc, ctx); @@ -390,7 +389,7 @@ public class RelationRelationMapTableFie Collection add = ct.getAdded(); if (!add.isEmpty() || (!canChange && !change.isEmpty())) { Row addRow = null; - if (!field.isUnidirectionalOneToManyForeignKey()) { + if (!field.isUni1ToMFK()) { addRow = rm.getSecondaryRow(field.getTable(), Row.ACTION_INSERT); addRow.setForeignKey(field.getJoinForeignKey(), @@ -410,7 +409,7 @@ public class RelationRelationMapTableFie continue; keysm = RelationStrategies.getStateManager(mkey, ctx); valsm = RelationStrategies.getStateManager(mval, ctx); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ addRow = rm.getRow(field.getElementMapping().getDeclaredTypeMapping().getTable(), Row.ACTION_UPDATE, valsm, true); addRow.wherePrimaryKey(valsm); @@ -437,7 +436,7 @@ public class RelationRelationMapTableFie continue; keysm = RelationStrategies.getStateManager(mkey, ctx); valsm = RelationStrategies.getStateManager(mval, ctx); - if (field.isUnidirectionalOneToManyForeignKey()){ + if (field.isUni1ToMFK()){ addRow = rm.getRow(field.getElementMapping().getDeclaredTypeMapping().getTable(), Row.ACTION_UPDATE, valsm, true); addRow.wherePrimaryKey(valsm); @@ -504,7 +503,7 @@ public class RelationRelationMapTableFie public void delete(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException { - if (field.isUnidirectionalOneToManyForeignKey()) { + if (field.isUni1ToMFK()) { Map mapObj = (Map)sm.fetchObject(field.getIndex()); updateSetNull(sm, store, rm, mapObj.keySet()); return; Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationToManyTableFieldStrategy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationToManyTableFieldStrategy.java?rev=1243702&r1=1243701&r2=1243702&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationToManyTableFieldStrategy.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationToManyTableFieldStrategy.java Mon Feb 13 21:23:54 2012 @@ -113,7 +113,7 @@ public abstract class RelationToManyTabl // Bi-directional oneToMany relation with join table strategy // ==> should not mapped in the owner's table if (mapped != null) { - if (!field.isBidirectionalManyToOneJoinTable()) { + if (!field.isBiMTo1JT()) { if (mapped.getElement().getTypeCode() != JavaTypes.PC) { throw new MetaDataException(_loc.get("not-inv-relation-coll", field, mapped)); @@ -134,9 +134,9 @@ public abstract class RelationToManyTabl } } - if (mapped == null || field.isBidirectionalManyToOneJoinTable()) { - if (field.isBidirectionalManyToOneJoinTable()) - field.setBidirectionalOneToManyJoinTableInfo(); + if (mapped == null || field.isBiMTo1JT()) { + if (field.isBiMTo1JT()) + field.setBi1MJoinTableInfo(); field.mapJoin(adapt, true); if (elem.getTypeMapping().isMapped()) { ForeignKey fk = vinfo.getTypeJoin(elem, "element", false, adapt); @@ -157,7 +157,7 @@ public abstract class RelationToManyTabl public void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException { - if (field.getMappedBy() == null || field.isBidirectionalManyToOneJoinTable()) + if (field.getMappedBy() == null || field.isBiMTo1JT()) insert(sm, rm, sm.fetchObject(field.getIndex())); } @@ -188,7 +188,7 @@ public abstract class RelationToManyTabl public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException { - if (field.getMappedBy() != null && !field.isBidirectionalManyToOneJoinTable()) + if (field.getMappedBy() != null && !field.isBiMTo1JT()) return; Object obj = sm.fetchObject(field.getIndex()); From commits-return-9381-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 14 14:18:33 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2A7029C94 for ; Tue, 14 Feb 2012 14:18:33 +0000 (UTC) Received: (qmail 35247 invoked by uid 500); 14 Feb 2012 14:18:33 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 35219 invoked by uid 500); 14 Feb 2012 14:18:32 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 35205 invoked by uid 99); 14 Feb 2012 14:18:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 14:18:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 14:18:31 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 816AE23888CD for ; Tue, 14 Feb 2012 14:18:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1243932 - /openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java Date: Tue, 14 Feb 2012 14:18:11 -0000 To: commits@openjpa.apache.org From: ppoddar@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120214141811.816AE23888CD@eris.apache.org> Author: ppoddar Date: Tue Feb 14 14:18:11 2012 New Revision: 1243932 URL: http://svn.apache.org/viewvc?rev=1243932&view=rev Log: A sample finder target policy Added: openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java (with props) Added: openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java?rev=1243932&view=auto ============================================================================== --- openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java (added) +++ openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java Tue Feb 14 14:18:11 2012 @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.slice.policy; + +import java.util.List; + +import org.apache.openjpa.slice.Car; +import org.apache.openjpa.slice.FinderTargetPolicy; +import org.apache.openjpa.slice.Manufacturer; +import org.apache.openjpa.slice.PObject; +import org.apache.openjpa.slice.Person; + +/** + * A sample policy to target slices based on a persistent type and a given identifier. + * + * @author Pinaki Poddar + * + */ +public class SampleFinderPolicy implements FinderTargetPolicy { + + @Override + public String[] getTargets(Class cls, Object oid, List slices, Object context) { + + if (cls == PObject.class || cls == Person.class) { + int id = ((Long)oid).intValue(); + return new String[]{slices.get(id%2)}; + } + + if (cls == Car.class) { + String vin = (String)oid; + char firstChar = Character.toLowerCase(vin.charAt(0)); + return new String[]{slices.get((firstChar >= 'a' && firstChar <='m') ? 0 : 1)}; + } + if (cls == Manufacturer.class) { + String name = (String)oid; + return new String[]{slices.get("BMW".equalsIgnoreCase(name) ? 0 : "HONDA".equalsIgnoreCase(name) ? 1 : 2)}; + } + return null; // look in all slices + } + +} Propchange: openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java ------------------------------------------------------------------------------ svn:eol-style = native From commits-return-9382-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 14 15:17:20 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D71E91E3 for ; Tue, 14 Feb 2012 15:17:20 +0000 (UTC) Received: (qmail 46649 invoked by uid 500); 14 Feb 2012 15:17:20 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 46610 invoked by uid 500); 14 Feb 2012 15:17:20 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 46603 invoked by uid 99); 14 Feb 2012 15:17:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 15:17:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 15:17:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AA05023888E7 for ; Tue, 14 Feb 2012 15:16:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1243987 - /openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java Date: Tue, 14 Feb 2012 15:16:57 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120214151657.AA05023888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: allee8285 Date: Tue Feb 14 15:16:57 2012 New Revision: 1243987 URL: http://svn.apache.org/viewvc?rev=1243987&view=rev Log: Fix checkstyle typos. Modified: openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java Modified: openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java?rev=1243987&r1=1243986&r2=1243987&view=diff ============================================================================== --- openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java (original) +++ openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/policy/SampleFinderPolicy.java Tue Feb 14 15:16:57 2012 @@ -49,7 +49,9 @@ public class SampleFinderPolicy implemen } if (cls == Manufacturer.class) { String name = (String)oid; - return new String[]{slices.get("BMW".equalsIgnoreCase(name) ? 0 : "HONDA".equalsIgnoreCase(name) ? 1 : 2)}; + return new String[] { + slices.get("BMW".equalsIgnoreCase(name) ? 0 : "HONDA".equalsIgnoreCase(name) ? 1 : 2) + }; } return null; // look in all slices } From commits-return-9383-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 14 15:38:14 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2A4769B21 for ; Tue, 14 Feb 2012 15:38:14 +0000 (UTC) Received: (qmail 18814 invoked by uid 500); 14 Feb 2012 15:38:14 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 18792 invoked by uid 500); 14 Feb 2012 15:38:14 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 18785 invoked by uid 99); 14 Feb 2012 15:38:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 15:38:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 15:38:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 31A4B23888FD for ; Tue, 14 Feb 2012 15:37:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244001 - /openjpa/trunk/pom.xml Date: Tue, 14 Feb 2012 15:37:53 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120214153753.31A4B23888FD@eris.apache.org> Author: allee8285 Date: Tue Feb 14 15:37:52 2012 New Revision: 1244001 URL: http://svn.apache.org/viewvc?rev=1244001&view=rev Log: OPENJPA-2130 - Introduce properties (, , and ) allowing user to specify source and target class versions for code and test. Modified: openjpa/trunk/pom.xml Modified: openjpa/trunk/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/pom.xml?rev=1244001&r1=1244000&r2=1244001&view=diff ============================================================================== --- openjpa/trunk/pom.xml (original) +++ openjpa/trunk/pom.xml Tue Feb 14 15:37:52 2012 @@ -77,6 +77,11 @@ 8.4-701.jdbc3 1.6.1 + + 1.6 + 1.6 + 1.6 + 1.6 @@ -614,8 +619,8 @@ maven-compiler-plugin 2.3.2 - 1.6 - 1.6 + ${compile.class.source} + ${compile.class.target} ${project.build.sourceEncoding} @@ -1046,6 +1051,19 @@ org.apache.maven.plugins maven-compiler-plugin + + + test-source-compile + process-test-sources + + testCompile + + + ${compile.testclass.source} + ${compile.testclass.target} + + + org.codehaus.mojo From commits-return-9384-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 14 16:06:13 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D2F4993D for ; Tue, 14 Feb 2012 16:06:13 +0000 (UTC) Received: (qmail 16950 invoked by uid 500); 14 Feb 2012 16:06:13 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 16922 invoked by uid 500); 14 Feb 2012 16:06:12 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 16915 invoked by uid 99); 14 Feb 2012 16:06:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 16:06:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 16:06:11 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F213923889E7 for ; Tue, 14 Feb 2012 16:05:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244062 - in /openjpa/trunk/openjpa-project: CHANGES.txt RELEASE-NOTES.html Date: Tue, 14 Feb 2012 16:05:51 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120214160551.F213923889E7@eris.apache.org> Author: allee8285 Date: Tue Feb 14 16:05:51 2012 New Revision: 1244062 URL: http://svn.apache.org/viewvc?rev=1244062&view=rev Log: Documents update preparing for 2.2.0 release Modified: openjpa/trunk/openjpa-project/CHANGES.txt openjpa/trunk/openjpa-project/RELEASE-NOTES.html Modified: openjpa/trunk/openjpa-project/CHANGES.txt URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/CHANGES.txt?rev=1244062&r1=1244061&r2=1244062&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/CHANGES.txt (original) +++ openjpa/trunk/openjpa-project/CHANGES.txt Tue Feb 14 16:05:51 2012 @@ -222,6 +222,7 @@ Bug [OPENJPA-2117] - XML overriding column names for 1xM attributes causes exception. [OPENJPA-2119] - Update org.apache.openjpa.persistence.util.SourceCode [OPENJPA-2122] - VerifyError with Java 7 when using javaagent or dynamic container enhancement + [OPENJPA-2124] - Use of XMLValueHandler results in a NullPointerException when classloader does not provide package support Improvement @@ -251,7 +252,10 @@ Improvement [OPENJPA-2084] - Upgrade Derby dependency to 10.8.x [OPENJPA-2085] - Improve enhancement process to support JAVA 7 compliant class file generation [OPENJPA-2087] - Remove or limit the use of the ConcreteClassGenerator + [OPENJPA-2116] - Scrape the barrel for performance juice [OPENJPA-2120] - Add new option to eliminate reflection calls from enhancer generated IdClass PC copy operations + [OPENJPA-2128] - Add a boolean to FieldMetaData to denote whether or not a field has a @EmbeddedId annotation. + [OPENJPA-2130] - Enable Java 7 testing by allowing test cases to compile targeting to 1.7 New Feature @@ -259,7 +263,6 @@ New Feature [OPENJPA-1859] - Create a sample to demonstrate usage of JEST [OPENJPA-1934] - contribute an openjpa-maven-plugin [OPENJPA-2108] - Allow an option to terminate MappingTool-generated SQL with a character other than semicolon - [OPENJPA-2111] - Optimize column based ResultSet lookup whereever feasible Task Modified: openjpa/trunk/openjpa-project/RELEASE-NOTES.html URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/RELEASE-NOTES.html?rev=1244062&r1=1244061&r2=1244062&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/RELEASE-NOTES.html (original) +++ openjpa/trunk/openjpa-project/RELEASE-NOTES.html Tue Feb 14 16:05:51 2012 @@ -343,6 +343,8 @@ in each release of OpenJPA.

    • [OPENJPA-2122] - VerifyError with Java 7 when using javaagent or dynamic container enhancement
    • +
    • [OPENJPA-2124] - Use of XMLValueHandler results in a NullPointerException when classloader does not provide package support +

    Improvement @@ -400,8 +402,14 @@ in each release of OpenJPA.

  • [OPENJPA-2087] - Remove or limit the use of the ConcreteClassGenerator
  • +
  • [OPENJPA-2116] - Scrape the barrel for performance juice +
  • [OPENJPA-2120] - Add new option to eliminate reflection calls from enhancer generated IdClass PC copy operations
  • +
  • [OPENJPA-2128] - Add a boolean to FieldMetaData to denote whether or not a field has a @EmbeddedId annotation. +
  • +
  • [OPENJPA-2130] - Enable Java 7 testing by allowing test cases to compile targeting to 1.7 +

New Feature @@ -415,8 +423,6 @@ in each release of OpenJPA.

  • [OPENJPA-2108] - Allow an option to terminate MappingTool-generated SQL with a character other than semicolon
  • -
  • [OPENJPA-2111] - Optimize column based ResultSet lookup whereever feasible -
  • Task From commits-return-9385-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 14 19:47:26 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 401899FEE for ; Tue, 14 Feb 2012 19:47:26 +0000 (UTC) Received: (qmail 83789 invoked by uid 500); 14 Feb 2012 19:47:26 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 83738 invoked by uid 500); 14 Feb 2012 19:47:26 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 83535 invoked by uid 99); 14 Feb 2012 19:47:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 19:47:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.8] (HELO aegis.apache.org) (140.211.11.8) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 19:47:20 +0000 Received: from aegis (localhost [127.0.0.1]) by aegis.apache.org (Postfix) with ESMTP id 4E754C0005 for ; Tue, 14 Feb 2012 19:46:59 +0000 (UTC) Date: Tue, 14 Feb 2012 19:46:47 +0000 (UTC) From: Apache Jenkins Server To: commits@openjpa.apache.org Message-ID: <1543182562.3141329248819294.JavaMail.hudson@aegis> Subject: Build failed in Jenkins: OpenJPA-trunk #649 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Jenkins-Job: OpenJPA-trunk X-Jenkins-Result: FAILURE X-Virus-Checked: Checked by ClamAV on apache.org See ------------------------------------------ [...truncated 13696 lines...] 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.511 sec Running org.apache.openjpa.persistence.kernel.TestSavepointOrdering 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.174 sec Running org.apache.openjpa.persistence.kernel.TestPessimisticLocking 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.08 sec Running org.apache.openjpa.persistence.kernel.TestInheritance 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.219 sec Running org.apache.openjpa.persistence.cache.jpa.TestPropertyCacheModeUnspecified 1 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 cache-mode-empty INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 cache-mode-empty INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.443 sec Running org.apache.openjpa.persistence.embed.TestUpdateEmbeddedQueryResult 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.622 sec Running org.apache.openjpa.persistence.jdbc.schema.TestSchemaGenerator 1 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 12 TestConv WARN [main] openjpa.MetaData - OpenJPA cannot map field "org.apache.openjpa.persistence.jdbc.common.apps.ConstantJoinPC4.manyToMany" efficiently. It is of an unsupported type. The field value will be serialized to a BLOB by default. 635 TestConv INFO [main] openjpa.Tool - Reflecting on schemas "all". This process may take some time. Enable the org.apache.openjpa.jdbc.Schema logging category to see messages about the collection of schema data. 2002 TestConv INFO [main] openjpa.Tool - Writing XML representation of schema. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.155 sec Running org.apache.openjpa.persistence.jpql.functions.TestEJBQLFunction 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 TestConv INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 TestConv INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.054 sec Running org.apache.openjpa.persistence.query.TestQueryExpressionSplit Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec Running org.apache.openjpa.persistence.relations.TestInverseEagerSQL 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 2 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.476 sec Running org.apache.openjpa.persistence.inheritance.TestIdentityWithSingleTableStrategy 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.47 sec Running org.apache.openjpa.persistence.query.TestSubquery 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". >>> JPQL JPA2 :[ 0]select o1.oid, c.name from Order o1, Customer c where o1.customer.name = any(select o2.customer.name from in(c.orders) o2) >>> JPQL JPA2 :[ 1]select o1.oid, c.name from Order o1, Customer c where o1.amount = any(select o2.amount from in(c.orders) o2) >>> JPQL JPA2 :[ 2]select DISTINCT c.name FROM Customer c JOIN c.orders o WHERE EXISTS (SELECT o FROM o.lineitems l where l.quantity > 2 ) >>> JPQL JPA2 :[ 3]select DISTINCT c.name FROM Customer c, IN(c.orders) co WHERE co.amount > ALL (Select o.amount FROM Order o, in(o.lineitems) l WHERE l.quantity > 2) >>> JPQL JPA2 :[ 4]select distinct c.name FROM Customer C, IN(C.orders) co WHERE co.amount < ALL (Select o.amount FROM Order o, IN(o.lineitems) l WHERE l.quantity > 2) >>> JPQL JPA2 :[ 5]select c.name FROM Customer c, IN(c.orders) co WHERE co.amount <= ALL (Select o.amount FROM Order o, IN(o.lineitems) l WHERE l.quantity > 2) >>> JPQL JPA2 :[ 6]select DISTINCT c.name FROM Customer c, IN(c.orders) co WHERE co.amount > ANY (Select o.amount FROM Order o, IN(o.lineitems) l WHERE l.quantity = 2) >>> JPQL JPA2 :[ 7]select DISTINCT c.name FROM Customer c WHERE EXISTS (SELECT o FROM c.orders o where o.amount BETWEEN 1000 AND 1200) >>> JPQL JPA2 :[ 8]select DISTINCT c.name FROM Customer c WHERE EXISTS (SELECT o FROM c.orders o where o.amount > 1000 ) >>> JPQL JPA2 :[ 9]SELECT o.oid from Order o WHERE EXISTS (SELECT c.name From o.customer c WHERE c.name LIKE '%los') >>> JPQL JPA2 :[ 10]select Distinct c.name FROM Customer c, IN(c.orders) co WHERE co.amount >= SOME(Select o.amount FROM Order o, IN(o.lineitems) l WHERE l.quantity = 2) >>> JPQL JPA2 :[ 11]select c FROM Customer c WHERE EXISTS (SELECT o FROM c.orders o where o.amount > 1000) >>> JPQL JPA2 :[ 12]select c FROM Customer c WHERE EXISTS (SELECT o FROM c.orders o) >>> JPQL JPA2 :[ 13]SELECT c FROM Customer c WHERE (SELECT COUNT(o) FROM c.orders o) > 10 >>> JPQL JPA2 :[ 14]SELECT o FROM Order o JOIN o.customer c WHERE c.name = SOME (SELECT a.name FROM c.accounts a) 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT >>> JPQL JPA2 :[ 0]select o.oid from Order o where o.delivered = (select CASE WHEN o2.amount > 10 THEN true WHEN o2.amount = 10 THEN false ELSE false END from Order o2 where o.customer.cid.id = o2.customer.cid.id) >>> JPQL JPA2 :[ 1]select o1.oid from Order o1 where o1.amount > (select o.amount*0.8 from OrderItem i, Order o where i.quantity > 10 and o.amount > 1000 and i.lid = o.oid) >>> JPQL JPA2 :[ 2]select o.oid from Order o where o.customer.name = (select substring(o2.customer.name, 3) from Order o2 where o.customer.cid.id = o2.customer.cid.id) >>> JPQL JPA2 :[ 3]select o.oid from Order o where o.orderTs > (select CURRENT_TIMESTAMP from o.lineitems i) >>> JPQL JPA2 :[ 4]select o.oid from Order o where o.amount > (select SQRT(o.amount) from Order o where o.delivered = true) >>> JPQL JPA2 :[ 5]select o.oid from Order o where o.customer.name in (select CONCAT(o.customer.name, 'XX') from Order o where o.amount > 10) >>> JPQL JPA2 :[ 6]select c from Customer c where c.creditRating = (select CASE WHEN o2.amount > 10 THEN org.apache.openjpa.persistence.query.Customer$CreditRating.POOR WHEN o2.amount = 10 THEN org.apache.openjpa.persistence.query.Customer$CreditRating.GOOD ELSE org.apache.openjpa.persistence.query.Customer$CreditRating.EXCELLENT END from Order o2 where c.cid.id = o2.customer.cid.id) >>> JPQL JPA2 :[ 7]select c from Customer c where c.creditRating = (select COALESCE (c1.creditRating, org.apache.openjpa.persistence.query.Customer$CreditRating.POOR) from Customer c1 where c1.name = 'Famzy') order by c.name DESC >>> JPQL JPA2 :[ 8]select c from Customer c where c.creditRating = (select NULLIF (c1.creditRating, org.apache.openjpa.persistence.query.Customer$CreditRating.POOR) from Customer c1 where c1.name = 'Famzy') order by c.name DESC >>> JPQL: [ 0]select c from Customer c where EXISTS (select o from in(c.orders) o) >>> JPQL: [ 1]select c from Customer c where EXISTS (select o from c.orders o) >>> JPQL: [ 2]select c from Customer c where NOT EXISTS (select o from in (c.orders) o) >>> JPQL: [ 3]select c from Customer c where NOT EXISTS (select o from c.orders o) >>> JPQL: [ 4]select o1.oid from Order o1 where o1.oid in (select distinct o.oid from OrderItem i, Order o where i.quantity > 10 and o.amount > 1000 and i.lid = o.oid) >>> JPQL: [ 5]select o.oid from Order o where o.customer.name = (select max(o2.customer.name) from Order o2 where o.customer.cid.id = o2.customer.cid.id) >>> JPQL: [ 6]select o from Order o where o.customer.name = (select max(o2.customer.name) from Order o2 where o.customer.cid.id = o2.customer.cid.id) >>> JPQL: [ 7]select o.oid from Order o where o.amount > (select count(i) from o.lineitems i) >>> JPQL: [ 8]select o.oid from Order o where o.amount > (select count(o.amount) from Order o) >>> JPQL: [ 9]select o.oid from Order o where o.amount > (select count(o.oid) from Order o) >>> JPQL: [ 10]select o.oid from Order o where o.amount > (select avg(o.amount) from Order o) >>> JPQL: [ 11]select c.name from Customer c where exists (select o from c.orders o where o.oid = 1) or exists (select o from c.orders o where o.oid = 2) >>> JPQL: [ 12]select c.name from Customer c, in(c.orders) o where o.amount between (select max(o.amount) from Order o) and (select avg(o.amount) from Order o) >>> JPQL: [ 13]select o.oid from Order o where o.amount > (select sum(o2.amount) from Customer c, in(c.orders) o2) >>> JPQL: [ 14]select o.oid from Order o where o.amount between (select avg(o2.amount) from Customer c, in(c.orders) o2) and (select min(o2.amount) from Customer c, in(c.orders) o2) >>> JPQL: [ 15]select o.oid from Customer c, in(c.orders)o where o.amount > (select sum(o2.amount) from c.orders o2) >>> JPQL: [ 16]select o1.oid, c.name from Order o1, Customer c where o1.amount = any(select o2.amount from in(c.orders) o2) >>> JPQL: [ 17]SELECT p, m FROM Publisher p LEFT OUTER JOIN p.magazineCollection m WHERE m.id = (SELECT MAX(m2.id) FROM Magazine m2 WHERE m2.idPublisher.id = p.id AND m2.datePublished = (SELECT MAX(m3.datePublished) FROM Magazine m3 WHERE m3.idPublisher.id = p.id)) >>> JPQL: [ 18]select o from Order o where o.amount > (select count(o) from Order o) >>> JPQL: [ 19]select o from Order o where o.amount > (select count(o2) from Order o2) >>> JPQL: [ 20]select c from Customer c left join c.orders o where not exists (select o2 from c.orders o2 where o2 = o) 1 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.265 sec Running org.apache.openjpa.persistence.models.company.basic.TestBasicCompanyModel 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.631 sec Running org.apache.openjpa.persistence.jdbc.update.TestParentChild 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". Build timed out (after 162 minutes). Marking the build as failed. 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 1 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 0 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT 1 test INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary". [JENKINS] Recording test resultskilled. 0 test INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Unable to call isArchivingDisabled. Invalid object ID 11 [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.IllegalStateException: Unable to call isArchivingDisabled. Invalid object ID 11 at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:268) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) [INFO] ------------------------------------------------------------------------ [INFO] Total time: 139 minutes 19 seconds [INFO] Finished at: Tue Feb 14 19:36:06 UTC 2012 [INFO] Final Memory: 83M/525M [INFO] ------------------------------------------------------------------------ channel stopped From commits-return-9386-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 15 04:36:26 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D10895BB for ; Wed, 15 Feb 2012 04:36:26 +0000 (UTC) Received: (qmail 48513 invoked by uid 500); 15 Feb 2012 04:36:26 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 48369 invoked by uid 500); 15 Feb 2012 04:36:23 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 48131 invoked by uid 99); 15 Feb 2012 04:36:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 04:36:22 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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, 15 Feb 2012 04:36:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1F4a03s020134 for ; Wed, 15 Feb 2012 04:36:00 GMT Date: Tue, 14 Feb 2012 23:36:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <31570956.44895.1329280560170.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
    From commits-return-9387-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 15 04:39:22 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6E27E9730 for ; Wed, 15 Feb 2012 04:39:22 +0000 (UTC) Received: (qmail 53785 invoked by uid 500); 15 Feb 2012 04:39:22 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 53750 invoked by uid 500); 15 Feb 2012 04:39:22 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 53740 invoked by uid 99); 15 Feb 2012 04:39:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 04:39:22 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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, 15 Feb 2012 04:39:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1F4d0CV021180 for ; Wed, 15 Feb 2012 04:39:00 GMT Date: Tue, 14 Feb 2012 23:39:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <18344325.44897.1329280740110.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
    From commits-return-9388-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 15 15:31:28 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C95DF9180 for ; Wed, 15 Feb 2012 15:31:28 +0000 (UTC) Received: (qmail 7086 invoked by uid 500); 15 Feb 2012 15:31:28 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 7051 invoked by uid 500); 15 Feb 2012 15:31:28 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 7039 invoked by uid 99); 15 Feb 2012 15:31:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 15:31:28 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY,WEIRD_PORT 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, 15 Feb 2012 15:31:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1FFV0O8007208 for ; Wed, 15 Feb 2012 15:31:00 GMT Date: Wed, 15 Feb 2012 10:31:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <12829900.45031.1329319860030.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Setup MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
    From commits-return-9389-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 15 15:34:50 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4C7AD9241 for ; Wed, 15 Feb 2012 15:34:50 +0000 (UTC) Received: (qmail 16474 invoked by uid 500); 15 Feb 2012 15:34:50 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 16454 invoked by uid 500); 15 Feb 2012 15:34:50 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 16446 invoked by uid 99); 15 Feb 2012 15:34:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 15:34:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 15:34:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 644CD2388860 for ; Wed, 15 Feb 2012 15:34:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244538 - /openjpa/trunk/pom.xml Date: Wed, 15 Feb 2012 15:34:24 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120215153424.644CD2388860@eris.apache.org> Author: allee8285 Date: Wed Feb 15 15:34:23 2012 New Revision: 1244538 URL: http://svn.apache.org/viewvc?rev=1244538&view=rev Log: Remove the assumption that the user id used in to be env.user.name. i.e the log-in user id in the release system. Replace ${user.name} to ${site.deploy.user.name} which needs to be set in settings.xml. Modified: openjpa/trunk/pom.xml Modified: openjpa/trunk/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/pom.xml?rev=1244538&r1=1244537&r2=1244538&view=diff ============================================================================== --- openjpa/trunk/pom.xml (original) +++ openjpa/trunk/pom.xml Wed Feb 15 15:34:23 2012 @@ -46,7 +46,7 @@ DefaultLevel=INFO UTF-8 ${project.basedir}/../openjpa-project/checkstyle.xml - scp://people.apache.org/home/${user.name}/public_html/openjpa/${project.version}/staging-site + scp://people.apache.org/home/${site.deploy.user.name}/public_html/openjpa/${project.version}/staging-site 512m 1024m From commits-return-9390-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 15 17:26:13 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DEE39C70 for ; Wed, 15 Feb 2012 17:26:13 +0000 (UTC) Received: (qmail 67447 invoked by uid 500); 15 Feb 2012 17:26:13 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 67430 invoked by uid 500); 15 Feb 2012 17:26:13 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 67423 invoked by uid 99); 15 Feb 2012 17:26:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 17:26:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 17:26:11 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2FED523888E7 for ; Wed, 15 Feb 2012 17:25:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244602 - in /openjpa/trunk/openjpa-project: CHANGES.txt RELEASE-NOTES.html Date: Wed, 15 Feb 2012 17:25:52 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120215172552.2FED523888E7@eris.apache.org> Author: allee8285 Date: Wed Feb 15 17:25:51 2012 New Revision: 1244602 URL: http://svn.apache.org/viewvc?rev=1244602&view=rev Log: Documents update preparing for 2.2.0 release Modified: openjpa/trunk/openjpa-project/CHANGES.txt openjpa/trunk/openjpa-project/RELEASE-NOTES.html Modified: openjpa/trunk/openjpa-project/CHANGES.txt URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/CHANGES.txt?rev=1244602&r1=1244601&r2=1244602&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/CHANGES.txt (original) +++ openjpa/trunk/openjpa-project/CHANGES.txt Wed Feb 15 17:25:51 2012 @@ -228,6 +228,7 @@ Improvement [OPENJPA-302] - PCEnhancer needs target classes on classpath [OPENJPA-487] - Generated SUBSTRING SQL is ugly and inefficient + [OPENJPA-758] - OpenJPA doesn't find ValueHandlers with an applicable class loader [OPENJPA-1555] - SQLBuffer code cleanup [OPENJPA-1777] - Allow setting of diagonstic context for each slice in a more flexible manner [OPENJPA-1778] - Improved error information for unenhanced classes. Modified: openjpa/trunk/openjpa-project/RELEASE-NOTES.html URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/RELEASE-NOTES.html?rev=1244602&r1=1244601&r2=1244602&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/RELEASE-NOTES.html (original) +++ openjpa/trunk/openjpa-project/RELEASE-NOTES.html Wed Feb 15 17:25:51 2012 @@ -354,6 +354,8 @@ in each release of OpenJPA.

  • [OPENJPA-487] - Generated SUBSTRING SQL is ugly and inefficient
  • +
  • [OPENJPA-758] - OpenJPA doesn't find ValueHandlers with an applicable class loader +
  • [OPENJPA-1555] - SQLBuffer code cleanup
  • [OPENJPA-1777] - Allow setting of diagonstic context for each slice in a more flexible manner From commits-return-9391-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 15 21:57:45 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8CA9A9757 for ; Wed, 15 Feb 2012 21:57:45 +0000 (UTC) Received: (qmail 69818 invoked by uid 500); 15 Feb 2012 21:57:45 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 69796 invoked by uid 500); 15 Feb 2012 21:57:45 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 69789 invoked by uid 99); 15 Feb 2012 21:57:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 21:57:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.8] (HELO aegis.apache.org) (140.211.11.8) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Feb 2012 21:57:43 +0000 Received: from aegis (localhost [127.0.0.1]) by aegis.apache.org (Postfix) with ESMTP id 72C87C0005 for ; Wed, 15 Feb 2012 21:57:22 +0000 (UTC) Date: Wed, 15 Feb 2012 21:57:22 +0000 (UTC) From: Apache Jenkins Server To: commits@openjpa.apache.org Message-ID: <249110084.1461329343042454.JavaMail.hudson@aegis> In-Reply-To: <1543182562.3141329248819294.JavaMail.hudson@aegis> References: <1543182562.3141329248819294.JavaMail.hudson@aegis> Subject: Jenkins build is back to normal : OpenJPA-trunk #650 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Jenkins-Job: OpenJPA-trunk X-Jenkins-Result: SUCCESS X-Virus-Checked: Checked by ClamAV on apache.org See From commits-return-9392-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 00:30:39 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B24109926 for ; Thu, 16 Feb 2012 00:30:39 +0000 (UTC) Received: (qmail 17470 invoked by uid 500); 16 Feb 2012 00:30:39 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 17450 invoked by uid 500); 16 Feb 2012 00:30:39 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 17443 invoked by uid 99); 16 Feb 2012 00:30:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 00:30:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 00:30:37 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D0ED32388900 for ; Thu, 16 Feb 2012 00:30:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244805 - /openjpa/trunk/pom.xml Date: Thu, 16 Feb 2012 00:30:16 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120216003016.D0ED32388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: allee8285 Date: Thu Feb 16 00:30:16 2012 New Revision: 1244805 URL: http://svn.apache.org/viewvc?rev=1244805&view=rev Log: [maven-release-plugin] prepare branch 2.2.x Modified: openjpa/trunk/pom.xml Modified: openjpa/trunk/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/pom.xml?rev=1244805&r1=1244804&r2=1244805&view=diff ============================================================================== --- openjpa/trunk/pom.xml (original) +++ openjpa/trunk/pom.xml Thu Feb 16 00:30:16 2012 @@ -143,9 +143,9 @@ - scm:svn:http://svn.apache.org/repos/asf/openjpa/trunk - scm:svn:https://svn.apache.org/repos/asf/openjpa/trunk - http://svn.apache.org/repos/asf/openjpa/trunk + scm:svn:http://svn.apache.org/repos/asf/openjpa/branches/2.2.x + scm:svn:https://svn.apache.org/repos/asf/openjpa/branches/2.2.x + http://svn.apache.org/repos/asf/openjpa/branches/2.2.x From commits-return-9393-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 00:30:42 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 857A0992D for ; Thu, 16 Feb 2012 00:30:42 +0000 (UTC) Received: (qmail 17614 invoked by uid 500); 16 Feb 2012 00:30:42 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 17589 invoked by uid 500); 16 Feb 2012 00:30:42 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 17582 invoked by uid 99); 16 Feb 2012 00:30:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 00:30:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 00:30:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id ED05323889BB for ; Thu, 16 Feb 2012 00:30:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244807 - /openjpa/branches/2.2.x/ Date: Thu, 16 Feb 2012 00:30:21 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120216003021.ED05323889BB@eris.apache.org> Author: allee8285 Date: Thu Feb 16 00:30:21 2012 New Revision: 1244807 URL: http://svn.apache.org/viewvc?rev=1244807&view=rev Log: [maven-release-plugin] copy for branch 2.2.x Added: openjpa/branches/2.2.x/ (props changed) - copied from r1244805, openjpa/trunk/ Propchange: openjpa/branches/2.2.x/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Feb 16 00:30:21 2012 @@ -0,0 +1,15 @@ +.* +openjpa-database +target +subs +*.bat +enhance.xml +user.dict +wip +patches +bin +*.log +maven-eclipse.xml +*.iml +*.ipr +*.iws Propchange: openjpa/branches/2.2.x/ ------------------------------------------------------------------------------ svn:mergeinfo = /openjpa/branches/1.0.x:736493 From commits-return-9394-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 00:31:00 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A7CA9932 for ; Thu, 16 Feb 2012 00:31:00 +0000 (UTC) Received: (qmail 18085 invoked by uid 500); 16 Feb 2012 00:31:00 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 18051 invoked by uid 500); 16 Feb 2012 00:31:00 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 18044 invoked by uid 99); 16 Feb 2012 00:31:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 00:31:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 00:30:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CD2A42388A29 for ; Thu, 16 Feb 2012 00:30:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244808 - in /openjpa/trunk: ./ openjpa-all/ openjpa-examples/ openjpa-examples/image-gallery/ openjpa-examples/openbooks/ openjpa-examples/simple/ openjpa-integration/ openjpa-integration/daytrader/ openjpa-integration/examples/ openjpa-i... Date: Thu, 16 Feb 2012 00:30:30 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120216003031.CD2A42388A29@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: allee8285 Date: Thu Feb 16 00:30:29 2012 New Revision: 1244808 URL: http://svn.apache.org/viewvc?rev=1244808&view=rev Log: [maven-release-plugin] prepare release 2.2.x Modified: openjpa/trunk/openjpa-all/pom.xml openjpa/trunk/openjpa-examples/image-gallery/pom.xml openjpa/trunk/openjpa-examples/openbooks/pom.xml openjpa/trunk/openjpa-examples/pom.xml openjpa/trunk/openjpa-examples/simple/pom.xml openjpa/trunk/openjpa-integration/daytrader/pom.xml openjpa/trunk/openjpa-integration/examples/pom.xml openjpa/trunk/openjpa-integration/jmx/pom.xml openjpa/trunk/openjpa-integration/pom.xml openjpa/trunk/openjpa-integration/slf4j/pom.xml openjpa/trunk/openjpa-integration/tck/pom.xml openjpa/trunk/openjpa-integration/validation/pom.xml openjpa/trunk/openjpa-jdbc/pom.xml openjpa/trunk/openjpa-jest/pom.xml openjpa/trunk/openjpa-kernel/pom.xml openjpa/trunk/openjpa-lib/pom.xml openjpa/trunk/openjpa-persistence-jdbc/pom.xml openjpa/trunk/openjpa-persistence-locking/pom.xml openjpa/trunk/openjpa-persistence/pom.xml openjpa/trunk/openjpa-project/pom.xml openjpa/trunk/openjpa-slice/pom.xml openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml openjpa/trunk/openjpa-tools/pom.xml openjpa/trunk/openjpa-xmlstore/pom.xml openjpa/trunk/openjpa/pom.xml openjpa/trunk/pom.xml Modified: openjpa/trunk/openjpa-all/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-all/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-all/pom.xml (original) +++ openjpa/trunk/openjpa-all/pom.xml Thu Feb 16 00:30:29 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-examples/image-gallery/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/image-gallery/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-examples/image-gallery/pom.xml (original) +++ openjpa/trunk/openjpa-examples/image-gallery/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-examples - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa.openjpa-examples Modified: openjpa/trunk/openjpa-examples/openbooks/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-examples/openbooks/pom.xml (original) +++ openjpa/trunk/openjpa-examples/openbooks/pom.xml Thu Feb 16 00:30:29 2012 @@ -29,7 +29,7 @@ org.apache.openjpa openjpa-examples - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa.openjpa-examples Modified: openjpa/trunk/openjpa-examples/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-examples/pom.xml (original) +++ openjpa/trunk/openjpa-examples/pom.xml Thu Feb 16 00:30:29 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-examples/simple/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/simple/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-examples/simple/pom.xml (original) +++ openjpa/trunk/openjpa-examples/simple/pom.xml Thu Feb 16 00:30:29 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-examples - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa.openjpa-examples Modified: openjpa/trunk/openjpa-integration/daytrader/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/daytrader/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/daytrader/pom.xml (original) +++ openjpa/trunk/openjpa-integration/daytrader/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT openjpa-integration-daytrader Modified: openjpa/trunk/openjpa-integration/examples/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/examples/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/examples/pom.xml (original) +++ openjpa/trunk/openjpa-integration/examples/pom.xml Thu Feb 16 00:30:29 2012 @@ -37,7 +37,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-integration/jmx/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/jmx/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/jmx/pom.xml (original) +++ openjpa/trunk/openjpa-integration/jmx/pom.xml Thu Feb 16 00:30:29 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT openjpa-integration-jmx Modified: openjpa/trunk/openjpa-integration/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/pom.xml (original) +++ openjpa/trunk/openjpa-integration/pom.xml Thu Feb 16 00:30:29 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-integration/slf4j/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/slf4j/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/slf4j/pom.xml (original) +++ openjpa/trunk/openjpa-integration/slf4j/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT openjpa-integration-slf4j Modified: openjpa/trunk/openjpa-integration/tck/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/tck/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/tck/pom.xml (original) +++ openjpa/trunk/openjpa-integration/tck/pom.xml Thu Feb 16 00:30:29 2012 @@ -75,7 +75,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-integration/validation/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/validation/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/validation/pom.xml (original) +++ openjpa/trunk/openjpa-integration/validation/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-jdbc/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/pom.xml (original) +++ openjpa/trunk/openjpa-jdbc/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-jest/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jest/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-jest/pom.xml (original) +++ openjpa/trunk/openjpa-jest/pom.xml Thu Feb 16 00:30:29 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-kernel/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/pom.xml (original) +++ openjpa/trunk/openjpa-kernel/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-lib/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-lib/pom.xml (original) +++ openjpa/trunk/openjpa-lib/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-persistence-jdbc/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/pom.xml (original) +++ openjpa/trunk/openjpa-persistence-jdbc/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-persistence-locking/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/pom.xml (original) +++ openjpa/trunk/openjpa-persistence-locking/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-persistence/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/pom.xml (original) +++ openjpa/trunk/openjpa-persistence/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-project/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/pom.xml (original) +++ openjpa/trunk/openjpa-project/pom.xml Thu Feb 16 00:30:29 2012 @@ -39,7 +39,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-slice/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-slice/pom.xml (original) +++ openjpa/trunk/openjpa-slice/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml (original) +++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-tools - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT ../pom.xml Modified: openjpa/trunk/openjpa-tools/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-tools/pom.xml (original) +++ openjpa/trunk/openjpa-tools/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT Modified: openjpa/trunk/openjpa-xmlstore/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-xmlstore/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa-xmlstore/pom.xml (original) +++ openjpa/trunk/openjpa-xmlstore/pom.xml Thu Feb 16 00:30:29 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/openjpa/pom.xml (original) +++ openjpa/trunk/openjpa/pom.xml Thu Feb 16 00:30:29 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT openjpa Modified: openjpa/trunk/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/pom.xml?rev=1244808&r1=1244807&r2=1244808&view=diff ============================================================================== --- openjpa/trunk/pom.xml (original) +++ openjpa/trunk/pom.xml Thu Feb 16 00:30:29 2012 @@ -39,7 +39,7 @@ Changing this version needs to also be done in all children poms See: http://jira.codehaus.org/browse/MNG-624 --> - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT ${project.version} @@ -143,9 +143,9 @@ - scm:svn:http://svn.apache.org/repos/asf/openjpa/branches/2.2.x - scm:svn:https://svn.apache.org/repos/asf/openjpa/branches/2.2.x - http://svn.apache.org/repos/asf/openjpa/branches/2.2.x + scm:svn:http://svn.apache.org/repos/asf/openjpa/trunk + scm:svn:https://svn.apache.org/repos/asf/openjpa/trunk + http://svn.apache.org/repos/asf/openjpa/trunk From commits-return-9395-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 00:36:27 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D95999BE for ; Thu, 16 Feb 2012 00:36:27 +0000 (UTC) Received: (qmail 29386 invoked by uid 500); 16 Feb 2012 00:36:27 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 29364 invoked by uid 500); 16 Feb 2012 00:36:27 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 29357 invoked by uid 99); 16 Feb 2012 00:36:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 00:36:27 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Thu, 16 Feb 2012 00:36:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1G0a06x021674 for ; Thu, 16 Feb 2012 00:36:01 GMT Date: Wed, 15 Feb 2012 19:36:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <6420578.45061.1329352560623.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Apache Nexus Release Process (1.2.x-2.1.x) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
    From commits-return-9396-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 01:22:30 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E8B6981D for ; Thu, 16 Feb 2012 01:22:30 +0000 (UTC) Received: (qmail 38023 invoked by uid 500); 16 Feb 2012 01:22:30 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 37979 invoked by uid 500); 16 Feb 2012 01:22:30 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 37970 invoked by uid 99); 16 Feb 2012 01:22:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 01:22:30 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Thu, 16 Feb 2012 01:22:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1G1M0gl023072 for ; Thu, 16 Feb 2012 01:22:00 GMT Date: Wed, 15 Feb 2012 20:22:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <24526981.45063.1329355320144.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Apache Nexus Release Process (1.2.x-2.1.x) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
    From commits-return-9397-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 14:21:36 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A57809232 for ; Thu, 16 Feb 2012 14:21:36 +0000 (UTC) Received: (qmail 898 invoked by uid 500); 16 Feb 2012 14:21:36 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 857 invoked by uid 500); 16 Feb 2012 14:21:36 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 849 invoked by uid 99); 16 Feb 2012 14:21:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 14:21:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 14:21:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 662532388865 for ; Thu, 16 Feb 2012 14:21:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244990 - /openjpa/tags/2.2.0/ Date: Thu, 16 Feb 2012 14:21:15 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120216142115.662532388865@eris.apache.org> Author: allee8285 Date: Thu Feb 16 14:21:15 2012 New Revision: 1244990 URL: http://svn.apache.org/viewvc?rev=1244990&view=rev Log: [maven-release-plugin] copy for tag 2.2.0 Added: openjpa/tags/2.2.0/ (props changed) - copied from r1244989, openjpa/branches/2.2.x/ Propchange: openjpa/tags/2.2.0/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Feb 16 14:21:15 2012 @@ -0,0 +1,15 @@ +.* +openjpa-database +target +subs +*.bat +enhance.xml +user.dict +wip +patches +bin +*.log +maven-eclipse.xml +*.iml +*.ipr +*.iws Propchange: openjpa/tags/2.2.0/ ------------------------------------------------------------------------------ svn:mergeinfo = /openjpa/branches/1.0.x:736493 From commits-return-9398-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 14:21:42 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E77B9235 for ; Thu, 16 Feb 2012 14:21:42 +0000 (UTC) Received: (qmail 1111 invoked by uid 500); 16 Feb 2012 14:21:42 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 1089 invoked by uid 500); 16 Feb 2012 14:21:42 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 1082 invoked by uid 99); 16 Feb 2012 14:21:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 14:21:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 14:21:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 53C132388860 for ; Thu, 16 Feb 2012 14:21:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244989 - in /openjpa/branches/2.2.x: ./ openjpa-all/ openjpa-examples/ openjpa-examples/image-gallery/ openjpa-examples/openbooks/ openjpa-examples/simple/ openjpa-integration/ openjpa-integration/daytrader/ openjpa-integration/examples/ ... Date: Thu, 16 Feb 2012 14:21:12 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120216142113.53C132388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: allee8285 Date: Thu Feb 16 14:21:11 2012 New Revision: 1244989 URL: http://svn.apache.org/viewvc?rev=1244989&view=rev Log: [maven-release-plugin] prepare release 2.2.0 Modified: openjpa/branches/2.2.x/openjpa-all/pom.xml openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml openjpa/branches/2.2.x/openjpa-examples/pom.xml openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml openjpa/branches/2.2.x/openjpa-integration/pom.xml openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml openjpa/branches/2.2.x/openjpa-jdbc/pom.xml openjpa/branches/2.2.x/openjpa-jest/pom.xml openjpa/branches/2.2.x/openjpa-kernel/pom.xml openjpa/branches/2.2.x/openjpa-lib/pom.xml openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml openjpa/branches/2.2.x/openjpa-persistence/pom.xml openjpa/branches/2.2.x/openjpa-project/pom.xml openjpa/branches/2.2.x/openjpa-slice/pom.xml openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml openjpa/branches/2.2.x/openjpa-tools/pom.xml openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml openjpa/branches/2.2.x/openjpa/pom.xml openjpa/branches/2.2.x/pom.xml Modified: openjpa/branches/2.2.x/openjpa-all/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-all/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-all/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-all/pom.xml Thu Feb 16 14:21:11 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-examples - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa.openjpa-examples Modified: openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml Thu Feb 16 14:21:11 2012 @@ -29,7 +29,7 @@ org.apache.openjpa openjpa-examples - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa.openjpa-examples Modified: openjpa/branches/2.2.x/openjpa-examples/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-examples/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-examples/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-examples/pom.xml Thu Feb 16 14:21:11 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml Thu Feb 16 14:21:11 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-examples - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa.openjpa-examples Modified: openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.0 openjpa-integration-daytrader Modified: openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml Thu Feb 16 14:21:11 2012 @@ -37,7 +37,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml Thu Feb 16 14:21:11 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.0 openjpa-integration-jmx Modified: openjpa/branches/2.2.x/openjpa-integration/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/pom.xml Thu Feb 16 14:21:11 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.0 openjpa-integration-slf4j Modified: openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml Thu Feb 16 14:21:11 2012 @@ -75,7 +75,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-jdbc/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-jdbc/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-jdbc/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-jdbc/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-jest/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-jest/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-jest/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-jest/pom.xml Thu Feb 16 14:21:11 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-kernel/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-kernel/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-kernel/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-lib/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-lib/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-lib/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-lib/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-persistence/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-persistence/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-project/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-project/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-project/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-project/pom.xml Thu Feb 16 14:21:11 2012 @@ -39,7 +39,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-slice/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-slice/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-slice/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-slice/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-tools - 2.2.0-SNAPSHOT + 2.2.0 ../pom.xml Modified: openjpa/branches/2.2.x/openjpa-tools/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-tools/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-tools/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-tools/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 Modified: openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml Thu Feb 16 14:21:11 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa/pom.xml Thu Feb 16 14:21:11 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0-SNAPSHOT + 2.2.0 openjpa Modified: openjpa/branches/2.2.x/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/pom.xml?rev=1244989&r1=1244988&r2=1244989&view=diff ============================================================================== --- openjpa/branches/2.2.x/pom.xml (original) +++ openjpa/branches/2.2.x/pom.xml Thu Feb 16 14:21:11 2012 @@ -39,7 +39,7 @@ Changing this version needs to also be done in all children poms See: http://jira.codehaus.org/browse/MNG-624 --> - 2.2.0-SNAPSHOT + 2.2.0 ${project.version} @@ -143,9 +143,9 @@ - scm:svn:http://svn.apache.org/repos/asf/openjpa/branches/2.2.x - scm:svn:https://svn.apache.org/repos/asf/openjpa/branches/2.2.x - http://svn.apache.org/repos/asf/openjpa/branches/2.2.x + scm:svn:http://svn.apache.org/repos/asf/openjpa/tags/2.2.0 + scm:svn:https://svn.apache.org/repos/asf/openjpa/tags/2.2.0 + http://svn.apache.org/repos/asf/openjpa/tags/2.2.0 From commits-return-9399-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 14:21:51 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D235923D for ; Thu, 16 Feb 2012 14:21:51 +0000 (UTC) Received: (qmail 1388 invoked by uid 500); 16 Feb 2012 14:21:51 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 1357 invoked by uid 500); 16 Feb 2012 14:21:51 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 1349 invoked by uid 99); 16 Feb 2012 14:21:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 14:21:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 14:21:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 53DB62388A2C for ; Thu, 16 Feb 2012 14:21:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1244991 - in /openjpa/branches/2.2.x: ./ openjpa-all/ openjpa-examples/ openjpa-examples/image-gallery/ openjpa-examples/openbooks/ openjpa-examples/simple/ openjpa-integration/ openjpa-integration/daytrader/ openjpa-integration/examples/ ... Date: Thu, 16 Feb 2012 14:21:25 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120216142126.53DB62388A2C@eris.apache.org> Author: allee8285 Date: Thu Feb 16 14:21:24 2012 New Revision: 1244991 URL: http://svn.apache.org/viewvc?rev=1244991&view=rev Log: [maven-release-plugin] prepare for next development iteration Modified: openjpa/branches/2.2.x/openjpa-all/pom.xml openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml openjpa/branches/2.2.x/openjpa-examples/pom.xml openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml openjpa/branches/2.2.x/openjpa-integration/pom.xml openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml openjpa/branches/2.2.x/openjpa-jdbc/pom.xml openjpa/branches/2.2.x/openjpa-jest/pom.xml openjpa/branches/2.2.x/openjpa-kernel/pom.xml openjpa/branches/2.2.x/openjpa-lib/pom.xml openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml openjpa/branches/2.2.x/openjpa-persistence/pom.xml openjpa/branches/2.2.x/openjpa-project/pom.xml openjpa/branches/2.2.x/openjpa-slice/pom.xml openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml openjpa/branches/2.2.x/openjpa-tools/pom.xml openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml openjpa/branches/2.2.x/openjpa/pom.xml openjpa/branches/2.2.x/pom.xml Modified: openjpa/branches/2.2.x/openjpa-all/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-all/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-all/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-all/pom.xml Thu Feb 16 14:21:24 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-examples/image-gallery/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-examples - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa.openjpa-examples Modified: openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-examples/openbooks/pom.xml Thu Feb 16 14:21:24 2012 @@ -29,7 +29,7 @@ org.apache.openjpa openjpa-examples - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa.openjpa-examples Modified: openjpa/branches/2.2.x/openjpa-examples/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-examples/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-examples/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-examples/pom.xml Thu Feb 16 14:21:24 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-examples/simple/pom.xml Thu Feb 16 14:21:24 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-examples - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa.openjpa-examples Modified: openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/daytrader/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.0 + 2.2.1-SNAPSHOT openjpa-integration-daytrader Modified: openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/examples/pom.xml Thu Feb 16 14:21:24 2012 @@ -37,7 +37,7 @@ org.apache.openjpa openjpa-integration - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/jmx/pom.xml Thu Feb 16 14:21:24 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-integration - 2.2.0 + 2.2.1-SNAPSHOT openjpa-integration-jmx Modified: openjpa/branches/2.2.x/openjpa-integration/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/pom.xml Thu Feb 16 14:21:24 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/slf4j/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.0 + 2.2.1-SNAPSHOT openjpa-integration-slf4j Modified: openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/tck/pom.xml Thu Feb 16 14:21:24 2012 @@ -75,7 +75,7 @@ org.apache.openjpa openjpa-integration - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-integration/validation/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-jdbc/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-jdbc/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-jdbc/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-jdbc/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-jest/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-jest/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-jest/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-jest/pom.xml Thu Feb 16 14:21:24 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-kernel/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-kernel/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-kernel/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-lib/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-lib/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-lib/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-lib/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-persistence-locking/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-persistence/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-persistence/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-project/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-project/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-project/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-project/pom.xml Thu Feb 16 14:21:24 2012 @@ -39,7 +39,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-slice/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-slice/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-slice/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-slice/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-tools/openjpa-maven-plugin/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-tools - 2.2.0 + 2.2.1-SNAPSHOT ../pom.xml Modified: openjpa/branches/2.2.x/openjpa-tools/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-tools/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-tools/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-tools/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT Modified: openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa-xmlstore/pom.xml Thu Feb 16 14:21:24 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT org.apache.openjpa Modified: openjpa/branches/2.2.x/openjpa/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa/pom.xml (original) +++ openjpa/branches/2.2.x/openjpa/pom.xml Thu Feb 16 14:21:24 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.0 + 2.2.1-SNAPSHOT openjpa Modified: openjpa/branches/2.2.x/pom.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/pom.xml?rev=1244991&r1=1244990&r2=1244991&view=diff ============================================================================== --- openjpa/branches/2.2.x/pom.xml (original) +++ openjpa/branches/2.2.x/pom.xml Thu Feb 16 14:21:24 2012 @@ -39,7 +39,7 @@ Changing this version needs to also be done in all children poms See: http://jira.codehaus.org/browse/MNG-624 --> - 2.2.0 + 2.2.1-SNAPSHOT ${project.version} @@ -143,9 +143,9 @@ - scm:svn:http://svn.apache.org/repos/asf/openjpa/tags/2.2.0 - scm:svn:https://svn.apache.org/repos/asf/openjpa/tags/2.2.0 - http://svn.apache.org/repos/asf/openjpa/tags/2.2.0 + scm:svn:http://svn.apache.org/repos/asf/openjpa/branches/2.2.x + scm:svn:https://svn.apache.org/repos/asf/openjpa/branches/2.2.x + http://svn.apache.org/repos/asf/openjpa/branches/2.2.x From commits-return-9400-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 14:41:27 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ABA739592 for ; Thu, 16 Feb 2012 14:41:27 +0000 (UTC) Received: (qmail 56827 invoked by uid 500); 16 Feb 2012 14:41:27 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 56800 invoked by uid 500); 16 Feb 2012 14:41:27 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 56792 invoked by uid 99); 16 Feb 2012 14:41:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 14:41:27 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Thu, 16 Feb 2012 14:41:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1GEf0Jp014592 for ; Thu, 16 Feb 2012 14:41:01 GMT Date: Thu, 16 Feb 2012 09:41:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <28779404.45209.1329403260162.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Apache Nexus Release Process (1.2.x-2.1.x) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
    From commits-return-9401-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 16:04:30 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 601159ADF for ; Thu, 16 Feb 2012 16:04:30 +0000 (UTC) Received: (qmail 70635 invoked by uid 500); 16 Feb 2012 16:04:30 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 70611 invoked by uid 500); 16 Feb 2012 16:04:30 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 70604 invoked by uid 99); 16 Feb 2012 16:04:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 16:04:30 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY 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; Thu, 16 Feb 2012 16:04:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1GG40uO016533 for ; Thu, 16 Feb 2012 16:04:00 GMT Date: Thu, 16 Feb 2012 11:04:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <25108976.45213.1329408240060.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Apache Nexus Release Process (1.2.x-2.1.x) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org

    Apache Nexus Release Process (1= .2.x-2.1.x)

    Page edited by Albert Lee


    Changes (3)

    =20 =20
    =20 =20
    ...
    $ mvn release:perform -Papach= e-release -Duser.name=3D<your_apache_uid>
    {code}
    {note} If your local OS user= id doesn't match your Apache userid, then you'll have to also overr= ide the value provided by the OS to Maven for the site-deploy step to work.= This does not work for Windows, it does work for Linux, and it is unknown = for Mac.
    {note}
    ### If running on Windows and your Apache userid do= esn't match your Windows userid add the hard coded site.deploy.url prop= erty to your the apache-release profile in your settings.xml file. There is= probably a better way to do this, but it seems to work.
    {code:none} <profile>
    <id>apache-release</id> <properties>
    <site.deploy.url>sc= p://people.apache.org/home/[APACHE_ID]/public_html/openjpa/[RELEASE, ie: 2.= 1.1]/staging-site</site.deploy.url>
    </properties>=
    </profile>
    {code}
    ## The maven-release-plugin i= s configured with goals "deploy site site-deploy" and will deploy= the site files to a staging-site directory on people.apache.org.
    # Ver= ify the release artifacts
    ## Verify the HTML links in staging-site/inde= x.html are correct
    ### Update downloads/ to apa= che-openjpa/downloads/
    ### Update docs/index.html to apache-openjpa/doc= s/index.html
    ### Login to people.apache.org
    ### Edit public_html/openjpa/\[rel= ease\]/staging-site/index.html and updates the followings:
    #### {code:n= one}
    <a href=3D"downloads/">Downloads</a>
    = to
    <a href=3D"apache-openjpa/downloads/">Download= s</a>
    {code}
    #### {code:none}
    <a href=3D"docs/i= ndex.html">docs/index.html</a></td>
    to
    &= lt;a href=3D"apache-openjpa/docs/index.html">docs/index.html&l= t;/a></td>
    {code}
    ## Login to Nexus.
    ## Ver= ify the staged artifacts in the nexus repo
    ...

    Full Content

    We're starting to move our builds over to using the Apache Nexus= repository (repository.apache.org) for releasing SNAPSHOT and release arti= facts. More details on releasing artifacts and using Nexus can be found on= the Maven website at - http://mav= en.apache.org/developers/release/apache-release.html

    Release Steps for OpenJPA 1.2.x - 2.1.x

      =09
    1. Environment setup for releasing artifacts (same for SNAPSHOTs and re= leases) - =09
        =09=09
      1. Increase the default Java heap available to Maven (required for J= ava SE 6)
        export MAVEN_OPTS=3D"-Xmx1024m -XX:MaxPermSize=3D512m"
        
      2. =09=09
      3. Use the latest Sun 1.6.0 JDK (1.5.0 for 1.2.x and 1.3.x)
      4. =09=09
      5. Use Maven 2.2.1 or later (2.2.1 is required for release signing f= ixes)
      6. =09=09
      7. Make sure the Release Setup steps have been performed. =09
      =09
    2. =09
    3. Prepare the source for release: =09
        =09=09
      1. Cleanup JIRA so the Fix Version in issues resolved since the last= release includes this release version correctly. Also, transition any Res= olved issues to the Closed state.
      2. =09=09
      3. Update the text files in a working copy of the openjpa-project su= bdir - =09=09
          =09=09=09
        1. Update the CHANGES.txt based on the Text release reports from = JIRA. =09=09=09
            =09=09=09=09
          1. Choose the release from the "Versions" tab in the releases page.
          2. =09=09=09=09
          3. Click "Release Notes" link in upper right.
          4. =09=09=09
          =09=09=09
        2. =09=09=09
        3. Update the RELEASE-NOTES.html based on the HTML release report= s from JIRA.
        4. =09=09=09
        5. Review and update README.txt and BUILDING.txt if needed.
        6. =09=09=09
        7. Commit any changes back to svn -
          $ svn commit -m "updating files for release"
          
        8. =09=09
        =09=09
      4. =09=09
      5. Stage any Roadmap or Release landing pages on the wiki.
      6. =09=09
      7. Verify the source has the required headers before trying to relea= se.
        $ mvn apache-rat:check
        
      8. =09=09
      9. Perform a full build with tests
        $ mvn clean install -Papache-release,docbook-profile,test-derby,bval
        
      10. =09=09
      11. Run the JPA 1.0 TCK (for 1.x) and JPA 2.0 TCK (for 2.x) to verify= the latest code passes.
      12. =09=09
      13. Perform a full build and deploy the SNAPSHOT artifacts
        $ mvn clean deploy site site-deploy -Papache-release,docbook-profile,test-d=
        erby,bval -DskipTests
        
      14. =09=09
      15. Inspect the files in your local target directories to ensure: =09=09
          =09=09=09
        1. All jars and zips include: LICENSE and NOTICE files
        2. =09=09=09
        3. The NOTICE files cover all third-party included files (like XS= D schemas)
        4. =09=09=09
        5. The LICENSE files include any third-party licenses (like XSD s= chemas)
        6. =09=09=09
        7. The openjpa and openjpa-all jars include the right packages. =09=09=09
        8. The openjpa source and release distribution files have the rig= ht content.
        9. =09=09=09
        10. All jars/zips/poms have .asc (PGP signature) and md5 files =09=09
        =09=09
      16. =09
      =09
    4. =09
    5. For new major releases (like 2.0.0 to 2.1.0) =09
        =09=09
      1. Create a sub-branch from which to make the release. Releasing fro= m a branch will allow any cosmetic changes that need to be made for the rel= ease to be approved to be done without preventing other more disruptive adv= ances in the trunk from potentially causing problems with the release. It a= lso provides a future maintenance branch (like 2.0.x.) A branch can be mad= e by running:
        $ mvn release:branch -DbranchName=3D2.0.x [-Dusername=3Dsvn.user -Dpassword=
        =3Dsvn.password]
        
      2. =09
      =09
    6. =09
    7. Checkout a clean copy of the trunk/branch to release using command l= ine svn. =09
        =09=09
      1. Do not use Eclipse to do the checkout. The extra dot (.) files c= reated by Eclipse throws off the rat:check processing and will get included= in the source distribution.
        $ svn checkout https://svn.apache.org/repos/asf/openjpa/branches/2.0.x/ 2.0=
        .1-rc1/
        
      2. =09
      =09
    8. =09
    9. (Optional) Do a dry run of the release:prepare step. =09
        =09=09
      1. The dry run will not commit any changes back to SVN and gives you= the opportunity to verify that the release process will complete as expect= ed. You will be prompted for the following information : =09=09
          =09=09=09
        1. Release version - take the default - (default 2.0.1)
        2. =09=09=09
        3. SCM release tag - *DO NOT TAKE THE DEFAULT - (default openjpa-= parent-2.0.1): : 2.0.1
        4. =09=09=09
        5. New development version - take the default - (default 2.0.2-SN= APSHOT)
        6. =09=09=09
        7. optional if you have not specified a GPG passphrase i= n settings.xml you will be prompted for it.
          $ mvn -Papache-release release:prepare -DdryRun=3Dtrue
          
          3D""If you cancel a release:prepare before i= t updates the pom.xml versions, then use the release:clean goal to j= ust remove the extra files that were created. If that doesn't help, try run= ning mvn clean.
        8. =09=09
        =09=09
      2. =09=09
      3. Verify that the release process completed as expected =09=09
          =09=09=09
        1. The release plugin will create pom.xml.tag files which contain= the changes that would have been committed to SVN. The only differences be= tween pom.xml.tag and it's corresponding pom.xml file should be the version= number.
        2. =09=09=09
        3. If other formatting changes have been made you should review t= he changes and then commit them -
          $ svn commit -m "fixing formatting for release"
          
        4. =09=09=09
        5. Assuming the .tag files look OK you may proceed and do any oth= er validation you feel necessary. The following list may be helpful =09=09=09
            =09=09=09=09
          1. Check release.properties and make sure that the scm propert= ies have the right version. Sometimes the scm location can be the previous = version not the next version.
          2. =09=09=09=09
          3. verify signatures Verifying release signatures
          4. =09=09=09
          =09=09=09
        6. =09=09
        =09=09
      4. =09=09
      5. Once any failures or required updates have been committed to svn,= rollback the release prepare files -
        $ mvn -Papache-release release:rollback
        
      6. =09
      =09
    10. =09
    11. Prepare the release =09
        =09=09
      1. Run the "release:prepare" step for real this time. You'll be pro= mpted for the same version information and optionally your GPG passphrase a= gain.
        $ mvn release:prepare -Papache-release,docbook-profile,test-derbymem,bval -=
        DskipTests [-Dusername=3Dsvn.user -Dpassword=3Dsvn.password] -DpreparationG=
        oals=3D"clean install"
        
        3D""Different arguments and steps are requir= ed as there are problems with the maven-jar-plugin and maven-release-plugin= when using the test-jar goal. See http://jira.codehaus.= org/browse/MJAR-68 and http://jira.codehaus.org= /browse/MRELEASE-285.
        $ mvn release:prepare -Papache-release,docbook-profile,test-derbymem,bval -=
        DskipTests -DpreparationGoals=3D"clean install"
        ... Build failed....
        $ mvn install -DskipTests
        $ mvn release:prepare -Papache-release,docbook-profile,test-derbymem,bval -=
        DskipTests -DpreparationGoals=3D"clean install"
        
      2. =09
      =09
    12. =09
    13. Backup (zip or tar) your local release candidate directory in case y= ou need to rollback the release after the next step is performed.
      $ cd ..
      $ tar -czf 2.0.1-rc1-preRelease.tar.gz 2.0.1-rc1/
      $ cd 2.0.1-rc1
      
    14. =09
    15. Perform the release =09
        =09=09
      1. This step will create a maven staging repository and site for use= in testing and voting. You will be prompted for your repository.apache.org= and people.apache.org password several times if you have not added server = profiles to your settings.xml. See Release Setup for more informati= on.
        $ mvn release:perform -Papache-release -Duser.name=3D<your_apache_uid>=
        ;
        
      2. =09=09
      3. The maven-release-plugin is configured with goals "deploy site si= te-deploy" and will deploy the site files to a staging-site directory on pe= ople.apache.org.
      4. =09
      =09
    16. =09
    17. Verify the release artifacts =09
        =09=09
      1. Verify the HTML links in staging-site/index.html are correct =09=09
          =09=09=09
        1. Login to people.apache.org
        2. =09=09=09
        3. Edit public_html/openjpa/[release]/staging-site/index.html and= updates the followings: =09=09=09
            =09=09=09=09
          1.   <a href=3D"downloads/">Downloads</a>
                 to
              <a href=3D"apache-openjpa/downloads/">Downloads</a>
            
  • =09=09=09=09
  •   <a href=3D"docs/index.html">docs/index.html</a></td>
         to
      <a href=3D"apache-openjpa/docs/index.html">docs/index.html</a>=
    ;</td>
    
  • =09=09=09 =09=09=09 =09=09 =09=09 =09=09
  • Login to Nexus.
  • =09=09
  • Verify the staged artifacts in the nexus repo =09=09
      =09=09=09
    1. https://repository.apache.org/index.html
    2. =09=09=09
    3. Enterprise --> Staging
    4. =09=09=09
    5. Staging tab --> Name column --> org.apache.openjpa
    6. =09=09=09
    7. Navigate through the artifact tree and make sure that all java= doc, sources, tests, jars, ... have .asc (GPG signature) and .md5 files. S= ee http://people.apache.org/~henkp/repo/faq.html and http://www.apache.o= rg/dev/release-signing.html#openpgp-ascii-detach-sig
    8. =09=09
    =09=09
  • =09=09
  • Close the nexus staging repo =09=09
      =09=09=09
    1. https://repository.apache.org/index.html
    2. =09=09=09
    3. Enterprise --> Staging
    4. =09=09=09
    5. Staging tab --> Name column --> org.apache.openjpa
    6. =09=09=09
    7. Right click on the open staging repo (org.apache.openjpa-XXX) = and select Close.
    8. =09=09
    =09=09
  • =09 =09 =09
  • Put the release candidate up for a vote =09
      =09=09
    1. Create a VOTE email thread on dev@openjpa to record votes as repl= ies, like -
      To: dev@
      Subject: [VOTE] Apache OpenJPA 2.0.1 Release Candidate
      
      I've created a 2.0.1 release candidate, with the following artifacts up for=
       a vote:
      
      SVN source tag (rXXXXXX):
      https://svn.apache.org/repos/asf/openjpa/tags/2.0.1/
      
      Maven staging repo:
      https://repository.apache.org/content/repositories/orgapacheopenjpa-XXX/
      
      Source release:
      https://repository.apache.org/content/repositories/orgapacheopenjpa-XXX/org=
      /apache/openjpa/openjpa-parent/2.0.1/openjpa-parent-2.0.1-source-release.zi=
      p
      
      Javadoc staging site:
      http://people.apache.org/~dwoods/openjpa/2.0.1/staging-site/apidocs/
      
      PGP release keys (signed using D018E6B1):
      https://svn.apache.org/repos/asf/openjpa/KEYS
      
      
      Vote will be open for 72 hours.
      
      [ ] +1  approve
      [ ] +0  no opinion
      [ ] -1  disapprove (and reason why)
      
      
    2. =09=09
    3. Create a DISCUSS email thread on dev@ for any vote questions, lik= e -
      To: dev@
      Subject: [DISCUSS] Apache OpenJPA 2.0.1 Release Candidate
      
      Discussion thread for vote on 2.0.1 release candidate, with SVN source tag =
      (rXXXXXX).
      
      For more information on the release process, checkout -
      http://www.apache.org/dev/release.html
      http://incubator.apache.org/guides/releasemanagement.html
      
      Some of the things to check before voting are:
      - does "mvn apache-rat:check" pass on the source
      - can you build the contents of source-release.zip and svn tag
      - do all of the staged jars/zips contain the required LICENSE and NOTICE fi=
      les
      - are all of the staged jars signed and the signature verifiable
      - is the signing key in the project's KEYS file and on a public server
      - does the release pass the TCK
      
      
    4. =09=09
    5. Perform a review of the release and cast your vote. See the foll= owing for more details on Apache releases - =09=09
        =09=09=09
      1. http://www.apache.org/dev/release.html =09=09=09
      2. http://incubator.apache.or= g/guides/releasemanagement.html
      3. =09=09
      =09=09
    6. =09=09
    7. A -1 vote does not necessarily mean that the vote must be redone,= however it is usually a good idea to rollback the release if a -1 vote is = received. See - Recovering from a vetoed release
    8. =09=09
    9. After the vote has been open for at least 72 hours, has at least = three +1 PMC votes and no -1 votes, then post the results to the vote threa= d by - =09=09
        =09=09=09
      1. reply to the initial email and prepend to the original subject= -
        [RESULTS]
      2. =09=09=09
      3. Include a list of everyone who voted +1, 0 or -1.
      4. =09=09
      =09=09
    10. =09
    =09
  • =09
  • Finalizing a release =09
      =09=09
    1. Promote the staged nexus artifacts - =09=09
        =09=09=09
      1. https://repository.apache.org/index.html
      2. =09=09=09
      3. Enterprise --> Staging
      4. =09=09=09
      5. Staging tab --> Name column --> org.apache.openjpa
      6. =09=09=09
      7. Right click on the closed staging repo (org.apache.openjpa-XXX= ) and select Promote.
      8. =09=09
      =09=09
    2. =09=09
    3. Copy the staged site over to the openjpa/builds location on peopl= e.apache.org. =09=09
        =09=09=09
      1. ssh to people.apache.org
        $ mkdir /www/openjpa.apache.org/builds/2.0.1
        $ cp -r ~/public_html/openjpa/2.0.1/staging-site/* /www/openjpa.apache.org/=
        builds/2.0.1/
        $ chmod -R g+w /www/openjpa.apache.org/builds/2.0.1
        
      2. =09=09=09
      3. Update the assemblies in the Downloads directory.
        For this, we'll just wget copies of the released assemblies with their sign= atures and hashes from the Apache repo:
        $ cd /www/openjpa.apache.org/builds/2.0.1/apache-openjpa/downloads
        wget https://repository.apache.org/content/repositories/releases/org/apache=
        /openjpa/apache-openjpa/2.0.1/apache-openjpa-2.0.1-source.zip
        wget https://repository.apache.org/content/repositories/releases/org/apache=
        /openjpa/apache-openjpa/2.0.1/apache-openjpa-2.0.1-binary.zip
        

        Along with the *.zip.asc, *.zip.md5 and *.zip.sha1 for both ZIP files ab= ove.

      4. =09=09=09
      5. verify that /www/openjpa.apache.org/builds/2.0.1/docs/manual i= s populated correctly by comparing it to a previous release.
        $ rm /www/openjpa.apache.org/docs/latest
        $ ln -fvs ../builds/2.0.1/apache-openjpa/docs/ /www/openjpa.apache.org/docs=
        /latest=20
        
      6. =09=09
      =09=09
    4. =09=09
    5. Copy the distribution artifacts over to the distribution area.
      mkdir /www/www.apache.org/dist/openjpa/2.0.1
      cp /www/openjpa.apache.org/builds/2.0.1/apache-openjpa/downloads/* /www/www=
      .apache.org/dist/openjpa/2.0.1/
      chgrp -R openjpa /www/www.apache.org/dist/openjpa/2.0.1
      chmod -R g+w /www/www.apache.org/dist/openjpa/2.0.1
      
      =09=09
        =09=09=09
      1. Optional: Remove the previous version from /dist. Ie if you're= publishing 2.0.1 you would remove 2.0.0. Verify that the release being re= moved is in the distribution archives before removing.
        $ ls -la /www/archive.apache.org/dist/openjpa/2.0.0/
        $ rm -rf /www/openjpa.apache.org/dist/openjpa/2.0.0
        
      2. =09=09
      =09=09
    6. =09=09
    7. Update the JIRA Releases page to mar= k the version as "released", and set the date to the date that the release = was approved. You may also need to make a new release entry for the next re= lease.
    8. =09
    =09
  • =09
  • Update wiki pages =09
      =09=09
    1. After the distribution and build files have been mirrored out to = the external sites (takes about an hour), update the Downloads and Docu= mentation pages with the new release.
    2. =09=09
    3. Make a news announcement on the OpenJPA wiki.
    4. =09
    =09
  • =09
  • Announcing the release =09
      =09=09
    1. After the Maven mirrors have had time to update (24 hours to be o= n the safe side) and the wiki updates have been exported and mirrored to th= e external website, then it's time to announce the release. Make an announ= cement about the release on the dev@, user@ and announce@apache.org list as per the Apache A= nnouncement Mailing Lists page)
    2. =09
    =09

  • Recovering from a vetoed release

      =09
    1. Reply to the initial vote email and prepend to the original subject = -
      [CANCELED]
    2. =09
    3. Rollback the version upgrades in trunk by either - =09
        =09=09
      1. Restore the 2.0.1-rc1.tar.gz and run
        $ mvn -Papache-release release:rollback
        
      2. =09=09
      3. Manually revert the versions in trunk to the prior version and co= mmit
      4. =09
      =09
    4. =09
    5. Delete the svn tag created by the release:perform step -
      $ svn del https://svn.apache.org/repos/asf/openjpa/tags/2.0.1 -m "rollback =
      release attempt"
      
    6. =09
    7. Drop the nexus staging repo =09
        =09=09
      1. https://repository.apache.org/index.html =09=09
      2. Enterprise --> Staging
      3. =09=09
      4. Staging tab --> Name column --> org.apache.openjpa
      5. =09=09
      6. Right click on the closed staging repo (org.apache.openjpa-XXX) a= nd select Drop.
      7. =09
      =09
    8. =09
    9. Remove the staged site
      $ ssh ${user.name}@people.apache.org=20
      $ cd ~/public_html/openjpa
      $ rm -fr ${project.version}
      
    10. =09
    11. Make the required updates that caused the vote to be canceled
    12. =09
    13. Spin another release candidate!


    Verifying release signatures

    On unix platforms the following command can be executed -

    for file in `find . -type f -iname '*.asc'`
    do
        gpg --verify ${file}=20
    done
    

    You'll need to look at the output to ensure it contains only good signat= ures -

    gpg: Good signature from ...
    gpg: Signature made ...
    


    From commits-return-9402-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Thu Feb 16 16:18:26 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 73CD791BD for ; Thu, 16 Feb 2012 16:18:26 +0000 (UTC) Received: (qmail 22042 invoked by uid 500); 16 Feb 2012 16:18:26 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 22021 invoked by uid 500); 16 Feb 2012 16:18:26 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 22006 invoked by uid 99); 16 Feb 2012 16:18:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 16:18:26 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Thu, 16 Feb 2012 16:18:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1GGI0Z3017011 for ; Thu, 16 Feb 2012 16:18:00 GMT Date: Thu, 16 Feb 2012 11:18:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <15718696.45215.1329409080024.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Apache Nexus Release Process (1.2.x-2.1.x) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
    From commits-return-9403-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 20 16:45:27 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2228F9FBD for ; Mon, 20 Feb 2012 16:45:27 +0000 (UTC) Received: (qmail 45441 invoked by uid 500); 20 Feb 2012 16:45:27 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 45392 invoked by uid 500); 20 Feb 2012 16:45:26 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 45375 invoked by uid 99); 20 Feb 2012 16:45:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 16:45:26 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Mon, 20 Feb 2012 16:45:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1KGj0Ca006386 for ; Mon, 20 Feb 2012 16:45:00 GMT Date: Mon, 20 Feb 2012 11:45:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <29724220.45922.1329756300025.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Apache Nexus Release Process (1.2.x-2.1.x) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
    From commits-return-9404-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 20 17:39:30 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B5929C0D for ; Mon, 20 Feb 2012 17:39:30 +0000 (UTC) Received: (qmail 5930 invoked by uid 500); 20 Feb 2012 17:39:30 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 5908 invoked by uid 500); 20 Feb 2012 17:39:30 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 5899 invoked by uid 99); 20 Feb 2012 17:39:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 17:39:30 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY 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; Mon, 20 Feb 2012 17:39:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1KHd08l007667 for ; Mon, 20 Feb 2012 17:39:00 GMT Date: Mon, 20 Feb 2012 12:39:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <354628.45928.1329759540027.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Downloads MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org

    Downloads

    Page edited by Albert Lee


    Changes (1)

    =20 =20
    =20 =20
    ...

    || || Download || Releas= e Date || Checksum || Signatures ||
    | [OpenJPA 2.2.0] Binary | [apache-openjpa-2.2.0-binary.zip|http://ww= w.apache.org/dyn/closer.cgi/openjpa/2.2.0/apache-openjpa-2.2.0-binary.zip] = | 20 February 2012 | [MD5|http://www.apache.org/dist/openjpa/2.2.0/apache-o= penjpa-2.2.0-binary.zip.md5] | [PGP|http://www.apache.org/dist/openjpa/2.2.= 0/apache-openjpa-2.2.0-binary.zip.asc] |
    | [OpenJPA 2.2.0] Source | [ap= ache-openjpa-2.2.0-source.zip|http://www.apache.org/dyn/closer.cgi/openjpa/= 2.2.0/apache-openjpa-2.2.0-source.zip] | 20 February 2012 | [MD5|http://www= .apache.org/dist/openjpa/2.2.0/apache-openjpa-2.2.0-source.zip.md5] | [PGP|= http://www.apache.org/dist/openjpa/2.2.0/apache-openjpa-2.2.0-source.zip.as= c] |
    | [OpenJPA 2.2.0] Release Notes | [RELEASE-NOTES.html|http://openj= pa.apache.org/builds/2.2.0/apache-openjpa/RELEASE-NOTES.html] | 20 February= 2012 | | |

    h3. 2.1.x Releases

    || || Download || Release = Date || Checksum || Signatures ||
    | [OpenJPA 2.1.1] Binary | [a= pache-openjpa-2.1.1-binary.zip|http://www.apache.org/dyn/closer.cgi/openjpa= /2.1.1/apache-openjpa-2.1.1-binary.zip] | 25 July 2011| [MD5|http://www.apa= che.org/dist/openjpa/2.1.1/apache-openjpa-2.1.1-binary.zip.md5] | [PGP|http= ://www.apache.org/dist/openjpa/2.1.1/apache-openjpa-2.1.1-binary.zip.asc] |=
    | [OpenJPA 2.1.1] Source | [apache-openjpa-2.1.1-source.zip|http://www= .apache.org/dyn/closer.cgi/openjpa/2.1.1/apache-openjpa-2.1.1-source.zip] |= 25 July 2011 | [MD5|http://www.apache.org/dist/openjpa/2.1.1/apache-openjp= a-2.1.1-source.zip.md5] | [PGP|http://www.apache.org/dist/openjpa/2.1.1/apa= che-openjpa-2.1.1-source.zip.asc] |
    ...

    Full Content

    =20

    OpenJPA Downloads

    Use the links below to download a distribution of Apache OpenJPA. It is = good practice to verify the integr= ity of the distribution files.

    For information on obtaining OpenJPA binaries, see the Obtaining page. Fo= r information on building OpenJPA from source, see the Building page.

    Official JPA 2.0 Relea= ses

    These releases implement the JSR-317 Java Persistence 2= .0 specification and pass the JPA 2.0 TCK.

    2.1.x Releases

      Download Release Date Checksum Signatures
    OpenJPA 2.2.0 Binary apache-openjpa-2.2.0-binary.zip 20 February 2012 MD5 PGP
    OpenJPA 2.2.0 Source apache-openjpa-2.2.0-source.zip 20 February 2012 MD5 PGP
    OpenJPA 2.2.0 Release Notes RELEASE-NOTES.html 20 February 2012    

    2.1.x Releases

      Download Release Date Checksum Signatures
    OpenJPA 2.1.1 Binary apache-openjpa-2.1.1-binary.zip 25 July 2011 MD5 PGP
    OpenJPA 2.1.1 Source apache-openjpa-2.1.1-source.zip 25 July 2011 MD5 PGP
    OpenJPA 2.1.1 Release Notes RELEASE-NOTES.html 25 July 2011    
    OpenJPA 2.1.0 Binary apache-openjpa-2.1.0-binary.zip 21 February 2011 MD5 PGP
    OpenJPA 2.1.0 Source apache-openjpa-2.1.0-source.zip 21 February 2011 MD5 PGP
    OpenJPA 2.1.0 Release Notes RELEASE-NOTES.html 21 February 2011    

    2.0.x Releases

      Download Release Date Checksum Signatures
    OpenJPA 2.0.1 Binary apache-openjpa-2.0.1-binary.zip 30 August 2010 MD5 PGP
    OpenJPA 2.0.1 Source apache-openjpa-2.0.1-source.zip 30 August 2010 MD5 PGP
    OpenJPA 2.0.1 Release Notes RELEASE-NOTES.html 30 August 2010    
    OpenJPA 2.0.0 Binary apache-openjpa-2.0.0-binary.zip 22 April 2010 MD5 PGP
    OpenJPA 2.0.0 Source apache-openjpa-2.0.0-source.zip 22 April 2010 MD5 PGP
    OpenJPA 2.0.0 Release Notes RELEASE-NOTES.html 22 April 2010    

    Official JPA 1.0 Relea= ses

    These releases implement the JSR-220 Java Persistence 1= .0 specification and pass the Sun JPA 1.0b Technology Compatibility Kit= .

    1.2.x Releases

      Download Release Date Signatures Release Notes
    OpenJPA 1.2.2 apache-openjpa-1.2.2-binary.zip 18 Jan 2010 PGP Release Notes
    OpenJPA 1.2.2 Source Code apache-openjpa-1.2.2-source.zip 18 Jan 2010 PGP  
    OpenJPA 1.2.1 apache-openjpa-1.2.1-binary.zip 18 Mar 2009 PGP Release Notes
    OpenJPA 1.2.1 Source Code apache-openjpa-1.2.1-source.zip 18 Mar 2009 PGP  
    OpenJPA 1.2.0 apache-openjpa-1.2.0-binary.zip 14 Aug 2008 PGP Release Notes
    OpenJPA 1.2.0 Source Code apache-openjpa-1.2.0-source.zip 14 Aug 2008 PGP  

    1.1.x Releases

      Download Release Date Signatures Release Notes
    OpenJPA 1.1.0 apache-openjpa-1.1.0-binary.zip 22 May 2008 PGP Release Notes
    OpenJPA 1.1.0 Source Code apache-openjpa-1.1.0-source.zip 22 May 2008 PGP  

    1.0.x Releases

      Download Release Date Signatures Release Notes
    OpenJPA 1.0.4 apache-openjpa-1.0.4-binary.zip 18 Jan 2010 PGP Release Notes
    OpenJPA 1.0.4 Source Code apache-openjpa-1.0.4-source.zip 18 Jan 2010 PGP  
    OpenJPA 1.0.3 apache-openjpa-1.0.3-binary.zip 18 Feb 2008 PGP Release Notes
    OpenJPA 1.0.3 Source Code apache-openjpa-1.0.3-source.zip 18 Feb 2008 PGP  
    OpenJPA 1.0.2 apache-openjpa-1.0.2-binary.zip 18 Feb 2008 PGP Release Notes
    OpenJPA 1.0.2 Source Code apache-openjpa-1.0.2-source.zip 18 Feb 2008 PGP  
    OpenJPA 1.0.2 Source Code apache-openjpa-1.0.2-source.zip 18 Feb 2008 PGP  
    OpenJPA 1.0.1 apache-openjpa-1.0.1-binary.zip 9 Nov 2007 PGP Release Notes
    OpenJPA 1.0.1 Source Code apache-openjpa-1.0.1-source.zip 9 Nov 2007 PGP  
    OpenJPA 1.0.0 apache-openjpa-1.0.0-binary.zip 28 Aug 2007 PGP Release Notes
    OpenJPA 1.0.0 Source Code apache-openjpa-1.0.0-source.zip 28 Au 2007 PGP  

    Nightly Snapshots

    These distributions are built and deployed nightly, and contain up-to-da= te fixes and improvements. However, their stability cannot be guaranteed. U= se at your own risk.

    Snapshot builds for all active releases are= published to the Apache snapshot repository.

    Version 1.2.x, 1.3.x, 2.0.x, 2.1.x and trunk (2.2.x as o= f this writing) can be found in the snapshot repository on repository.apach= e.org. A maven project can access this snapshot repository by adding the fo= llowing repository in pom.xml:
    <repository>
        <id>apache.snapshots</id>
        <name>Apache Snapshot Repository<=
    span class=3D"code-tag"></name>
        <url>http://repository.apache.org=
    /snapshots</url>
        <releases>
            <enabled>false</enabled>
        </releases>
    </repository>
    
    For versions 1.0.x, and 1.1.x you can find the sna= pshots on people.apache.org.

    A maven project can access the snapshot builds by adding the following r= epository in pom.xml :

    <repository>
        <id>people.apache.org.snapshots</id>
        <name>people.apache.org.snapshots=
    </name>
        <url>http://people.apache.org/rep=
    o/m2-snapshot-repository</url>
    </repository>
    

    Pre-packaged binarie= s for SNAPSHOT releases are available in the snapshot repository at the fol= lowing locations:

    For the 1.2.x, 1.3.x, 2.0.x, 2.1.x and 2.2.x SNAPSHOTs, please scroll do= wn to the bottom of the artifact list to grab the latest ones, as we're let= ting Maven create timestamped artifacts when publishing to the new Apache N= exus repo.

    Older incubating Rele= ases

      Download Release Date Signatures
    OpenJPA 0.9.7 openjpa-project-0.9.7-incubating-binary.zip 27 April 2007 MD5 PGP
    OpenJPA 0.9.7 Source Code openjpa-project-0.9.7-incubating-source.zip 27 April 2007 MD5 PGP
    OpenJPA 0.9.6 openjpa-project-0.9.6-incubating-binary.zip 29 November 2006 MD5 PGP
    OpenJPA 0.9.6 Source Code openjpa-project-0.9.6-incubating-source.zip 29 November 2006 MD5 PGP

    Verifying = Release Version and Revision

    OpenJPA jar is self-describing and after downloading a release or nightl= y snapshot, you can find out the revision number included in the build by:<= /p>

    % java -jar your/path/to/openjpa.jar
    

    which will print the version and revision numbers, for example:

    OpenJPA 2.1.0-SNAPSHOT
    version id: openjpa-2.1.0-SNAPSHOT-r422266:935231
    Apache svn revision: 422266:935231
    

    which designates that the nightly build includes Apache SVN revision 935231 as the latest.

    Verifying Releases

    We strongly recommend you verify the integrity of the downloaded files w= ith both PGP and MD5. The PGP signatures can be verified using PGP or GP= G. First download the KEYS as well as the *.a= sc signature file for the particular distribution. Make sure you get t= hese files from the main distribution directory, rather than from a mirror.= Then verify the signatures using one of the following sets of commands:

    Veri= fying Release Files using the pgpk Utility

    % pgpk -a KEYS
    % pgpv openjpa-*.zip.asc
    

    Verif= ying Release Files using the pgp Utility

    % pgp -ka KEYS
    % pgp openjpa-*.zip.asc
    

    Verif= ying Release Files using the gpg Utility

    % gpg --import KEYS
    % gpg --verify openjpa-*.zip.asc
    

    Alternatively, you can verify the checksums on the files. Unix programs = called md5/sha1 or md5sum/sha1sum are included = in many unix distributions. *sum is also available as part of GNU Textutils. Windows users can get binary md5= programs from here or here. fsum supports MD5 and SHA1.

    From commits-return-9405-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 20 17:45:21 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C0059CF3 for ; Mon, 20 Feb 2012 17:45:21 +0000 (UTC) Received: (qmail 22295 invoked by uid 500); 20 Feb 2012 17:45:21 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 22269 invoked by uid 500); 20 Feb 2012 17:45:21 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 22256 invoked by uid 99); 20 Feb 2012 17:45:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 17:45:21 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Mon, 20 Feb 2012 17:45:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1KHj0WX007710 for ; Mon, 20 Feb 2012 17:45:00 GMT Date: Mon, 20 Feb 2012 12:45:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <821983.45930.1329759900029.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Documentation MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
    From commits-return-9406-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 20 20:37:33 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1AAF598C0 for ; Mon, 20 Feb 2012 20:37:33 +0000 (UTC) Received: (qmail 13547 invoked by uid 500); 20 Feb 2012 20:37:33 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 13529 invoked by uid 500); 20 Feb 2012 20:37:33 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 13520 invoked by uid 99); 20 Feb 2012 20:37:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 20:37:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 20:37:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9866E2388ABA for ; Mon, 20 Feb 2012 20:37:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1291435 - in /openjpa/trunk: ./ openjpa-all/ openjpa-examples/ openjpa-examples/image-gallery/ openjpa-examples/openbooks/ openjpa-examples/simple/ openjpa-integration/ openjpa-integration/daytrader/ openjpa-integration/examples/ openjpa-i... Date: Mon, 20 Feb 2012 20:37:06 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120220203707.9866E2388ABA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: allee8285 Date: Mon Feb 20 20:37:05 2012 New Revision: 1291435 URL: http://svn.apache.org/viewvc?rev=1291435&view=rev Log: Update pom.xml version to 2.3.0-SNAPSHOTS in trunk after 2.2.0 is released. Modified: openjpa/trunk/openjpa-all/pom.xml openjpa/trunk/openjpa-examples/image-gallery/pom.xml openjpa/trunk/openjpa-examples/openbooks/pom.xml openjpa/trunk/openjpa-examples/pom.xml openjpa/trunk/openjpa-examples/simple/pom.xml openjpa/trunk/openjpa-integration/daytrader/pom.xml openjpa/trunk/openjpa-integration/examples/pom.xml openjpa/trunk/openjpa-integration/jmx/pom.xml openjpa/trunk/openjpa-integration/pom.xml openjpa/trunk/openjpa-integration/slf4j/pom.xml openjpa/trunk/openjpa-integration/tck/pom.xml openjpa/trunk/openjpa-integration/validation/pom.xml openjpa/trunk/openjpa-jdbc/pom.xml openjpa/trunk/openjpa-jest/pom.xml openjpa/trunk/openjpa-kernel/pom.xml openjpa/trunk/openjpa-lib/pom.xml openjpa/trunk/openjpa-persistence-jdbc/pom.xml openjpa/trunk/openjpa-persistence-locking/pom.xml openjpa/trunk/openjpa-persistence/pom.xml openjpa/trunk/openjpa-project/pom.xml openjpa/trunk/openjpa-slice/pom.xml openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml openjpa/trunk/openjpa-tools/pom.xml openjpa/trunk/openjpa-xmlstore/pom.xml openjpa/trunk/openjpa/pom.xml openjpa/trunk/pom.xml Modified: openjpa/trunk/openjpa-all/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-all/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-all/pom.xml (original) +++ openjpa/trunk/openjpa-all/pom.xml Mon Feb 20 20:37:05 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-examples/image-gallery/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/image-gallery/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-examples/image-gallery/pom.xml (original) +++ openjpa/trunk/openjpa-examples/image-gallery/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-examples - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa.openjpa-examples Modified: openjpa/trunk/openjpa-examples/openbooks/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/openbooks/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-examples/openbooks/pom.xml (original) +++ openjpa/trunk/openjpa-examples/openbooks/pom.xml Mon Feb 20 20:37:05 2012 @@ -29,7 +29,7 @@ org.apache.openjpa openjpa-examples - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa.openjpa-examples Modified: openjpa/trunk/openjpa-examples/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-examples/pom.xml (original) +++ openjpa/trunk/openjpa-examples/pom.xml Mon Feb 20 20:37:05 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-examples/simple/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/simple/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-examples/simple/pom.xml (original) +++ openjpa/trunk/openjpa-examples/simple/pom.xml Mon Feb 20 20:37:05 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-examples - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa.openjpa-examples Modified: openjpa/trunk/openjpa-integration/daytrader/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/daytrader/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/daytrader/pom.xml (original) +++ openjpa/trunk/openjpa-integration/daytrader/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT openjpa-integration-daytrader Modified: openjpa/trunk/openjpa-integration/examples/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/examples/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/examples/pom.xml (original) +++ openjpa/trunk/openjpa-integration/examples/pom.xml Mon Feb 20 20:37:05 2012 @@ -37,7 +37,7 @@ org.apache.openjpa openjpa-integration - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-integration/jmx/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/jmx/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/jmx/pom.xml (original) +++ openjpa/trunk/openjpa-integration/jmx/pom.xml Mon Feb 20 20:37:05 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-integration - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT openjpa-integration-jmx Modified: openjpa/trunk/openjpa-integration/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/pom.xml (original) +++ openjpa/trunk/openjpa-integration/pom.xml Mon Feb 20 20:37:05 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-integration/slf4j/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/slf4j/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/slf4j/pom.xml (original) +++ openjpa/trunk/openjpa-integration/slf4j/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT openjpa-integration-slf4j Modified: openjpa/trunk/openjpa-integration/tck/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/tck/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/tck/pom.xml (original) +++ openjpa/trunk/openjpa-integration/tck/pom.xml Mon Feb 20 20:37:05 2012 @@ -75,7 +75,7 @@ org.apache.openjpa openjpa-integration - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-integration/validation/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/validation/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-integration/validation/pom.xml (original) +++ openjpa/trunk/openjpa-integration/validation/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-integration - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-jdbc/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/pom.xml (original) +++ openjpa/trunk/openjpa-jdbc/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-jest/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jest/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-jest/pom.xml (original) +++ openjpa/trunk/openjpa-jest/pom.xml Mon Feb 20 20:37:05 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-kernel/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/pom.xml (original) +++ openjpa/trunk/openjpa-kernel/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-lib/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-lib/pom.xml (original) +++ openjpa/trunk/openjpa-lib/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-persistence-jdbc/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/pom.xml (original) +++ openjpa/trunk/openjpa-persistence-jdbc/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-persistence-locking/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/pom.xml (original) +++ openjpa/trunk/openjpa-persistence-locking/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-persistence/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/pom.xml (original) +++ openjpa/trunk/openjpa-persistence/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-project/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/pom.xml (original) +++ openjpa/trunk/openjpa-project/pom.xml Mon Feb 20 20:37:05 2012 @@ -39,7 +39,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-slice/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-slice/pom.xml (original) +++ openjpa/trunk/openjpa-slice/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml (original) +++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-tools - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT ../pom.xml Modified: openjpa/trunk/openjpa-tools/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-tools/pom.xml (original) +++ openjpa/trunk/openjpa-tools/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT Modified: openjpa/trunk/openjpa-xmlstore/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-xmlstore/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa-xmlstore/pom.xml (original) +++ openjpa/trunk/openjpa-xmlstore/pom.xml Mon Feb 20 20:37:05 2012 @@ -27,7 +27,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT org.apache.openjpa Modified: openjpa/trunk/openjpa/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/openjpa/pom.xml (original) +++ openjpa/trunk/openjpa/pom.xml Mon Feb 20 20:37:05 2012 @@ -28,7 +28,7 @@ org.apache.openjpa openjpa-parent - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT openjpa Modified: openjpa/trunk/pom.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/pom.xml?rev=1291435&r1=1291434&r2=1291435&view=diff ============================================================================== --- openjpa/trunk/pom.xml (original) +++ openjpa/trunk/pom.xml Mon Feb 20 20:37:05 2012 @@ -39,7 +39,7 @@ Changing this version needs to also be done in all children poms See: http://jira.codehaus.org/browse/MNG-624 --> - 2.2.1-SNAPSHOT + 2.3.0-SNAPSHOT ${project.version} From commits-return-9407-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 10:53:07 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFA5A95E8 for ; Tue, 21 Feb 2012 10:53:07 +0000 (UTC) Received: (qmail 35416 invoked by uid 500); 21 Feb 2012 10:53:07 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 35350 invoked by uid 500); 21 Feb 2012 10:53:07 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 35340 invoked by uid 99); 21 Feb 2012 10:53:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 10:53:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.8] (HELO aegis.apache.org) (140.211.11.8) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 10:53:04 +0000 Received: from aegis (localhost [127.0.0.1]) by aegis.apache.org (Postfix) with ESMTP id 69E8FC00A0 for ; Tue, 21 Feb 2012 10:52:44 +0000 (UTC) Date: Tue, 21 Feb 2012 10:52:34 +0000 (UTC) From: Apache Jenkins Server To: commits@openjpa.apache.org Message-ID: <767164569.5231329821559359.JavaMail.hudson@aegis> Subject: Build failed in Jenkins: OpenJPA-trunk-deploy #250 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Jenkins-Job: OpenJPA-trunk-deploy X-Jenkins-Result: FAILURE See Changes: [allee8285] Update pom.xml version to 2.3.0-SNAPSHOTS in trunk after 2.2.0 is released. ------------------------------------------ [...truncated 25339 lines...] [WARNING] We have a duplicate org/apache/commons/beanutils/converters/FloatConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/IntegerArrayConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/IntegerConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/LongArrayConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/LongConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/NumberConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/ShortArrayConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/ShortConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/SqlDateConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/SqlTimeConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/SqlTimestampConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/StringArrayConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/StringConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/converters/URLConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/ConvertingWrapDynaBean.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/ConvertUtils.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/ConvertUtilsBean.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/ConvertUtilsBean2.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/DynaBean.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/DynaBeanMapDecorator$MapEntry.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/DynaBeanMapDecorator.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/DynaClass.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/DynaProperty.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/expression/DefaultResolver.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/expression/Resolver.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/JDBCDynaClass.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/LazyDynaBean.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/LazyDynaClass.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/LazyDynaList.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/LazyDynaMap.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/BaseLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/BigDecimalLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/BigIntegerLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/ByteLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/DateLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/DoubleLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/FloatLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/IntegerLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/LongLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/ShortLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/SqlDateLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/SqlTimeLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/SqlTimestampLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/converters/StringLocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleBeanUtils$Descriptor.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleBeanUtils.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleBeanUtilsBean$1.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleBeanUtilsBean$Descriptor.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleBeanUtilsBean.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleConverter.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleConvertUtils.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleConvertUtilsBean$1.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleConvertUtilsBean$DelegateFastHashMap.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/locale/LocaleConvertUtilsBean.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/MappedPropertyDescriptor$MappedMethodReference.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/MappedPropertyDescriptor.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/MethodUtils$MethodDescriptor.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/MethodUtils.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/MutableDynaClass.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/NestedNullException.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/PropertyUtils.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/PropertyUtilsBean.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/ResultSetDynaClass.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/ResultSetIterator.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/RowSetDynaClass.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WeakFastHashMap$1.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WeakFastHashMap$CollectionView$CollectionViewIterator.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WeakFastHashMap$CollectionView.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WeakFastHashMap$EntrySet.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WeakFastHashMap$KeySet.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WeakFastHashMap$Values.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WeakFastHashMap.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WrapDynaBean.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WrapDynaClass$1.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WrapDynaClass$2.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/beanutils/WrapDynaClass.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/ArrayStack.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/Buffer.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/BufferUnderflowException.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/FastHashMap$1.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/FastHashMap$CollectionView$CollectionViewIterator.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/FastHashMap$CollectionView.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/FastHashMap$EntrySet.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/FastHashMap$KeySet.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/FastHashMap$Values.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [WARNING] We have a duplicate org/apache/commons/collections/FastHashMap.class in /home/hudson/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar [INFO] Replacing original artifact with shaded artifact. [INFO] Replacing with [INFO] [ianal:verify-legal-files {execution: default}] [INFO] Checking legal files in: openjpa-all-2.3.0-SNAPSHOT.jar [INFO] Checking legal files in: openjpa-all-2.3.0-SNAPSHOT-tests.jar [INFO] [apache-rat:check {execution: default}] [INFO] Exclude: **/.*/** [INFO] Exclude: **/target/**/* [INFO] [install:install {execution: default-install}] [INFO] Installing to /home/hudson/.m2/repository/org/apache/openjpa/openjpa-all/2.3.0-SNAPSHOT/openjpa-all-2.3.0-SNAPSHOT.jar [INFO] Installing to /home/hudson/.m2/repository/org/apache/openjpa/openjpa-all/2.3.0-SNAPSHOT/openjpa-all-2.3.0-SNAPSHOT-tests.jar [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from apache.snapshots.https [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'fcffd1b14e978d80acf507662016bbae78ff6344'; remote = '74a603df57f1c9e6a9eac85bc9c5a1746ac3c676' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'fcffd1b14e978d80acf507662016bbae78ff6344'; remote = '74a603df57f1c9e6a9eac85bc9c5a1746ac3c676' - IGNORING Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/openjpa/openjpa-all/2.3.0-SNAPSHOT/openjpa-all-2.3.0-20120221.081550-3.jar 6555K uploaded (openjpa-all-2.3.0-20120221.081550-3.jar) [INFO] Retrieving previous metadata from apache.snapshots.https [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '7c1d6f1e65ec5e217f3f38927a68f21e4b282353'; remote = 'f950ba398b1bd1c76259bd9fb2396b795126ddff' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '7c1d6f1e65ec5e217f3f38927a68f21e4b282353'; remote = 'f950ba398b1bd1c76259bd9fb2396b795126ddff' - IGNORING [INFO] Uploading repository metadata for: 'artifact org.apache.openjpa:openjpa-all' [INFO] Uploading project information for openjpa-all 2.3.0-20120221.081550-3 [INFO] Retrieving previous metadata from apache.snapshots.https [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'fcffd1b14e978d80acf507662016bbae78ff6344'; remote = '74a603df57f1c9e6a9eac85bc9c5a1746ac3c676' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'fcffd1b14e978d80acf507662016bbae78ff6344'; remote = '74a603df57f1c9e6a9eac85bc9c5a1746ac3c676' - IGNORING [INFO] Uploading repository metadata for: 'snapshot org.apache.openjpa:openjpa-all:2.3.0-SNAPSHOT' [INFO] Retrieving previous build number from apache.snapshots.https Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/openjpa/openjpa-all/2.3.0-SNAPSHOT/openjpa-all-2.3.0-20120221.081550-3-tests.jar 20K uploaded (openjpa-all-2.3.0-20120221.081550-3-tests.jar) [JENKINS] Re-archiving [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk-deploy/modules/org.apache.openjpa$openjpa-all/builds/2012-02-21_07-43-23/archive/org.apache.openjpa/openjpa-all/2.3.0-20120221.081550-3/openjpa-all-2.3.0-20120221.081550-3.jar [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk-deploy/modules/org.apache.openjpa$openjpa-all/builds/2012-02-21_07-43-23/archive/org.apache.openjpa/openjpa-all/2.3.0-20120221.081550-3/openjpa-all-2.3.0-20120221.081550-3-tests.jar [INFO] ------------------------------------------------------------------------ [INFO] Building OpenJPA Project Docs and Assemblies [INFO] task-segment: [clean, deploy] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting file set: (included: [**], excluded: []) [INFO] [buildnumber:create {execution: default}] [INFO] [enforcer:enforce {execution: default}] [INFO] [checkstyle:checkstyle {execution: default}] [INFO] Source directory does not exist - skipping report. [INFO] [remote-resources:process {execution: default}] [INFO] [compiler:testCompile {execution: test-source-compile}] [INFO] No sources to compile [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [INFO] [assembly:attached {execution: bin}] [INFO] Reading assembly descriptor: assembly.xml [WARNING] Cannot include project artifact: org.apache.openjpa:apache-openjpa:pom:2.3.0-SNAPSHOT; it doesn't have an associated file or directory. [WARNING] Cannot include project artifact: org.apache.openjpa:apache-openjpa:pom:2.3.0-SNAPSHOT; it doesn't have an associated file or directory. [INFO] Building zip: [WARNING] DEPRECATED [descriptor]: Please use descriptors instead [INFO] [assembly:attached {execution: sources}] [INFO] apache-openjpa-2.3.0-SNAPSHOT-source/README.txt already added, skipping [INFO] apache-openjpa-2.3.0-SNAPSHOT-source/LICENSE already added, skipping [INFO] apache-openjpa-2.3.0-SNAPSHOT-source/NOTICE already added, skipping [INFO] Building zip: [INFO] apache-openjpa-2.3.0-SNAPSHOT-source/README.txt already added, skipping [INFO] apache-openjpa-2.3.0-SNAPSHOT-source/LICENSE already added, skipping [INFO] apache-openjpa-2.3.0-SNAPSHOT-source/NOTICE already added, skipping [INFO] [ianal:verify-legal-files {execution: default}] [INFO] Checking legal files in: apache-openjpa-2.3.0-SNAPSHOT-binary.zip [INFO] Checking legal files in: apache-openjpa-2.3.0-SNAPSHOT-source.zip [WARNING] Artifact does not contain any legal files: apache-openjpa-2.3.0-SNAPSHOT-source.zip [INFO] [apache-rat:check {execution: default}] [INFO] Exclude: **/.*/** [INFO] Exclude: **/target/**/* [INFO] [install:install {execution: default-install}] [INFO] Installing to /home/hudson/.m2/repository/org/apache/openjpa/apache-openjpa/2.3.0-SNAPSHOT/apache-openjpa-2.3.0-SNAPSHOT.pom [INFO] Installing to /home/hudson/.m2/repository/org/apache/openjpa/apache-openjpa/2.3.0-SNAPSHOT/apache-openjpa-2.3.0-SNAPSHOT-binary.zip [INFO] Installing to /home/hudson/.m2/repository/org/apache/openjpa/apache-openjpa/2.3.0-SNAPSHOT/apache-openjpa-2.3.0-SNAPSHOT-source.zip [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from apache.snapshots.https [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '7e929778800a44c6ca5134e25393c79c219a9101'; remote = '23f9fbecdc4e925264d4c1d0bdee10e953b5f568' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '7e929778800a44c6ca5134e25393c79c219a9101'; remote = '23f9fbecdc4e925264d4c1d0bdee10e953b5f568' - IGNORING Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/openjpa/apache-openjpa/2.3.0-SNAPSHOT/apache-openjpa-2.3.0-20120221.081550-3.pom 21K uploaded (apache-openjpa-2.3.0-20120221.081550-3.pom) [INFO] Retrieving previous metadata from apache.snapshots.https [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '7e929778800a44c6ca5134e25393c79c219a9101'; remote = '23f9fbecdc4e925264d4c1d0bdee10e953b5f568' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '7e929778800a44c6ca5134e25393c79c219a9101'; remote = '23f9fbecdc4e925264d4c1d0bdee10e953b5f568' - IGNORING [INFO] Uploading repository metadata for: 'snapshot org.apache.openjpa:apache-openjpa:2.3.0-SNAPSHOT' [INFO] Retrieving previous metadata from apache.snapshots.https [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'b79bfa48d0716b120a20044b726474f39d5e5ef6'; remote = 'dd6ab63474d453b0a73756da899a80ae0a740f5d' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'b79bfa48d0716b120a20044b726474f39d5e5ef6'; remote = 'dd6ab63474d453b0a73756da899a80ae0a740f5d' - IGNORING [INFO] Uploading repository metadata for: 'artifact org.apache.openjpa:apache-openjpa' [INFO] Retrieving previous build number from apache.snapshots.https Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/openjpa/apache-openjpa/2.3.0-SNAPSHOT/apache-openjpa-2.3.0-20120221.081550-3-binary.zip 15664K uploaded (apache-openjpa-2.3.0-20120221.081550-3-binary.zip) [INFO] Retrieving previous build number from apache.snapshots.https Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/openjpa/apache-openjpa/2.3.0-SNAPSHOT/apache-openjpa-2.3.0-20120221.081550-3-source.zip 11445K uploaded (apache-openjpa-2.3.0-20120221.081550-3-source.zip) [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk-deploy/modules/org.apache.openjpa$apache-openjpa/builds/2012-02-21_07-43-23/archive/org.apache.openjpa/apache-openjpa/2.3.0-SNAPSHOT/apache-openjpa-2.3.0-SNAPSHOT.pom [JENKINS] Archiving /home/hudson/.m2/repository/org/apache/openjpa/apache-openjpa/2.3.0-SNAPSHOT/apache-openjpa-2.3.0-SNAPSHOT.pom to /home/hudson/hudson/jobs/OpenJPA-trunk-deploy/modules/org.apache.openjpa$apache-openjpa/builds/2012-02-21_07-43-23/archive/org.apache.openjpa/apache-openjpa/2.3.0-20120221.081550-3/apache-openjpa-2.3.0-20120221.081550-3.pom [JENKINS] Archiving to /home/hudson/hudson/jobs/OpenJPA-trunk-deploy/modules/org.apache.openjpa$apache-openjpa/builds/2012-02-21_07-43-23/archive/org.apache.openjpa/apache-openjpa/2.3.0-20120221.081550-3/apache-openjpa-2.3.0-20120221.081550-3-binary.zip Build timed out (after 188 minutes). Marking the build as failed. [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ channel stopped [INFO] hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown [INFO] ------------------------------------------------------------------------ [INFO] Trace hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown at hudson.remoting.Request.call(Request.java:149) at hudson.remoting.Channel.call(Channel.java:681) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158) at $Proxy2.isArchivingDisabled(Unknown Source) at hudson.maven.MavenBuildProxy$Filter.isArchivingDisabled(MavenBuildProxy.java:227) at hudson.maven.reporters.MavenArtifact.archive(MavenArtifact.java:216) at hudson.maven.reporters.MavenArtifactArchiver.postBuild(MavenArtifactArchiver.java:106) at hudson.maven.Maven2Builder.postModule(Maven2Builder.java:127) at hudson.maven.MavenBuilder$Adapter.fireLeaveModule(MavenBuilder.java:327) at hudson.maven.MavenBuilder$Adapter.postBuild(MavenBuilder.java:285) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:68) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at hudson.maven.agent.Main.launch(Main.java:185) at hudson.maven.MavenBuilder.call(MavenBuilder.java:151) at hudson.maven.Maven2Builder.call(Maven2Builder.java:77) at hudson.maven.Maven2Builder.call(Maven2Builder.java:53) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown at hudson.remoting.Request.abort(Request.java:273) at hudson.remoting.Channel.terminate(Channel.java:732) at hudson.remoting.Channel$CloseCommand.execute(Channel.java:848) at hudson.remoting.Channel$ReaderThread.run(Channel.java:1146) Caused by: hudson.remoting.Channel$OrderlyShutdown ... 2 more Caused by: Command close created at at hudson.remoting.Command.(Command.java:51) at hudson.remoting.Channel$CloseCommand.(Channel.java:842) at hudson.remoting.Channel$CloseCommand.(Channel.java:840) at hudson.remoting.Channel.close(Channel.java:907) at hudson.remoting.Channel.close(Channel.java:890) at hudson.slaves.Channels$1.close(Channels.java:91) at hudson.maven.ProcessCache$MavenProcess.discard(ProcessCache.java:145) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:800) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470) at hudson.model.Run.run(Run.java:1409) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) [INFO] ------------------------------------------------------------------------ [INFO] Total time: 171 minutes 50 seconds [INFO] Finished at: Tue Feb 21 10:51:14 UTC 2012 [INFO] Final Memory: 97M/559M [INFO] ------------------------------------------------------------------------ From commits-return-9408-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 15:38:25 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ADB309C9C for ; Tue, 21 Feb 2012 15:38:25 +0000 (UTC) Received: (qmail 95289 invoked by uid 500); 21 Feb 2012 15:38:25 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 95233 invoked by uid 500); 21 Feb 2012 15:38:25 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 95216 invoked by uid 99); 21 Feb 2012 15:38:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 15:38:25 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY 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; Tue, 21 Feb 2012 15:38:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1LFc0Xp008068 for ; Tue, 21 Feb 2012 15:38:00 GMT Date: Tue, 21 Feb 2012 10:38:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <22135288.46121.1329838680024.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > OpenJPA 2.2.x MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
    From commits-return-9409-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 15:39:24 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A31909CCF for ; Tue, 21 Feb 2012 15:39:24 +0000 (UTC) Received: (qmail 98221 invoked by uid 500); 21 Feb 2012 15:39:24 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 98193 invoked by uid 500); 21 Feb 2012 15:39:24 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 98175 invoked by uid 99); 21 Feb 2012 15:39:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 15:39:24 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY 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; Tue, 21 Feb 2012 15:39:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1LFd0WE008081 for ; Tue, 21 Feb 2012 15:39:00 GMT Date: Tue, 21 Feb 2012 10:39:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <18943993.46123.1329838740068.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > OpenJPA 2.2.0 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
    From commits-return-9410-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 15:50:25 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF8079043 for ; Tue, 21 Feb 2012 15:50:25 +0000 (UTC) Received: (qmail 32005 invoked by uid 500); 21 Feb 2012 15:50:25 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 31981 invoked by uid 500); 21 Feb 2012 15:50:25 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 31974 invoked by uid 99); 21 Feb 2012 15:50:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 15:50:25 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY 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; Tue, 21 Feb 2012 15:50:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1LFo0df008165 for ; Tue, 21 Feb 2012 15:50:00 GMT Date: Tue, 21 Feb 2012 10:50:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <28398360.46127.1329839400065.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > OpenJPA 2.2.0 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Auto-Submitted: auto-generated

    OpenJPA 2.2.0

    Page edited by Albert Lee


    Changes (11)

    =20 =20
    =20 <= /tr> = =20
    ...

    h3. Sub-task
    * OPENJPA-1214 - Relatio= nFieldStrategy behaviour
    * OPENJPA-1593 - Create an OSGiManagedRuntime
    * OPENJPA-2= 081 - Provide subset of XML support for OpenJPA annotations

    h3. Bug
    * OPENJPA-398 - Concurre= ntModificationException at org.apache.openjpa.kernel.BrokerImpl
    * OPENJPA-478 - Contradictory text in manual section 10.2.6. JPQL= GROUP BY, HAVING
    * OPENJPA-867 - Unexpected Behaviour of DBDiction= ary.indexOf() method
    * OPENJPA-1343 - Incorrect example of openjpa.= Sequence property
    * OPENJPA-1376 - @SequenceGenerator allocationSiz= e incorrect implementation
    * OPENJPA-1650 - Adding a slice dynamica= lly should be done via persistence unit only
    * OPENJPA-1651 - Uniqu= e colums automatically defined as non-nullable (part 2)
    * OPENJPA-1= 657 - Postgres connection throws NPE with null properties
    * OPENJPA= -1686 - Persistence of Dynamic and Generic Type
    * OPENJPA-1725 - Sc= hemaname wrongly included in DBDictionary.checkNameLength after Tablename c= orrectly truncated
    * OPENJPA-1746 - NullPointerException when a nul= l value is set in the properties map passed to Entity.createEntityManagerFa= ctory
    * OPENJPA-1768 - StackOverflowError when finding an Entity wi= th an Eager ManyToMany relationship.
    * OPENJPA-1787 - Bean validati= on fails merging a new entity
    * OPENJPA-1845 - the prepared query c= ache doesn't currently work correclty with 'SELECT IN' statemen= ts
    * OPENJPA-1856 - Executing bulk updates should evict stale data = from the DataCache
    * OPENJPA-1873 - EntityManager#merge sometimes p= asses wrong entity values to @PostLoad EntityListeners
    * OPENJPA-18= 76 - Slow JDBC tests
    * OPENJPA-1896 - OpenJPA cannot store POJOs if= a corresponding record already exists
    * OPENJPA-1898 - TestQueryMu= ltiThreaded fails with OOME "unable to create new native thread" =
    * OPENJPA-1900 - ClassCastException when serializing an entity if D= etachedStateField=3Dtrue
    * OPENJPA-1901 - QueryCacheStoreQuery$Cach= edObjectId that is not Serializable
    * OPENJPA-1902 - SQLServer rese= rved words may not be used as identifiers
    * OPENJPA-1903 - Some que= ries only work the first time they are executed
    * OPENJPA-1904 - Op= timisticLockException during refresh(*,PESSIMISTIC_*) with eagar fetch on r= elationship fields
    * OPENJPA-1905 - jar-file validation should be d= eferred until after OpenJPA is confirmed to be the application's chosen= provider
    * OPENJPA-1906 - Issue info / warning message when connec= tion retain mode is always
    * OPENJPA-1909 - enhance unit tests with= the correct persistence.xml
    * OPENJPA-1910 - openjpa uses applicat= ion ClassLoader for resolving BrokerFactory (revisited)
    * OPENJPA-1= 911 - InvalidStateException is thrown when merge an entity with derived ide= ntiy
    * OPENJPA-1912 - enhancer generates invalid code if fetch-grou= ps is activated
    * OPENJPA-1915 - missing license header
    * O= PENJPA-1918 - MetaDataRepository.preload() ignores class loader returned by= PersistenceUnitInfo.getClassLoader()
    * OPENJPA-1923 - Allow flexib= le (non-standard) syntax for collection-valued parameters in IN() expressei= on of JPQL query
    * OPENJPA-1928 - Resolving factory method does not= allow method overriding
    * OPENJPA-1932 - Documentation corrections=
    * OPENJPA-1935 - Informix lock exceptions are not mapped properly = by OpenJPA
    * OPENJPA-1938 - Typo of time data type in SQLServerdict= ionary for MSSQL 2008
    * OPENJPA-1939 - index identifier max length = for DB2 v9 is 128.
    * OPENJPA-1940 - ReverseMapping tool does not fi= nd primary keys with Oracle
    * OPENJPA-1941 - Criteria query returns= wrong result when query cache is enabled
    * OPENJPA-1943 - Query ti= meout hint not honored consistently when pessimistic lock is issued to data= base requires multi-statements locking scheme
    * OPENJPA-1944 - Extr= a select statements executed when version column is null.
    * OPENJPA= -1951 - missing key "cant-set-value" in localizer properties org.= apache.openjpa.jdbc.meta.strats
    * OPENJPA-1953 - Copying data from = inputStream to OuputStream needs appropriate buffer size
    * OPENJPA-= 1954 - ArrayIndexOutOfBoundsException when querying on a version field that= is in a MappedSuperclass
    * OPENJPA-1957 - XML overriding column na= mes for ArrayList attributes causes exception.
    * OPENJPA-1958 - Ind= exOutOfBoundsException in BatchingPreparedStatementManagerImpl
    * OP= ENJPA-1959 - RuntimeExceptionTranslator should be transient in DelegatingQu= ery
    * OPENJPA-1960 - openjpa.InitializeEagerly breaks bean-validati= on integration
    * OPENJPA-1965 - ClassCastException when using JAXB = and MetaModel annotation processor
    * OPENJPA-1968 - SQLServerDictio= nery not using DATETIME2 for jdbc driver other than MS JDBC driver
    = * OPENJPA-1969 - SQLServer / DataDirect SQLCode=3DHYT00 not handled
    = * OPENJPA-1974 - StackOverflowError when performing multiple subquery in c= ollection field with eager fetch
    * OPENJPA-1975 - Only obtain defau= lt schema name when needed (DB2)
    * OPENJPA-1981 - Improper cleanup = in SchemaGenerator
    * OPENJPA-1983 - Merge of lazily fetched fields,= and merge of managed entities deviates from spec
    * OPENJPA-1984 - = Incorrect ViolationContraint getRootBean when removing bean with embedded e= ntity validation
    * OPENJPA-1985 - ClassCastException in max(Timesta= mp) function on PostgreSQL
    * OPENJPA-1986 - Extra queries being gen= erated when cascading a persist
    * OPENJPA-1987 - Postgres / Ingres = does not support null table for getImportedKeys
    * OPENJPA-1989 - *T= oOne relationships specified as LAZY in xml aren't honored
    * OP= ENJPA-1992 - java.lang.ArrayIndexOutOfBoundsException if positional paramet= er are not started from 1
    * OPENJPA-1994 - Index is a reserved word= for MySQL
    * OPENJPA-1996 - OpenJPA Samples fail on MacOS X
    = * OPENJPA-1998 - NPE getTableNameForMetadata when running SchemaTool refle= ct against Postgres DB
    * OPENJPA-2000 - Wrong PostgreSQL data type = for REAL - "float8", must be "float4"
    * OPENJPA= -2005 - PostgresDictionary.isOwnedSequence needs a null check
    * OPE= NJPA-2006 - Sequence generated ids may fail to get assigned when flushing a= graph with bi-directional relationships
    * OPENJPA-2007 - Setting q= uery hint "openjpa.FetchPlan.Isolation" results in misleading war= ning
    * OPENJPA-2008 - OpenJPA does not work with native queries in = a distributed (Slice) environment
    * OPENJPA-2010 - Duplicate meta d= ata warning logged due to parsing the same location twice
    * OPENJPA= -2011 - Prevent reparsing annotation metadata for queries
    * OPENJPA= -2013 - columnDefinition for TEXT types ends up in wrong sql statement
    = * OPENJPA-2025] - Byte[] and Char[ should be treated as SingularAttribu= tes, not lists by the metamodel generator
    * OPENJPA-2027 - Metamode= l genereated at runtime expects ListAttribute for all arrays - not just Per= sistentCollections.
    * OPENJPA-2034 - Update H2 Database sql error c= odes as per the changes in v1.3.154
    * OPENJPA-2036 - DynamicEnhance= r should look for tools.jar in java.home/lib for all JDKs, not just the IBM= SDK.
    * OPENJPA-2039 - FKs for EAGER fields that are not in the cur= rent fetchplan aren't selected
    * OPENJPA-2044 - Invalid header = in MetaModel classes generated by AnnotationProcessor
    * OPENJPA-204= 5 - NAME is a valid column name for H2 databases.
    * OPENJPA-2051 - = Entities in a relationship are not properly cascaded after a EntityManager.= flush is executed.
    * OPENJPA-2056 - Postgres V9.1 issue with LIKE c= lause and Escape Strings
    * OPENJPA-2059 - Missing localizer.propert= ies for org.apache.openjpa.persistence.util.SourceCode
    * OPENJPA-20= 60] - AnnotationProcess failed to generate metadata for List<String>[= attribute in entity
    * OPENJPA-2065 - JPA 2.0 Spec. Violation? Enti= tyManager#createNamedQuery(String, Class) bombs with non-entity Class param= eter
    * OPENJPA-2066 - Edge case in openJPA-1227. openJPA fails to c= reate a join and thus returns wrong data when a collection is selected from= superclass and another field is selected from subclass twoor more levels d= own the hierarchy.
    * OPENJPA-2069 - Natvie sequence problems uncove= red after OPENJPA-1376
    * OPENJPA-2070 - Error processing while popu= lating Metamodel classes needs improvement
    * OPENJPA-2071 - NPE dur= ing ResultPacker interface processing
    * OPENJPA-2073 - MappingTools= requires live connection to DB2 server to retrieve default schema name * OPENJPA-2076 - Minor fix-ups to messages
    * OPENJPA-2077 - Po= m references to org.codehaus.mojo openjpa-maven-plugin cause problems
    = * OPENJPA-2083 - Unmapped fields silently treated as transient
    *= OPENJPA-2100 - openjpa-maven-plugin fails to create SQL for entities which= contain enums
    * OPENJPA-2101 - PersistenceProductDerivation overwr= ites the RemoteCommitProvider configuration
    * OPENJPA-2104 - BindPa= rameter is not a valid query parameter as processed in DBDictionary's s= etUnknown()
    * OPENJPA-2105 - Document changes no longer being uploa= ded
    * OPENJPA-2107 - ManagedCache conflict due adding an entity 2 t= imes in the same query.
    * OPENJPA-2117 - XML overriding column name= s for 1xM attributes causes exception.
    * OPENJPA-2119 - Update org.= apache.openjpa.persistence.util.SourceCode
    * OPENJPA-2122 - VerifyE= rror with Java 7 when using javaagent or dynamic container enhancement
    = * OPENJPA-2124 - Use of XMLValueHandler results in a NullPointerExcepti= on when classloader does not provide package support

    h3. Improvement
    * OPENJPA-6 - OpenJPA do= esn't meaningfully implement JDBC3, JDBC4 methods in its delegates
    =
    * OPENJPA-302 - PCEnhancer needs target classes on classpath
    = * OPENJPA-487 - Generated SUBSTRING SQL is ugly and inefficient
    = * OPENJPA-758 - OpenJPA doesn't find ValueHandlers with an applicable = class loader
    * OPENJPA-1555 - SQLBuffer code cleanup
    * OPEN= JPA-1777 - Allow setting of diagonstic context for each slice in a more fle= xible manner
    * OPENJPA-1778 - Improved error information for unenha= nced classes.
    * OPENJPA-1798 - Improve messages in localize.propert= ies
    * OPENJPA-1803 - Unwrap EntityManager to Connection
    * O= PENJPA-1847 - Use a single connection when generating schema
    * OPEN= JPA-1863 - update HSQL dictionary for HSQLDB 2.0
    * OPENJPA-1917 - C= ache column alias in SelectImpl
    * OPENJPA-1937 - Document OpenJPAEn= tityManager.evict methods
    * OPENJPA-1945 - Improve aspects of the O= penBooks sample
    * OPENJPA-1972 - DB2 V9.7 changed the default behav= ior concerning blocking behavior with isolation levels greater then read un= committed
    * OPENJPA-1990 - Skip getting extend exception text when = running on DB2
    * OPENJPA-1999 - Optional support for non-sequential= positional parameters
    * OPENJPA-2014 - Allow proxies to stay in pl= ace when Detaching
    * OPENJPA-2020 - Make some members of StateManag= erImpl protected to allow for greater extensability
    * OPENJPA-2031 = - Unable to import maven projects with m2e version 1.0
    * OPENJPA-20= 42 - Diagnostics for Application Managed EntityManagerFactory leaks.
    = * OPENJPA-2043 - OpenJPAId hashCode() value needs to be consistent after = serialization process
    * OPENJPA-2047 - Document the impact of Persi= stence Aware classes
    * OPENJPA-2068 - Improve performance of java.u= til.Calendar fields
    * OPENJPA-2075 - Abstract out parameter handlin= g / validation from org.apache.openjpa.persistence.QueryImpl to allow for g= reater extensibility
    * OPENJPA-2084 - Upgrade Derby dependency to 1= 0.8.x
    * OPENJPA-2085 - Improve enhancement process to support JAVA = 7 compliant class file generation
    * OPENJPA-2087 - Remove or limit = the use of the ConcreteClassGenerator
    * OPENJPA-2116 - Scrape the b= arrel for performance juice
    * OPENJPA-2120 - Add new option to elim= inate reflection calls from enhancer generated IdClass PC copy operations <= br> * OPENJPA-2128 - Add a boolean to FieldMetaData to denote whether or= not a field has a @EmbeddedId annotation.
    * OPENJPA-2130 - Enable = Java 7 testing by allowing test cases to compile targeting to 1.7

    h3. New Feature
    * OPENJPA-1231 - Bean Va= lidation sample
    * OPENJPA-184 - use DB2 Diagnostic interface to report extended e= rror diagnostics on SQL Exception
    * OPENJPA-1859 - Create a sample = to demonstrate usage of JEST
    * OPENJPA-1934 - contribute an openjpa= -maven-plugin
    * OPENJPA-2108 - Allow an option to terminate Mapping= Tool-generated SQL with a character other than semicolon

    h3. Task
    * OPENJ= PA-1786 - Upgrade to latest JPA 2.0 TCK
    * OPENJPA-1834 - Upgrade trunk to use Deby 10.6.2.1 for junits * OPENJPA-1875 - Add generics to the Graph code
    * OPENJPA-208= 9 - upgrade bval to latest 0.3-incubating
    * OPENJPA-2091 - update d= ocbook maven plugin

    h3. Test
    * OPENJPA-33 - Need Quer= y Engine test bucket
    * OPENJPA-2029 - Add PreparedQuery tests for non-sequential posit= ional parameters support

    Full Content

    OpenJPA 2.2.0

    The Apache OpenJPA community is proud to announce the release of Apache = OpenJPA 2.2.0. As with the prior 2.1.0 release, this distribution is based= on the final JSR 317 Java Persistence API, Version 2.0= specification and passes the JPA 2.0 TCK, while remaining backwards compat= ible with the prior 1.2.x releases based on the Java Persistence API (JPA 1= .0) part of Java Community Process JSR-220 (Enterprise JavaBeans 3.0). For= a list of all the new features of JPA 2.0, please checkout the OpenJPA = 2.1.0 release notes.

    Additional information on the OpenJPA project may be found at the pr= oject web site.

    Changes in OpenJPA 2= .2.0

    Sub-task

      =09
    • OPENJPA-1593 - Create an OSGiManagedRuntime
    • =09
    • OPENJPA-2081 - Provide subset of XML support for OpenJPA annotations=

    Bug

      =09
    • OPENJPA-478 - Contradictory text in manual section 10.2.6. JPQL GROU= P BY, HAVING
    • =09
    • OPENJPA-867 - Unexpected Behaviour of DBDictionary.indexOf() method<= /li> =09
    • OPENJPA-1343 - Incorrect example of openjpa.Sequence property
    • =09
    • OPENJPA-1376 - @SequenceGenerator allocationSize incorrect implement= ation
    • =09
    • OPENJPA-1650 - Adding a slice dynamically should be done via persist= ence unit only
    • =09
    • OPENJPA-1651 - Unique colums automatically defined as non-nullable (= part 2)
    • =09
    • OPENJPA-1657 - Postgres connection throws NPE with null properties =09
    • OPENJPA-1686 - Persistence of Dynamic and Generic Type
    • =09
    • OPENJPA-1725 - Schemaname wrongly included in DBDictionary.checkName= Length after Tablename correctly truncated
    • =09
    • OPENJPA-1746 - NullPointerException when a null value is set in the = properties map passed to Entity.createEntityManagerFactory
    • =09
    • OPENJPA-1768 - StackOverflowError when finding an Entity with an Eag= er ManyToMany relationship.
    • =09
    • OPENJPA-1787 - Bean validation fails merging a new entity
    • =09
    • OPENJPA-1845 - the prepared query cache doesn't currently work corre= clty with 'SELECT IN' statements
    • =09
    • OPENJPA-1856 - Executing bulk updates should evict stale data from t= he DataCache
    • =09
    • OPENJPA-1873 - EntityManager#merge sometimes passes wrong entity val= ues to @PostLoad EntityListeners
    • =09
    • OPENJPA-1876 - Slow JDBC tests
    • =09
    • OPENJPA-1896 - OpenJPA cannot store POJOs if a corresponding record = already exists
    • =09
    • OPENJPA-1898 - TestQueryMultiThreaded fails with OOME "unable to cre= ate new native thread"
    • =09
    • OPENJPA-1900 - ClassCastException when serializing an entity if Deta= chedStateField=3Dtrue
    • =09
    • OPENJPA-1901 - QueryCacheStoreQuery$CachedObjectId that is not Seria= lizable
    • =09
    • OPENJPA-1902 - SQLServer reserved words may not be used as identifie= rs
    • =09
    • OPENJPA-1903 - Some queries only work the first time they are execut= ed
    • =09
    • OPENJPA-1904 - OptimisticLockException during refresh(,PESSIMISTI= C_) with eagar fetch on relationship fields
    • =09
    • OPENJPA-1905 - jar-file validation should be deferred until after Op= enJPA is confirmed to be the application's chosen provider
    • =09
    • OPENJPA-1906 - Issue info / warning message when connection retain m= ode is always
    • =09
    • OPENJPA-1909 - enhance unit tests with the correct persistence.xml =09
    • OPENJPA-1910 - openjpa uses application ClassLoader for resolving Br= okerFactory (revisited)
    • =09
    • OPENJPA-1911 - InvalidStateException is thrown when merge an entity = with derived identiy
    • =09
    • OPENJPA-1912 - enhancer generates invalid code if fetch-groups is ac= tivated
    • =09
    • OPENJPA-1915 - missing license header
    • =09
    • OPENJPA-1918 - MetaDataRepository.preload() ignores class loader ret= urned by PersistenceUnitInfo.getClassLoader()
    • =09
    • OPENJPA-1923 - Allow flexible (non-standard) syntax for collection-v= alued parameters in IN() expresseion of JPQL query
    • =09
    • OPENJPA-1928 - Resolving factory method does not allow method overri= ding
    • =09
    • OPENJPA-1932 - Documentation corrections
    • =09
    • OPENJPA-1935 - Informix lock exceptions are not mapped properly by O= penJPA
    • =09
    • OPENJPA-1938 - Typo of time data type in SQLServerdictionary for MSS= QL 2008
    • =09
    • OPENJPA-1939 - index identifier max length for DB2 v9 is 128.
    • =09
    • OPENJPA-1940 - ReverseMapping tool does not find primary keys with O= racle
    • =09
    • OPENJPA-1941 - Criteria query returns wrong result when query cache = is enabled
    • =09
    • OPENJPA-1943 - Query timeout hint not honored consistently when pess= imistic lock is issued to database requires multi-statements locking scheme=
    • =09
    • OPENJPA-1944 - Extra select statements executed when version column = is null.
    • =09
    • OPENJPA-1951 - missing key "cant-set-value" in localizer properties = org.apache.openjpa.jdbc.meta.strats
    • =09
    • OPENJPA-1953 - Copying data from inputStream to OuputStream needs ap= propriate buffer size
    • =09
    • OPENJPA-1954 - ArrayIndexOutOfBoundsException when querying on a ver= sion field that is in a MappedSuperclass
    • =09
    • OPENJPA-1957 - XML overriding column names for ArrayList attributes = causes exception.
    • =09
    • OPENJPA-1958 - IndexOutOfBoundsException in BatchingPreparedStatemen= tManagerImpl
    • =09
    • OPENJPA-1959 - RuntimeExceptionTranslator should be transient in Del= egatingQuery
    • =09
    • OPENJPA-1960 - openjpa.InitializeEagerly breaks bean-validation inte= gration
    • =09
    • OPENJPA-1965 - ClassCastException when using JAXB and MetaModel anno= tation processor
    • =09
    • OPENJPA-1968 - SQLServerDictionery not using DATETIME2 for jdbc driv= er other than MS JDBC driver
    • =09
    • OPENJPA-1969 - SQLServer / DataDirect SQLCode=3DHYT00 not handled =09
    • OPENJPA-1974 - StackOverflowError when performing multiple subquery = in collection field with eager fetch
    • =09
    • OPENJPA-1975 - Only obtain default schema name when needed (DB2) =09
    • OPENJPA-1981 - Improper cleanup in SchemaGenerator
    • =09
    • OPENJPA-1983 - Merge of lazily fetched fields, and merge of managed = entities deviates from spec
    • =09
    • OPENJPA-1984 - Incorrect ViolationContraint getRootBean when removin= g bean with embedded entity validation
    • =09
    • OPENJPA-1985 - ClassCastException in max(Timestamp) function on Post= greSQL
    • =09
    • OPENJPA-1986 - Extra queries being generated when cascading a persis= t
    • =09
    • OPENJPA-1987 - Postgres / Ingres does not support null table for get= ImportedKeys
    • =09
    • OPENJPA-1989 - *ToOne relationships specified as LAZY in xml aren't = honored
    • =09
    • OPENJPA-1992 - java.lang.ArrayIndexOutOfBoundsException if positiona= l parameter are not started from 1
    • =09
    • OPENJPA-1994 - Index is a reserved word for MySQL
    • =09
    • OPENJPA-1996 - OpenJPA Samples fail on MacOS X
    • =09
    • OPENJPA-1998 - NPE getTableNameForMetadata when running SchemaTool r= eflect against Postgres DB
    • =09
    • OPENJPA-2000 - Wrong PostgreSQL data type for REAL - "float8", must = be "float4"
    • =09
    • OPENJPA-2005 - PostgresDictionary.isOwnedSequence needs a null check=
    • =09
    • OPENJPA-2006 - Sequence generated ids may fail to get assigned when = flushing a graph with bi-directional relationships
    • =09
    • OPENJPA-2007 - Setting query hint "openjpa.FetchPlan.Isolation" resu= lts in misleading warning
    • =09
    • OPENJPA-2008 - OpenJPA does not work with native queries in a distri= buted (Slice) environment
    • =09
    • OPENJPA-2010 - Duplicate meta data warning logged due to parsing the= same location twice
    • =09
    • OPENJPA-2011 - Prevent reparsing annotation metadata for queries =09
    • OPENJPA-2013 - columnDefinition for TEXT types ends up in wrong sql = statement
    • =09
    • OPENJPA-2025] - Byte[] and Char[ should be treated as SingularAttrib= utes, not lists by the metamodel generator
    • =09
    • OPENJPA-2027 - Metamodel genereated at runtime expects ListAttribute= for all arrays - not just PersistentCollections.
    • =09
    • OPENJPA-2034 - Update H2 Database sql error codes as per the changes= in v1.3.154
    • =09
    • OPENJPA-2036 - DynamicEnhancer should look for tools.jar in java.hom= e/lib for all JDKs, not just the IBM SDK.
    • =09
    • OPENJPA-2039 - FKs for EAGER fields that are not in the current fetc= hplan aren't selected
    • =09
    • OPENJPA-2044 - Invalid header in MetaModel classes generated by Anno= tationProcessor
    • =09
    • OPENJPA-2045 - NAME is a valid column name for H2 databases.
    • =09
    • OPENJPA-2051 - Entities in a relationship are not properly cascaded = after a EntityManager.flush is executed.
    • =09
    • OPENJPA-2056 - Postgres V9.1 issue with LIKE clause and Escape Strin= gs
    • =09
    • OPENJPA-2059 - Missing localizer.properties for org.apache.openjpa.p= ersistence.util.SourceCode
    • =09
    • OPENJPA-2060] - AnnotationProcess failed to generate metadata for Li= st<String>[ attribute in entity
    • =09
    • OPENJPA-2065 - JPA 2.0 Spec. Violation? EntityManager#createNamedQue= ry(String, Class) bombs with non-entity Class parameter
    • =09
    • OPENJPA-2066 - Edge case in openJPA-1227. openJPA fails to create a = join and thus returns wrong data when a collection is selected from supercl= ass and another field is selected from subclass twoor more levels down the = hierarchy.
    • =09
    • OPENJPA-2069 - Natvie sequence problems uncovered after OPENJPA-1376=
    • =09
    • OPENJPA-2070 - Error processing while populating Metamodel classes n= eeds improvement
    • =09
    • OPENJPA-2071 - NPE during ResultPacker interface processing
    • =09
    • OPENJPA-2073 - MappingTools requires live connection to DB2 server t= o retrieve default schema name
    • =09
    • OPENJPA-2076 - Minor fix-ups to messages
    • =09
    • OPENJPA-2077 - Pom references to org.codehaus.mojo openjpa-maven-plu= gin cause problems
    • =09
    • OPENJPA-2083 - Unmapped fields silently treated as transient
    • =09
    • OPENJPA-2100 - openjpa-maven-plugin fails to create SQL for entities= which contain enums
    • =09
    • OPENJPA-2101 - PersistenceProductDerivation overwrites the RemoteCom= mitProvider configuration
    • =09
    • OPENJPA-2104 - BindParameter is not a valid query parameter as proce= ssed in DBDictionary's setUnknown()
    • =09
    • OPENJPA-2105 - Document changes no longer being uploaded
    • =09
    • OPENJPA-2107 - ManagedCache conflict due adding an entity 2 times in= the same query.
    • =09
    • OPENJPA-2117 - XML overriding column names for 1xM attributes causes= exception.
    • =09
    • OPENJPA-2119 - Update org.apache.openjpa.persistence.util.SourceCode=
    • =09
    • OPENJPA-2122 - VerifyError with Java 7 when using javaagent or dynam= ic container enhancement
    • =09
    • OPENJPA-2124 - Use of XMLValueHandler results in a NullPointerExcept= ion when classloader does not provide package support

    Improvement

      =09
    • OPENJPA-302 - PCEnhancer needs target classes on classpath
    • =09
    • OPENJPA-487 - Generated SUBSTRING SQL is ugly and inefficient
    • =09
    • OPENJPA-758 - OpenJPA doesn't find ValueHandlers with an applicable = class loader
    • =09
    • OPENJPA-1555 - SQLBuffer code cleanup
    • =09
    • OPENJPA-1777 - Allow setting of diagonstic context for each slice in= a more flexible manner
    • =09
    • OPENJPA-1778 - Improved error information for unenhanced classes. =09
    • OPENJPA-1798 - Improve messages in localize.properties
    • =09
    • OPENJPA-1803 - Unwrap EntityManager to Connection
    • =09
    • OPENJPA-1847 - Use a single connection when generating schema
    • =09
    • OPENJPA-1863 - update HSQL dictionary for HSQLDB 2.0
    • =09
    • OPENJPA-1917 - Cache column alias in SelectImpl
    • =09
    • OPENJPA-1937 - Document OpenJPAEntityManager.evict methods
    • =09
    • OPENJPA-1945 - Improve aspects of the OpenBooks sample
    • =09
    • OPENJPA-1972 - DB2 V9.7 changed the default behavior concerning bloc= king behavior with isolation levels greater then read uncommitted
    • =09
    • OPENJPA-1990 - Skip getting extend exception text when running on DB= 2
    • =09
    • OPENJPA-1999 - Optional support for non-sequential positional parame= ters
    • =09
    • OPENJPA-2014 - Allow proxies to stay in place when Detaching
    • =09
    • OPENJPA-2020 - Make some members of StateManagerImpl protected to al= low for greater extensability
    • =09
    • OPENJPA-2031 - Unable to import maven projects with m2e version 1.0<= /li> =09
    • OPENJPA-2042 - Diagnostics for Application Managed EntityManagerFact= ory leaks.
    • =09
    • OPENJPA-2043 - OpenJPAId hashCode() value needs to be consistent aft= er serialization process
    • =09
    • OPENJPA-2047 - Document the impact of Persistence Aware classes
    • =09
    • OPENJPA-2068 - Improve performance of java.util.Calendar fields
    • =09
    • OPENJPA-2075 - Abstract out parameter handling / validation from org= .apache.openjpa.persistence.QueryImpl to allow for greater extensibility =09
    • OPENJPA-2084 - Upgrade Derby dependency to 10.8.x
    • =09
    • OPENJPA-2085 - Improve enhancement process to support JAVA 7 complia= nt class file generation
    • =09
    • OPENJPA-2087 - Remove or limit the use of the ConcreteClassGenerator=
    • =09
    • OPENJPA-2116 - Scrape the barrel for performance juice
    • =09
    • OPENJPA-2120 - Add new option to eliminate reflection calls from enh= ancer generated IdClass PC copy operations
    • =09
    • OPENJPA-2128 - Add a boolean to FieldMetaData to denote whether or n= ot a field has a @EmbeddedId annotation.
    • =09
    • OPENJPA-2130 - Enable Java 7 testing by allowing test cases to compi= le targeting to 1.7

    New Feature

      =09
    • OPENJPA-184 - use DB2 Diagnostic interface to report extended error = diagnostics on SQL Exception
    • =09
    • OPENJPA-1859 - Create a sample to demonstrate usage of JEST
    • =09
    • OPENJPA-1934 - contribute an openjpa-maven-plugin
    • =09
    • OPENJPA-2108 - Allow an option to terminate MappingTool-generated SQ= L with a character other than semicolon

    Task

      =09
    • OPENJPA-1786 - Upgrade to latest JPA 2.0 TCK
    • =09
    • OPENJPA-1834 - Upgrade trunk to use Deby 10.6.2.1 for junits
    • =09
    • OPENJPA-1875 - Add generics to the Graph code
    • =09
    • OPENJPA-2089 - upgrade bval to latest 0.3-incubating
    • =09
    • OPENJPA-2091 - update docbook maven plugin

    Test

      =09
    • OPENJPA-2029 - Add PreparedQuery tests for non-sequential positional= parameters support
    From commits-return-9411-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 16:03:21 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E0A3498CB for ; Tue, 21 Feb 2012 16:03:21 +0000 (UTC) Received: (qmail 70434 invoked by uid 500); 21 Feb 2012 16:03:21 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 70411 invoked by uid 500); 21 Feb 2012 16:03:21 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 70404 invoked by uid 99); 21 Feb 2012 16:03:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 16:03:21 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Tue, 21 Feb 2012 16:03:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1LG30AD008346 for ; Tue, 21 Feb 2012 16:03:00 GMT Date: Tue, 21 Feb 2012 11:03:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <33409884.46132.1329840180022.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Release Management MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Auto-Submitted: auto-generated

    Release Management

    Page edited by Albert Lee


    Changes (2)

    =20 =20
    =20 =20
    ...
    | 2.0.x | 2.0.2-SNAPSHOT | Do= nald Woods, Heath Thomann | Yes |
    | 2.1.x | 2.1.1-SNAPSHOT | Heath Thom= ann | Yes |
    | 2.2.x | 2.2.1-SNAPSHOT | Albert Lee | Yes |
    | trunk | 2.23.0-SNAPSHOT<= /span> | N/A*| No |
    \* There are no formal releas= es for these branches.

    ...

    Full Content

    Release Man= agement

    Where should = I put my fix?

    Fixes should be targeted and committed on trunk first. Any other open re= leases are fair game, but may require approval from a release manager.

    Regarding Re= lease Managers

    Once a formal release of OpenJPA has been approved, a release manager is= assigned. The release manager is often (but not always) the same developer= who performed the release. This release manager role is intended to be a l= ong term branch maintainer who looks after the stability of a formal releas= e.

    The release manager(s) is(are) responsible for targeting fixes into a gi= ven version of OpenJPA.

      =09
    • Release managers may indicate this by targeting a JIRA issue for the= ir branch or may issue a blanket statement that any fix will be accepted. =09
    • In general only the release manager(s) should target a JIRA issue fo= r a branch which they support. =09
        =09=09
      • An exception to this rule is if the RM has committed changes for = their branch and forgot to update the JIRA issue.
      • =09
      =09
    • =09
    • Fixes should not be committed without RM approval. These changes may= be reverted by the release manager.

    <= /a>Some general guidelines for release managers

      =09
    • Fixes which are committed to an earlier release should also be prese= nt "up-stream". Ie a fix for 1.0.x should also appear in 1.2.x.
    • =09
    • Issues may not apply to every release, so the previous guideline may= not always apply.

    Rel= ease Managers for active branches.

    The current release managers for the active branches of OpenJPA are :

    branch internal release number release manager(s) Contact Release Manager before committing
    0.9.7-r547073   Srinivasa Segu Yes
    1.0.x 1.0.5-SNAPSHOT Heath Thomann, Donald Woods Yes
    1.1.x 1.1.1-SNAPSHOT Patrick Linskey, Abe White Yes
    1.2.x 1.2.3-SNAPSHOT Heath Thomann, Donald Woods Yes
    1.3.x 1.3.0-SNAPSHOT N/A* No
    2.0.x 2.0.2-SNAPSHOT Donald Woods, Heath Thomann Yes
    2.1.x 2.1.1-SNAPSHOT Heath Thomann Yes
    2.2.x 2.2.1-SNAPSHOT Albert Lee Yes
    trunk 2.3.0-SNAPSHOT N/A* No

    * There are no formal releases for these branches.

    Continuous Builds

    We are using the Apache Hudson server for continuous builds of several r= eleases. Please checkout the Automated Builds page for more d= etails.

    From commits-return-9412-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 16:30:18 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 039A79F0D for ; Tue, 21 Feb 2012 16:30:18 +0000 (UTC) Received: (qmail 67901 invoked by uid 500); 21 Feb 2012 16:30:17 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 67886 invoked by uid 500); 21 Feb 2012 16:30:17 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 67879 invoked by uid 99); 21 Feb 2012 16:30:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 16:30:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 16:30:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EDCB923888E4 for ; Tue, 21 Feb 2012 16:29:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1291899 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java Date: Tue, 21 Feb 2012 16:29:56 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120221162956.EDCB923888E4@eris.apache.org> Author: kwsutter Date: Tue Feb 21 16:29:56 2012 New Revision: 1291899 URL: http://svn.apache.org/viewvc?rev=1291899&view=rev Log: OPENJPA-2123. Only format parameters for printing if logging is turned on. Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java?rev=1291899&r1=1291898&r2=1291899&view=diff ============================================================================== --- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java (original) +++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java Tue Feb 21 16:29:56 2012 @@ -20,10 +20,8 @@ package org.apache.openjpa.lib.jdbc; import java.io.InputStream; import java.io.Reader; -import java.lang.reflect.Constructor; import java.math.BigDecimal; import java.net.URL; -import java.security.AccessController; import java.sql.Array; import java.sql.BatchUpdateException; import java.sql.Blob; @@ -48,18 +46,7 @@ import java.util.Calendar; import java.util.Iterator; import java.util.List; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingCallableStatement; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingDatabaseMetaData; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingPreparedStatement; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingResultSet; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingStatement; import org.apache.openjpa.lib.log.Log; -import org.apache.openjpa.lib.util.ConcreteClassGenerator; import org.apache.openjpa.lib.util.J2DoPrivHelper; /** @@ -98,7 +85,6 @@ public class LoggingConnectionDecorator private int _prettyPrintLineLength = 60; private int _warningAction = WARN_IGNORE; private SQLWarningHandler _warningHandler; - private boolean _trackParameters = true; private boolean _printParameters = false; /** @@ -144,20 +130,6 @@ public class LoggingConnectionDecorator } /** - *

    Whether to track parameters for the purpose of reporting exceptions.

    - */ - public void setTrackParameters(boolean trackParameters) { - _trackParameters = trackParameters; - } - - /** - * Whether to track parameters for the purpose of reporting exceptions. - */ - public boolean getTrackParameters() { - return _trackParameters; - } - - /** *

    * Whether parameter values will be printed in exception messages or in trace. This is different from * trackParameters which controls whether OpenJPA will track parameters internally (visible while debugging and used @@ -1608,7 +1580,7 @@ public class LoggingConnectionDecorator } private boolean shouldTrackParameters() { - return _trackParameters || _logs.isSQLEnabled(); + return _printParameters || _logs.isSQLEnabled(); } private void setLogParameter(int index, boolean val) { @@ -2324,7 +2296,7 @@ public class LoggingConnectionDecorator } private boolean shouldTrackParameters() { - return _trackParameters || _logs.isSQLEnabled(); + return _printParameters || _logs.isSQLEnabled(); } private void setLogParameter(int index, boolean val) { From commits-return-9413-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 16:31:44 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E79F09F97 for ; Tue, 21 Feb 2012 16:31:43 +0000 (UTC) Received: (qmail 72280 invoked by uid 500); 21 Feb 2012 16:31:43 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 72253 invoked by uid 500); 21 Feb 2012 16:31:43 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 72244 invoked by uid 99); 21 Feb 2012 16:31:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 16:31:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 16:31:42 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1E88B23888E4 for ; Tue, 21 Feb 2012 16:31:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1291900 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java Date: Tue, 21 Feb 2012 16:31:23 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120221163123.1E88B23888E4@eris.apache.org> Author: kwsutter Date: Tue Feb 21 16:31:22 2012 New Revision: 1291900 URL: http://svn.apache.org/viewvc?rev=1291900&view=rev Log: OPENJPA-2134. Do not close Connections during prepareForPooling if ConnectionRetainMode is set to "always". Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java?rev=1291900&r1=1291899&r2=1291900&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java (original) +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java Tue Feb 21 16:31:22 2012 @@ -1156,11 +1156,14 @@ public class EntityManagerImpl public void prepareForPooling() { assertNotCloseInvoked(); clear(); - _broker.lock(); // since this direct close path is not protected... - try { - _broker.getStoreManager().close(); - } finally { - _broker.unlock(); + // Do not close connection if ConnectionRetainMode is set to Always... + if (getConnectionRetainMode() != ConnectionRetainMode.ALWAYS) { + _broker.lock(); // since this direct close path is not protected... + try { + _broker.getStoreManager().close(); + } finally { + _broker.unlock(); + } } } From commits-return-9414-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 17:04:51 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E14749E6D for ; Tue, 21 Feb 2012 17:04:50 +0000 (UTC) Received: (qmail 92641 invoked by uid 500); 21 Feb 2012 17:04:50 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 92619 invoked by uid 500); 21 Feb 2012 17:04:50 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 92611 invoked by uid 99); 21 Feb 2012 17:04:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 17:04:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 17:04:48 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E8FA4238890D for ; Tue, 21 Feb 2012 17:04:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1291917 - /openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java Date: Tue, 21 Feb 2012 17:04:27 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120221170427.E8FA4238890D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwsutter Date: Tue Feb 21 17:04:27 2012 New Revision: 1291917 URL: http://svn.apache.org/viewvc?rev=1291917&view=rev Log: OPENJPA-2134. Do not close Connections during prepareForPooling if ConnectionRetainMode is set to "always". Modified: openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java Modified: openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java?rev=1291917&r1=1291916&r2=1291917&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java (original) +++ openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java Tue Feb 21 17:04:27 2012 @@ -1156,11 +1156,14 @@ public class EntityManagerImpl public void prepareForPooling() { assertNotCloseInvoked(); clear(); - _broker.lock(); // since this direct close path is not protected... - try { - _broker.getStoreManager().close(); - } finally { - _broker.unlock(); + // Do not close connection if ConnectionRetainMode is set to Always... + if (getConnectionRetainMode() != ConnectionRetainMode.ALWAYS) { + _broker.lock(); // since this direct close path is not protected... + try { + _broker.getStoreManager().close(); + } finally { + _broker.unlock(); + } } } From commits-return-9415-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 17:05:07 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2702A9EA0 for ; Tue, 21 Feb 2012 17:05:07 +0000 (UTC) Received: (qmail 93980 invoked by uid 500); 21 Feb 2012 17:05:07 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 93952 invoked by uid 500); 21 Feb 2012 17:05:07 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 93945 invoked by uid 99); 21 Feb 2012 17:05:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 17:05:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 17:05:04 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 783482388980 for ; Tue, 21 Feb 2012 17:04:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1291918 - /openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java Date: Tue, 21 Feb 2012 17:04:43 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120221170443.783482388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwsutter Date: Tue Feb 21 17:04:43 2012 New Revision: 1291918 URL: http://svn.apache.org/viewvc?rev=1291918&view=rev Log: OPENJPA-2123. Only format parameters for printing if logging is turned on. Modified: openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java Modified: openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java?rev=1291918&r1=1291917&r2=1291918&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java (original) +++ openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java Tue Feb 21 17:04:43 2012 @@ -20,10 +20,8 @@ package org.apache.openjpa.lib.jdbc; import java.io.InputStream; import java.io.Reader; -import java.lang.reflect.Constructor; import java.math.BigDecimal; import java.net.URL; -import java.security.AccessController; import java.sql.Array; import java.sql.BatchUpdateException; import java.sql.Blob; @@ -48,18 +46,7 @@ import java.util.Calendar; import java.util.Iterator; import java.util.List; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingCallableStatement; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingDatabaseMetaData; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingPreparedStatement; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingResultSet; -import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection. - LoggingStatement; import org.apache.openjpa.lib.log.Log; -import org.apache.openjpa.lib.util.ConcreteClassGenerator; import org.apache.openjpa.lib.util.J2DoPrivHelper; /** @@ -98,7 +85,6 @@ public class LoggingConnectionDecorator private int _prettyPrintLineLength = 60; private int _warningAction = WARN_IGNORE; private SQLWarningHandler _warningHandler; - private boolean _trackParameters = true; private boolean _printParameters = false; /** @@ -144,20 +130,6 @@ public class LoggingConnectionDecorator } /** - *

    Whether to track parameters for the purpose of reporting exceptions.

    - */ - public void setTrackParameters(boolean trackParameters) { - _trackParameters = trackParameters; - } - - /** - * Whether to track parameters for the purpose of reporting exceptions. - */ - public boolean getTrackParameters() { - return _trackParameters; - } - - /** *

    * Whether parameter values will be printed in exception messages or in trace. This is different from * trackParameters which controls whether OpenJPA will track parameters internally (visible while debugging and used @@ -1608,7 +1580,7 @@ public class LoggingConnectionDecorator } private boolean shouldTrackParameters() { - return _trackParameters || _logs.isSQLEnabled(); + return _printParameters || _logs.isSQLEnabled(); } private void setLogParameter(int index, boolean val) { @@ -2324,7 +2296,7 @@ public class LoggingConnectionDecorator } private boolean shouldTrackParameters() { - return _trackParameters || _logs.isSQLEnabled(); + return _printParameters || _logs.isSQLEnabled(); } private void setLogParameter(int index, boolean val) { From commits-return-9416-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 17:05:25 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85C469EAD for ; Tue, 21 Feb 2012 17:05:25 +0000 (UTC) Received: (qmail 94546 invoked by uid 500); 21 Feb 2012 17:05:25 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 94511 invoked by uid 500); 21 Feb 2012 17:05:25 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 94504 invoked by uid 99); 21 Feb 2012 17:05:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 17:05:25 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Tue, 21 Feb 2012 17:05:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1LH50Cv010126 for ; Tue, 21 Feb 2012 17:05:00 GMT Date: Tue, 21 Feb 2012 12:05:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <4809711.46154.1329843900028.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Intro MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated

    From commits-return-9417-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 17:18:28 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2CE1296BF for ; Tue, 21 Feb 2012 17:18:28 +0000 (UTC) Received: (qmail 46006 invoked by uid 500); 21 Feb 2012 17:18:28 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 45979 invoked by uid 500); 21 Feb 2012 17:18:28 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 45971 invoked by uid 99); 21 Feb 2012 17:18:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 17:18:28 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY 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; Tue, 21 Feb 2012 17:18:27 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1LHI6e2010268 for ; Tue, 21 Feb 2012 17:18:07 GMT Date: Tue, 21 Feb 2012 12:18:06 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <3783059.46171.1329844686939.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > OpenJPA 2.2.0 Released MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated
    From commits-return-9418-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 17:54:29 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFB709EB3 for ; Tue, 21 Feb 2012 17:54:29 +0000 (UTC) Received: (qmail 78863 invoked by uid 500); 21 Feb 2012 17:54:29 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 78842 invoked by uid 500); 21 Feb 2012 17:54:29 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 78835 invoked by uid 99); 21 Feb 2012 17:54:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 17:54:29 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY 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; Tue, 21 Feb 2012 17:54:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1LHs0v0011354 for ; Tue, 21 Feb 2012 17:54:00 GMT Date: Tue, 21 Feb 2012 12:54:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <20725308.46173.1329846840024.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Apache Nexus Release Process (1.2.x-2.1.x) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
    From commits-return-9419-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 21:15:21 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 648869160 for ; Tue, 21 Feb 2012 21:15:19 +0000 (UTC) Received: (qmail 63918 invoked by uid 500); 21 Feb 2012 21:15:19 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 63899 invoked by uid 500); 21 Feb 2012 21:15:19 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 63892 invoked by uid 99); 21 Feb 2012 21:15:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 21:15:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 21:15:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 831E52388C63 for ; Tue, 21 Feb 2012 21:14:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1292034 - in /openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java Date: Tue, 21 Feb 2012 21:14:58 -0000 To: commits@openjpa.apache.org From: curtisr7@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120221211458.831E52388C63@eris.apache.org> Author: curtisr7 Date: Tue Feb 21 21:14:57 2012 New Revision: 1292034 URL: http://svn.apache.org/viewvc?rev=1292034&view=rev Log: OPENJPA-2136: Fix NPE when using LiteAutoDetach. Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java?rev=1292034&r1=1292033&r2=1292034&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java Tue Feb 21 21:14:57 2012 @@ -3457,6 +3457,9 @@ public class BrokerImpl if (_transAdditions != null) { _transAdditions.clear(); } + if (_pending != null) { + _pending = null; + } if (_dmLite == null) { _dmLite = new DetachManagerLite(_conf); } Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java?rev=1292034&r1=1292033&r2=1292034&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java (original) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java Tue Feb 21 21:14:57 2012 @@ -45,6 +45,16 @@ public class TestDetachLite extends Test root = createData(); } + public void testPendingClear() { + EntityManager em = emf.createEntityManager(); + DMCustomer dm = em.find(DMCustomer.class, root.getId()); + dm.setLastName(System.currentTimeMillis() + "--last"); + em.clear(); + em.getTransaction().begin(); + // Pre OPENJPA-2136 this commit call would fail. + em.getTransaction().commit(); + } + public void testLeaveProxy() { Object[] p = props; p[1] = "loaded(LiteAutoDetach=true,DetachProxyFields=false)"; From commits-return-9420-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 21:27:48 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A2EB69EB9 for ; Tue, 21 Feb 2012 21:27:48 +0000 (UTC) Received: (qmail 12688 invoked by uid 500); 21 Feb 2012 21:27:48 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 12656 invoked by uid 500); 21 Feb 2012 21:27:48 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 12648 invoked by uid 99); 21 Feb 2012 21:27:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 21:27:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 21:27:47 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B6F932388C63 for ; Tue, 21 Feb 2012 21:27:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1292040 - in /openjpa/branches/2.2.x: openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java Date: Tue, 21 Feb 2012 21:27:27 -0000 To: commits@openjpa.apache.org From: curtisr7@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120221212727.B6F932388C63@eris.apache.org> Author: curtisr7 Date: Tue Feb 21 21:27:27 2012 New Revision: 1292040 URL: http://svn.apache.org/viewvc?rev=1292040&view=rev Log: OPENJPA-2136: Merging changes from trunk. Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java?rev=1292040&r1=1292039&r2=1292040&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java (original) +++ openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java Tue Feb 21 21:27:27 2012 @@ -3457,6 +3457,9 @@ public class BrokerImpl if (_transAdditions != null) { _transAdditions.clear(); } + if (_pending != null) { + _pending = null; + } if (_dmLite == null) { _dmLite = new DetachManagerLite(_conf); } Modified: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java?rev=1292040&r1=1292039&r2=1292040&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java (original) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachLite.java Tue Feb 21 21:27:27 2012 @@ -45,6 +45,16 @@ public class TestDetachLite extends Test root = createData(); } + public void testPendingClear() { + EntityManager em = emf.createEntityManager(); + DMCustomer dm = em.find(DMCustomer.class, root.getId()); + dm.setLastName(System.currentTimeMillis() + "--last"); + em.clear(); + em.getTransaction().begin(); + // Pre OPENJPA-2136 this commit call would fail. + em.getTransaction().commit(); + } + public void testLeaveProxy() { Object[] p = props; p[1] = "loaded(LiteAutoDetach=true,DetachProxyFields=false)"; From commits-return-9421-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 21:40:10 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9387A9935 for ; Tue, 21 Feb 2012 21:40:10 +0000 (UTC) Received: (qmail 52511 invoked by uid 500); 21 Feb 2012 21:40:10 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 52490 invoked by uid 500); 21 Feb 2012 21:40:10 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 52483 invoked by uid 99); 21 Feb 2012 21:40:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 21:40:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 21:40:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AFA762388C36 for ; Tue, 21 Feb 2012 21:39:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1292044 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Date: Tue, 21 Feb 2012 21:39:49 -0000 To: commits@openjpa.apache.org From: curtisr7@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120221213949.AFA762388C36@eris.apache.org> Author: curtisr7 Date: Tue Feb 21 21:39:49 2012 New Revision: 1292044 URL: http://svn.apache.org/viewvc?rev=1292044&view=rev Log: OPENJPA-2137: Make some StateManagerImpl fields protected to allow for greater extensibility. Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=1292044&r1=1292043&r2=1292044&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Tue Feb 21 21:39:49 2012 @@ -115,7 +115,7 @@ public class StateManagerImpl // information about the instance private transient PersistenceCapable _pc = null; private transient ClassMetaData _meta = null; - private BitSet _loaded = null; + protected BitSet _loaded = null; private BitSet _dirty = null; private BitSet _flush = null; private int _flags = 0; @@ -130,7 +130,7 @@ public class StateManagerImpl // the managing persistence manager and lifecycle state private transient BrokerImpl _broker; // this is serialized specially - private PCState _state = PCState.TRANSIENT; + protected PCState _state = PCState.TRANSIENT; // the current and last loaded version indicators, and the lock object private Object _version = null; @@ -167,8 +167,7 @@ public class StateManagerImpl /** * Constructor; supply id, type metadata, and owning persistence manager. */ - protected StateManagerImpl(Object id, ClassMetaData meta, - BrokerImpl broker) { + protected StateManagerImpl(Object id, ClassMetaData meta, BrokerImpl broker) { _id = id; _meta = meta; _broker = broker; From commits-return-9422-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 21 21:41:45 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9392E998F for ; Tue, 21 Feb 2012 21:41:45 +0000 (UTC) Received: (qmail 58283 invoked by uid 500); 21 Feb 2012 21:41:45 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 58264 invoked by uid 500); 21 Feb 2012 21:41:45 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 58257 invoked by uid 99); 21 Feb 2012 21:41:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 21:41:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 21:41:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A6D0F2388C36 for ; Tue, 21 Feb 2012 21:41:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1292045 - /openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Date: Tue, 21 Feb 2012 21:41:24 -0000 To: commits@openjpa.apache.org From: curtisr7@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120221214124.A6D0F2388C36@eris.apache.org> Author: curtisr7 Date: Tue Feb 21 21:41:24 2012 New Revision: 1292045 URL: http://svn.apache.org/viewvc?rev=1292045&view=rev Log: OPENJPA-2137: Merging changes from trunk. Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=1292045&r1=1292044&r2=1292045&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java (original) +++ openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Tue Feb 21 21:41:24 2012 @@ -115,7 +115,7 @@ public class StateManagerImpl // information about the instance private transient PersistenceCapable _pc = null; private transient ClassMetaData _meta = null; - private BitSet _loaded = null; + protected BitSet _loaded = null; private BitSet _dirty = null; private BitSet _flush = null; private int _flags = 0; @@ -130,7 +130,7 @@ public class StateManagerImpl // the managing persistence manager and lifecycle state private transient BrokerImpl _broker; // this is serialized specially - private PCState _state = PCState.TRANSIENT; + protected PCState _state = PCState.TRANSIENT; // the current and last loaded version indicators, and the lock object private Object _version = null; @@ -167,8 +167,7 @@ public class StateManagerImpl /** * Constructor; supply id, type metadata, and owning persistence manager. */ - protected StateManagerImpl(Object id, ClassMetaData meta, - BrokerImpl broker) { + protected StateManagerImpl(Object id, ClassMetaData meta, BrokerImpl broker) { _id = id; _meta = meta; _broker = broker; From commits-return-9423-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 22 08:07:00 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B395095B5 for ; Wed, 22 Feb 2012 08:07:00 +0000 (UTC) Received: (qmail 5588 invoked by uid 500); 22 Feb 2012 08:07:00 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 5283 invoked by uid 500); 22 Feb 2012 08:07:00 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 5104 invoked by uid 99); 22 Feb 2012 08:06:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 08:06:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.8] (HELO aegis.apache.org) (140.211.11.8) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 08:06:57 +0000 Received: from aegis (localhost [127.0.0.1]) by aegis.apache.org (Postfix) with ESMTP id AF51EC0005 for ; Wed, 22 Feb 2012 08:06:36 +0000 (UTC) Date: Wed, 22 Feb 2012 08:06:36 +0000 (UTC) From: Apache Jenkins Server To: commits@openjpa.apache.org Message-ID: <1771479097.1281329897996701.JavaMail.hudson@aegis> In-Reply-To: <767164569.5231329821559359.JavaMail.hudson@aegis> References: <767164569.5231329821559359.JavaMail.hudson@aegis> Subject: Jenkins build is back to normal : OpenJPA-trunk-deploy #251 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Jenkins-Job: OpenJPA-trunk-deploy X-Jenkins-Result: SUCCESS X-Virus-Checked: Checked by ClamAV on apache.org See From commits-return-9424-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 22 17:26:30 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D64929BA3 for ; Wed, 22 Feb 2012 17:26:30 +0000 (UTC) Received: (qmail 18493 invoked by uid 500); 22 Feb 2012 17:26:30 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 18447 invoked by uid 500); 22 Feb 2012 17:26:30 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 18404 invoked by uid 99); 22 Feb 2012 17:26:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 17:26:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 17:26:29 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B728C23889DA for ; Wed, 22 Feb 2012 17:26:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1292404 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Date: Wed, 22 Feb 2012 17:26:09 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120222172609.B728C23889DA@eris.apache.org> Author: kwsutter Date: Wed Feb 22 17:26:09 2012 New Revision: 1292404 URL: http://svn.apache.org/viewvc?rev=1292404&view=rev Log: OPENJPA-2123. Just check the value of db2ServerType instead of calling isDB2ZOSV8xOrLater(). Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?rev=1292404&r1=1292403&r2=1292404&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Wed Feb 22 17:26:09 2012 @@ -914,7 +914,7 @@ public class DB2Dictionary public void createIndexIfNecessary(Schema schema, DBIdentifier table, Column pkColumn) { - if (isDB2ZOSV8xOrLater()) { + if (db2ServerType == db2ZOSV8xOrLater) { // build the index for the sequence tables // the index name will be the fully qualified table name + _IDX Table tab = schema.getTable(table); @@ -971,7 +971,7 @@ public class DB2Dictionary @Override public void setQueryTimeout(PreparedStatement stmnt, int timeout) throws SQLException { - if(isDB2ZOSV8xOrLater()) { + if (db2ServerType == db2ZOSV8xOrLater) { try { super.setQueryTimeout(stmnt, timeout); } From commits-return-9425-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 22 17:30:40 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0188D9AF6 for ; Wed, 22 Feb 2012 17:30:40 +0000 (UTC) Received: (qmail 39657 invoked by uid 500); 22 Feb 2012 17:30:39 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 39627 invoked by uid 500); 22 Feb 2012 17:30:39 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 39618 invoked by uid 99); 22 Feb 2012 17:30:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 17:30:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 17:30:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0D7262388B42 for ; Wed, 22 Feb 2012 17:30:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1292411 - /openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Date: Wed, 22 Feb 2012 17:30:18 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120222173019.0D7262388B42@eris.apache.org> Author: kwsutter Date: Wed Feb 22 17:30:18 2012 New Revision: 1292411 URL: http://svn.apache.org/viewvc?rev=1292411&view=rev Log: OPENJPA-2123. Just check the value of db2ServerType instead of calling isDB2ZOSV8xOrLater(). Modified: openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Modified: openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?rev=1292411&r1=1292410&r2=1292411&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java (original) +++ openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Wed Feb 22 17:30:18 2012 @@ -914,7 +914,7 @@ public class DB2Dictionary public void createIndexIfNecessary(Schema schema, DBIdentifier table, Column pkColumn) { - if (isDB2ZOSV8xOrLater()) { + if (db2ServerType == db2ZOSV8xOrLater) { // build the index for the sequence tables // the index name will be the fully qualified table name + _IDX Table tab = schema.getTable(table); @@ -971,7 +971,7 @@ public class DB2Dictionary @Override public void setQueryTimeout(PreparedStatement stmnt, int timeout) throws SQLException { - if(isDB2ZOSV8xOrLater()) { + if (db2ServerType == db2ZOSV8xOrLater) { try { super.setQueryTimeout(stmnt, timeout); } From commits-return-9426-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 22 22:47:17 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9567F9819 for ; Wed, 22 Feb 2012 22:47:17 +0000 (UTC) Received: (qmail 88159 invoked by uid 500); 22 Feb 2012 22:47:17 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 88139 invoked by uid 500); 22 Feb 2012 22:47:17 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 88131 invoked by uid 99); 22 Feb 2012 22:47:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 22:47:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 22:47:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9656923889BB for ; Wed, 22 Feb 2012 22:46:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1292564 - in /openjpa/trunk/openjpa-persistence-locking/src/test: java/org/apache/openjpa/persistence/lock/extended/ java/org/apache/openjpa/persistence/lockmgr/ resources/META-INF/ Date: Wed, 22 Feb 2012 22:46:51 -0000 To: commits@openjpa.apache.org From: jrbauer@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120222224652.9656923889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jrbauer Date: Wed Feb 22 22:46:51 2012 New Revision: 1292564 URL: http://svn.apache.org/viewvc?rev=1292564&view=rev Log: OPENJPA-2140 Update locking tests to use a unique pu name Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lock/extended/LockScopeTestCase.java openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestLocking.java openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockBasic.java openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockPermutation.java openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerNonVersion.java openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestNamedQueryLockMode.java openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestOptimisticNamedQueryLockMode.java openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestPessimisticLocks.java openjpa/trunk/openjpa-persistence-locking/src/test/resources/META-INF/persistence.xml Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lock/extended/LockScopeTestCase.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lock/extended/LockScopeTestCase.java?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lock/extended/LockScopeTestCase.java (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lock/extended/LockScopeTestCase.java Wed Feb 22 22:46:51 2012 @@ -86,6 +86,11 @@ public abstract class LockScopeTestCase protected Map normalProps; protected Map extendedProps; + @Override + protected String getPersistenceUnitName() { + return "locking-test"; + } + protected void commonSetUp(Class... eClasses ) { normalProps = new HashMap(); extendedProps = new HashMap(); Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java Wed Feb 22 22:46:51 2012 @@ -81,6 +81,11 @@ public abstract class SequencedActionsTe private String empTableName; private List threads = null; + @Override + protected String getPersistenceUnitName() { + return "locking-test"; + } + @SuppressWarnings("deprecation") protected void commonSetUp() { empTableName = getMapping(LockEmployee.class).getTable().getFullName(); Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestLocking.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestLocking.java?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestLocking.java (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestLocking.java Wed Feb 22 22:46:51 2012 @@ -32,6 +32,11 @@ import org.apache.openjpa.persistence.te public class TestLocking extends SQLListenerTestCase { String _phone = "5075555555"; + @Override + protected String getPersistenceUnitName() { + return "locking-test"; + } + public void setUp() { super.setUp(CLEAR_TABLES, Person.class, PhoneNumber.class // ,"openjpa.Log", "SQL=trace" Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockBasic.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockBasic.java?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockBasic.java (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockBasic.java Wed Feb 22 22:46:51 2012 @@ -24,6 +24,12 @@ import javax.persistence.LockModeType; * Test JPA 2.0 em.lock(LockMode) basic behaviors with "mixed" lock manager. */ public class TestMixedLockManagerLockBasic extends SequencedActionsTest { + + @Override + protected String getPersistenceUnitName() { + return "locking-test"; + } + public void setUp() { setUp(LockEmployee.class , "openjpa.LockManager", "mixed" Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockPermutation.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockPermutation.java?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockPermutation.java (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerLockPermutation.java Wed Feb 22 22:46:51 2012 @@ -26,6 +26,12 @@ import javax.persistence.LockModeType; * Test JPA 2.0 LockMode type permutation behaviors with "mixed" lock manager. */ public class TestMixedLockManagerLockPermutation extends SequencedActionsTest { + + @Override + protected String getPersistenceUnitName() { + return "locking-test"; + } + public void setUp() { setUp(LockEmployee.class , "openjpa.LockManager", "mixed" Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerNonVersion.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerNonVersion.java?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerNonVersion.java (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestMixedLockManagerNonVersion.java Wed Feb 22 22:46:51 2012 @@ -34,6 +34,11 @@ public class TestMixedLockManagerNonVers private String empTableName; + @Override + protected String getPersistenceUnitName() { + return "locking-test"; + } + public void setUp() { setUp(LockEmployeeNonVersion.class , "openjpa.LockManager", "mixed" Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestNamedQueryLockMode.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestNamedQueryLockMode.java?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestNamedQueryLockMode.java (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestNamedQueryLockMode.java Wed Feb 22 22:46:51 2012 @@ -40,6 +40,11 @@ import org.apache.openjpa.persistence.te public class TestNamedQueryLockMode extends SQLListenerTestCase { String lockClause = "FOR UPDATE"; + @Override + protected String getPersistenceUnitName() { + return "locking-test"; + } + public void setUp() { super.setUp(CLEAR_TABLES, LockEmployee.class, "openjpa.LockManager", "pessimistic", Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestOptimisticNamedQueryLockMode.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestOptimisticNamedQueryLockMode.java?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestOptimisticNamedQueryLockMode.java (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestOptimisticNamedQueryLockMode.java Wed Feb 22 22:46:51 2012 @@ -35,6 +35,11 @@ import org.apache.openjpa.persistence.te public class TestOptimisticNamedQueryLockMode extends SQLListenerTestCase { String lockClause = "FOR UPDATE"; + @Override + protected String getPersistenceUnitName() { + return "locking-test"; + } + public void setUp() { super.setUp(CLEAR_TABLES, LockEmployee.class, "openjpa.LockManager", "pessimistic" Modified: openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestPessimisticLocks.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestPessimisticLocks.java?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestPessimisticLocks.java (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestPessimisticLocks.java Wed Feb 22 22:46:51 2012 @@ -56,6 +56,11 @@ public class TestPessimisticLocks extend private DBDictionary dict = null; private int lockWaitTime = 2000; + @Override + protected String getPersistenceUnitName() { + return "locking-test"; + } + public void setUp() { // Disable tests for any DB that has supportsQueryTimeout==false, like Postgres OpenJPAEntityManagerFactorySPI tempEMF = emf; Modified: openjpa/trunk/openjpa-persistence-locking/src/test/resources/META-INF/persistence.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-locking/src/test/resources/META-INF/persistence.xml?rev=1292564&r1=1292563&r2=1292564&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-locking/src/test/resources/META-INF/persistence.xml (original) +++ openjpa/trunk/openjpa-persistence-locking/src/test/resources/META-INF/persistence.xml Wed Feb 22 22:46:51 2012 @@ -20,7 +20,7 @@ - + + + + + + + + + + + + + + Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml?rev=1293250&view=auto ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml (added) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml Fri Feb 24 13:53:01 2012 @@ -0,0 +1,33 @@ + + + + + org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml + org.apache.openjpa.persistence.embed.lazy.ReclinerId + org.apache.openjpa.persistence.embed.lazy.Recliner + org.apache.openjpa.persistence.embed.lazy.Guy + org.apache.openjpa.persistence.embed.lazy.BeverageHolder + + + + + \ No newline at end of file Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java?rev=1293250&r1=1293249&r2=1293250&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java (original) +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java Fri Feb 24 13:53:01 2012 @@ -2542,6 +2542,11 @@ public class XMLPersistenceMetaDataParse parseCommonExtendedAttributes(fmd, attrs); parseTypeAttr(fmd, attrs); // TODO - handle attributes + String val = attrs.getValue("fetch"); + if (val != null) { + fmd.setInDefaultFetchGroup("EAGER".equals(val)); + } + switch (fmd.getDeclaredTypeCode()) { case JavaTypes.ARRAY: if (fmd.getDeclaredType() == byte[].class From commits-return-9430-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 24 16:00:37 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B10E9FA1 for ; Fri, 24 Feb 2012 16:00:37 +0000 (UTC) Received: (qmail 57110 invoked by uid 500); 24 Feb 2012 16:00:37 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 57084 invoked by uid 500); 24 Feb 2012 16:00:37 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 57077 invoked by uid 99); 24 Feb 2012 16:00:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 16:00:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 16:00:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CC6062388A39 for ; Fri, 24 Feb 2012 16:00:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1293310 - /openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java Date: Fri, 24 Feb 2012 16:00:16 -0000 To: commits@openjpa.apache.org From: dianner@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120224160016.CC6062388A39@eris.apache.org> Author: dianner Date: Fri Feb 24 16:00:16 2012 New Revision: 1293310 URL: http://svn.apache.org/viewvc?rev=1293310&view=rev Log: OPENJPA-2142 Handle merge of new object with Entity Id field Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java?rev=1293310&r1=1293309&r2=1293310&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java (original) +++ openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java Fri Feb 24 16:00:16 2012 @@ -92,9 +92,30 @@ abstract class AttachStrategy else // application identity: use existing fields newInstance = pc.pcNewInstance(null, appId, false); - return (StateManagerImpl) manager.getBroker().persist - (newInstance, appId, explicit, manager.getBehavior(), !manager.getCopyNew()); + StateManagerImpl sm = (StateManagerImpl) manager.getBroker().persist + (newInstance, appId, explicit, manager.getBehavior(), !manager.getCopyNew()); + + attachPCKeyFields(pc, sm, meta, manager); + + return sm; } + + private void attachPCKeyFields(PersistenceCapable fromPC, + StateManagerImpl sm, ClassMetaData meta, AttachManager manager) { + + if (fromPC.pcGetStateManager() == null) { + fromPC.pcReplaceStateManager(sm); + + FieldMetaData[] fmds = meta.getDefinedFields(); + for (FieldMetaData fmd : fmds) { + if (fmd.isPrimaryKey()) { + attachField(manager, fromPC, sm, fmd, true); + } + } + + fromPC.pcReplaceStateManager(null); + } + } /** * Attach the given field into the given instance. From commits-return-9431-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 24 16:09:52 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A3709198 for ; Fri, 24 Feb 2012 16:09:52 +0000 (UTC) Received: (qmail 84866 invoked by uid 500); 24 Feb 2012 16:09:52 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 84839 invoked by uid 500); 24 Feb 2012 16:09:52 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 84830 invoked by uid 99); 24 Feb 2012 16:09:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 16:09:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 16:09:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D417823888FD for ; Fri, 24 Feb 2012 16:09:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1293315 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java Date: Fri, 24 Feb 2012 16:09:31 -0000 To: commits@openjpa.apache.org From: dianner@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120224160931.D417823888FD@eris.apache.org> Author: dianner Date: Fri Feb 24 16:09:31 2012 New Revision: 1293315 URL: http://svn.apache.org/viewvc?rev=1293315&view=rev Log: OPENJPA-2142 Handle merge of new object with Entity Id field Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java?rev=1293315&r1=1293314&r2=1293315&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java Fri Feb 24 16:09:31 2012 @@ -92,8 +92,30 @@ abstract class AttachStrategy else // application identity: use existing fields newInstance = pc.pcNewInstance(null, appId, false); - return (StateManagerImpl) manager.getBroker().persist + StateManagerImpl sm = (StateManagerImpl) manager.getBroker().persist (newInstance, appId, explicit, manager.getBehavior(), !manager.getCopyNew()); + + attachPCKeyFields(pc, sm, meta, manager); + + return sm; + } + + private void attachPCKeyFields(PersistenceCapable fromPC, + StateManagerImpl sm, ClassMetaData meta, AttachManager manager) { + + + if (fromPC.pcGetStateManager() == null) { + fromPC.pcReplaceStateManager(sm); + + FieldMetaData[] fmds = meta.getDefinedFields(); + for (FieldMetaData fmd : fmds) { + if (fmd.isPrimaryKey() && fmd.getDeclaredTypeCode() == JavaTypes.PC) { + attachField(manager, fromPC, sm, fmd, true); + } + } + + fromPC.pcReplaceStateManager(null); + } } /** From commits-return-9432-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 24 19:06:55 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B51D91BC for ; Fri, 24 Feb 2012 19:06:55 +0000 (UTC) Received: (qmail 2871 invoked by uid 500); 24 Feb 2012 19:06:55 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 2846 invoked by uid 500); 24 Feb 2012 19:06:55 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 2828 invoked by uid 99); 24 Feb 2012 19:06:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 19:06:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 19:06:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 305D623888D2 for ; Fri, 24 Feb 2012 19:06:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1293382 - in /openjpa/branches/2.2.x: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/la... Date: Fri, 24 Feb 2012 19:06:32 -0000 To: commits@openjpa.apache.org From: jrbauer@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120224190633.305D623888D2@eris.apache.org> Author: jrbauer Date: Fri Feb 24 19:06:31 2012 New Revision: 1293382 URL: http://svn.apache.org/viewvc?rev=1293382&view=rev Log: OPENJPA-2141 fix and test for lazy embedded fields Added: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/BeverageHolder.java (with props) openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Guy.java (with props) openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Recliner.java (with props) openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/ReclinerId.java (with props) openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Style.java (with props) openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/TestLazyEmbeddable.java (with props) openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml (with props) openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml (with props) Modified: openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EmbedFieldStrategy.java openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java Modified: openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java?rev=1293382&r1=1293381&r2=1293382&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java (original) +++ openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Fri Feb 24 19:06:31 2012 @@ -1087,10 +1087,6 @@ public class JDBCStoreManager implements if (processed != eres) res.putEager(fms[i], processed); } else { - boolean lazyEmbeddable = fms[i].getValueMapping().isEmbedded() && - fms[i].getEmbeddedMetaData() != null && - fetch.requiresFetch(fms[i]) == FetchConfiguration.FETCH_NONE; - if (!lazyEmbeddable) fms[i].load(sm, this, fetch.traverseJDBC(fms[i]), res); } } finally { Modified: openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EmbedFieldStrategy.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EmbedFieldStrategy.java?rev=1293382&r1=1293381&r2=1293382&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EmbedFieldStrategy.java (original) +++ openjpa/branches/2.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/EmbedFieldStrategy.java Fri Feb 24 19:06:31 2012 @@ -43,6 +43,7 @@ import org.apache.openjpa.jdbc.meta.Clas import org.apache.openjpa.jdbc.meta.Embeddable; import org.apache.openjpa.jdbc.meta.FieldMapping; import org.apache.openjpa.jdbc.meta.JavaSQLTypes; +import org.apache.openjpa.jdbc.meta.Joinable; import org.apache.openjpa.jdbc.meta.RelationId; import org.apache.openjpa.jdbc.meta.ValueMappingInfo; import org.apache.openjpa.jdbc.schema.Column; @@ -62,7 +63,9 @@ import org.apache.openjpa.kernel.StateMa import org.apache.openjpa.kernel.StoreContext; import org.apache.openjpa.lib.util.Localizer; import org.apache.openjpa.meta.ClassMetaData; +import org.apache.openjpa.meta.FetchGroup; import org.apache.openjpa.meta.FieldMetaData; +import org.apache.openjpa.meta.JavaTypes; import org.apache.openjpa.meta.ValueMetaData; import org.apache.openjpa.util.InternalException; import org.apache.openjpa.util.MetaDataException; @@ -406,6 +409,14 @@ public class EmbedFieldStrategy sm.storeObject(field.getIndex(), null); return; } + + // handling of lazy embeddables. if the embedded field is not part of any + // fetch group and the result does not contain any embeddable columns, + // do not load the embeddable. + if (fetch.requiresFetch(field) == FetchConfiguration.FETCH_NONE && + !containsEmbeddedResult(fetch, res)) { + return; + } //### note: without a null indicator column, the above indicatesNull() //### call will always return false, meaning we always have to assume @@ -426,6 +437,52 @@ public class EmbedFieldStrategy } } + /* + * finds an eager fetch field and searches for it in the result. + * if the result does not contain it, assume that it contains no embeddable + * column data. this is a fairly safe assumption given that the entire + * embeddable was marked lazy. + */ + private boolean containsEmbeddedResult(FetchConfiguration fetch, Result res) { + FieldMapping[] fields = field.getEmbeddedMapping().getFieldMappings(); + for (int i = 0; i < fields.length; i++) { + boolean load = (fetch.requiresFetch(fields[i]) == FetchConfiguration.FETCH_LOAD); + if (load) { + // check the first eager fetch field + return checkResult(fields[i],res); + } + } + // if all fields are lazy and in the default fetch group, populate the embeddable + // so its attributes can be loaded when accessed. + return fetch.hasFetchGroup(FetchGroup.NAME_DEFAULT); + } + + private boolean checkResult(FieldMapping fm, Result res) { + if (fm.getStrategy() instanceof Joinable) { + Joinable strat = (Joinable)fm.getStrategy(); + Column[] cols = strat.getColumns(); + for (Column col : cols) { + try { + if (res.contains(col)) { + return true; + } + } catch (Exception e) { + return false; + } + } + } + // if the field is a collection, also check for an eager result which could result from + // a non-lazy relationship in the embeddable + int type = fm.getTypeCode(); + if ((type == JavaTypes.ARRAY || + type == JavaTypes.COLLECTION || + type == JavaTypes.MAP) + && res.getEager(fm) != null) { + return true; + } + return false; + } + private boolean loadFields(OpenJPAStateManager em, JDBCStore store, JDBCFetchConfiguration fetch, Result res) throws SQLException { Added: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/BeverageHolder.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/BeverageHolder.java?rev=1293382&view=auto ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/BeverageHolder.java (added) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/BeverageHolder.java Fri Feb 24 19:06:31 2012 @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.embed.lazy; + +import javax.persistence.Basic; +import javax.persistence.Column; +import javax.persistence.Embeddable; +import javax.persistence.FetchType; + +@Embeddable +public class BeverageHolder { + + @Basic(fetch=FetchType.LAZY) + @Column(name="BH_DIAMETER") + private int diameter; + + @Column(name="BH_DEPTH") + private int depth; + + public void setDiameter(int diameter) { + this.diameter = diameter; + } + + public int getDiameter() { + return diameter; + } + + public void setDepth(int depth) { + this.depth = depth; + } + + public int getDepth() { + return depth; + } +} Propchange: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/BeverageHolder.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Guy.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Guy.java?rev=1293382&view=auto ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Guy.java (added) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Guy.java Fri Feb 24 19:06:31 2012 @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.embed.lazy; + +import javax.persistence.Basic; +import javax.persistence.Column; +import javax.persistence.Embeddable; +import javax.persistence.FetchType; + +@Embeddable +public class Guy { + + @Basic(fetch=FetchType.LAZY) + @Column(name="GUY_HEIGHT") + private int height; + + @Basic(fetch=FetchType.LAZY) + @Column(name="GUY_WEIGHT") + private int weight; + + @Column(name="GUY_NAME") + private String name; + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setHeight(int height) { + this.height = height; + } + + public int getHeight() { + return height; + } + + public void setWeight(int weight) { + this.weight = weight; + } + + public int getWeight() { + return weight; + } +} Propchange: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Guy.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Recliner.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Recliner.java?rev=1293382&view=auto ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Recliner.java (added) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Recliner.java Fri Feb 24 19:06:31 2012 @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.embed.lazy; + +import javax.persistence.Column; +import javax.persistence.Embedded; +import javax.persistence.EmbeddedId; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.Table; + +import org.apache.openjpa.persistence.Persistent; + +@Entity +@Table(name="REC_TABLE") +public class Recliner { + + @EmbeddedId + private ReclinerId id; + + @Enumerated(EnumType.STRING) + @Column(name="REC_STYLE") + private Style style; + + @Embedded // Lazy fetch set via xml mapping + private Guy guy; + + @Persistent(fetch=FetchType.LAZY, embedded=true) + private BeverageHolder holder; + + public void setId(ReclinerId id) { + this.id = id; + } + + public ReclinerId getId() { + return id; + } + + public void setStyle(Style style) { + this.style = style; + } + + public Style getStyle() { + return style; + } + + public void setGuy(Guy guy) { + this.guy = guy; + } + + public Guy getGuy() { + return guy; + } + + public void setHolder(BeverageHolder holder) { + this.holder = holder; + } + + public BeverageHolder getHolder() { + return holder; + } +} Propchange: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Recliner.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/ReclinerId.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/ReclinerId.java?rev=1293382&view=auto ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/ReclinerId.java (added) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/ReclinerId.java Fri Feb 24 19:06:31 2012 @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.embed.lazy; + +import javax.persistence.Column; +import javax.persistence.Embeddable; + +@Embeddable +public class ReclinerId { + + private int id; + private String color; + + public void setId(int id) { + this.id = id; + } + + @Column(name="RECID_ID") + public int getId() { + return id; + } + + public void setColor(String color) { + this.color = color; + } + + @Column(name="RECID_COLOR") + public String getColor() { + return color; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof ReclinerId) { + ReclinerId rid = (ReclinerId)obj; + return rid.id == id && + rid.color.equals(color); + } + return false; + } + + @Override + public int hashCode() { + return id ^ color.hashCode(); + } +} Propchange: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/ReclinerId.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Style.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Style.java?rev=1293382&view=auto ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Style.java (added) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Style.java Fri Feb 24 19:06:31 2012 @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.embed.lazy; + +public enum Style { + WESTERN, + RETRO, + MODERN +} Propchange: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/Style.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/TestLazyEmbeddable.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/TestLazyEmbeddable.java?rev=1293382&view=auto ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/TestLazyEmbeddable.java (added) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/TestLazyEmbeddable.java Fri Feb 24 19:06:31 2012 @@ -0,0 +1,197 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.embed.lazy; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Random; + +import javax.persistence.EntityManager; + +import org.apache.openjpa.lib.jdbc.AbstractJDBCListener; +import org.apache.openjpa.lib.jdbc.JDBCEvent; +import org.apache.openjpa.lib.jdbc.JDBCListener; +import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI; +import org.apache.openjpa.persistence.OpenJPAPersistence; +import org.apache.openjpa.persistence.test.AbstractPersistenceTestCase; + +public class TestLazyEmbeddable extends AbstractPersistenceTestCase { + + protected List _sql = new ArrayList(); + + /* + * Verifies an entity with annotated (@Persistent) lazy embeddable and xml-tagged + * lazy embeddable (openjpa:persistent) with a mix of eager and lazy fields are lazily + * loaded (or not) as expected. + */ + public void testLazyEmbeddableFields() throws Exception { + _sql.clear(); + HashMap props = new HashMap(); + props.put("openjpa.jdbc.JDBCListeners", + new JDBCListener[] { new SQLListener() }); + OpenJPAEntityManagerFactorySPI emf1 = + (OpenJPAEntityManagerFactorySPI)OpenJPAPersistence. + createEntityManagerFactory("LazyEmbedPU", + "org/apache/openjpa/persistence/embed/lazy/" + + "embed-lazy-persistence.xml", props); + + try { + EntityManager em = emf1.createEntityManager(); + + Recliner rec = new Recliner(); + ReclinerId recId = new ReclinerId(); + recId.setColor("Camouflage"); + recId.setId(new Random().nextInt()); + rec.setId(recId); + rec.setStyle(Style.RETRO); + + Guy guy = new Guy(); + guy.setName("Tom"); + guy.setHeight(76); + guy.setWeight(275); + rec.setGuy(guy); + + BeverageHolder bh = new BeverageHolder(); + bh.setDepth(2); + bh.setDiameter(3); + rec.setHolder(bh); + + em.getTransaction().begin(); + em.persist(rec); + em.getTransaction().commit(); + + em.clear(); + _sql.clear(); + + Recliner r2 = em.find(Recliner.class, recId); + assertNotNull("Find returned null object", r2); + assertTrue(selectContains("REC_TABLE", _sql, "REC_STYLE", "RECID_ID", "RECID_COLOR")); + assertFalse(selectContains("REC_TABLE", _sql, "GUY_HEIGHT", "GUY_WEIGHT", "GUY_NAME", + "BH_DIAMETER", "BH_DEPTH")); + em.detach(r2); + // Lazy embeds should be null after detach. + assertNull("Embedded field guy is null before getter is called", r2.getGuy()); + assertNull("Embedded field holder is null before getter is called", r2.getHolder()); + + // verify lazy embeds will load on access post-detach and merge + r2 = em.merge(r2); + verifyLazyLoading(r2); + + em.clear(); + _sql.clear(); + // verify lazy embeds will load on access after find + r2 = em.find(Recliner.class, recId); + assertNotNull("Find returned null object", r2); + assertTrue(selectContains("REC_TABLE", _sql, "REC_STYLE", "RECID_ID", "RECID_COLOR")); + assertFalse(selectContains("REC_TABLE", _sql, "GUY_HEIGHT", "GUY_WEIGHT", "GUY_NAME", + "BH_DIAMETER", "BH_DEPTH")); + verifyLazyLoading(r2); + } finally { + cleanupEMF(emf1); + } + } + + + + private void verifyLazyLoading(Recliner r2) { + _sql.clear(); + Guy g = r2.getGuy(); + assertNotNull("Guy is not null", g); + assertTrue(selectContains("REC_TABLE", _sql, "GUY_NAME")); + assertFalse(selectContains("REC_TABLE", _sql, "GUY_HEIGHT", "GUY_WEIGHT")); + _sql.clear(); + g.getHeight(); + assertTrue(selectContains("REC_TABLE", _sql, "GUY_HEIGHT")); + assertFalse(selectContains("REC_TABLE", _sql, "GUY_NAME", "GUY_WEIGHT", "BH_DIAMETER", + "BH_DEPTH")); + + _sql.clear(); + BeverageHolder holder = r2.getHolder(); + assertNotNull("Holder is not null", holder); + assertTrue(selectContains("REC_TABLE", _sql, "BH_DEPTH")); + assertFalse(selectContains("REC_TABLE", _sql, "BH_DIAMETER")); + _sql.clear(); + holder.getDiameter(); + assertTrue(selectContains("REC_TABLE", _sql, "BH_DIAMETER")); + assertFalse(selectContains("REC_TABLE", _sql, "BH_DEPTH")); + } + + + + private boolean selectContains(String table, List sql, String...cols) { + boolean foundSelect = false; + for (String s: sql) { + String stmt = s.toUpperCase(); + if (!stmt.startsWith("SELECT") && !stmt.contains(table)) { + continue; + } + foundSelect = true; + for (String col : cols) { + String ucol = col.toUpperCase(); + if (!stmt.contains(ucol)) { + return false; + } + } + } + return foundSelect; + } + + + + private static String toString(List list) { + StringBuffer buf = new StringBuffer(); + for (String s : list) + buf.append(s).append("\r\n"); + return buf.toString(); + } + + /** + * Closes a specific entity manager factory and cleans up + * associated tables. + */ + private void cleanupEMF(OpenJPAEntityManagerFactorySPI emf1) + throws Exception { + + if (emf1 == null) + return; + + try { + clear(emf1); + } catch (Exception e) { + // if a test failed, swallow any exceptions that happen + // during tear-down, as these just mask the original problem. + if (testResult.wasSuccessful()) + throw e; + } finally { + closeEMF(emf1); + } + } + + public class SQLListener + extends AbstractJDBCListener { + + @Override + public void beforeExecuteStatement(JDBCEvent event) { + if (event.getSQL() != null && _sql != null) { + _sql.add(event.getSQL()); + } + } + } +} Propchange: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/lazy/TestLazyEmbeddable.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml?rev=1293382&view=auto ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml (added) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml Fri Feb 24 19:06:31 2012 @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + Propchange: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml?rev=1293382&view=auto ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml (added) +++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml Fri Feb 24 19:06:31 2012 @@ -0,0 +1,33 @@ + + + + + org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml + org.apache.openjpa.persistence.embed.lazy.ReclinerId + org.apache.openjpa.persistence.embed.lazy.Recliner + org.apache.openjpa.persistence.embed.lazy.Guy + org.apache.openjpa.persistence.embed.lazy.BeverageHolder + + + + + \ No newline at end of file Propchange: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-persistence.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java?rev=1293382&r1=1293381&r2=1293382&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java (original) +++ openjpa/branches/2.2.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java Fri Feb 24 19:06:31 2012 @@ -2542,6 +2542,11 @@ public class XMLPersistenceMetaDataParse parseCommonExtendedAttributes(fmd, attrs); parseTypeAttr(fmd, attrs); // TODO - handle attributes + String val = attrs.getValue("fetch"); + if (val != null) { + fmd.setInDefaultFetchGroup("EAGER".equals(val)); + } + switch (fmd.getDeclaredTypeCode()) { case JavaTypes.ARRAY: if (fmd.getDeclaredType() == byte[].class From commits-return-9433-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 24 19:25:44 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 197869554 for ; Fri, 24 Feb 2012 19:25:44 +0000 (UTC) Received: (qmail 65075 invoked by uid 500); 24 Feb 2012 19:25:44 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 65045 invoked by uid 500); 24 Feb 2012 19:25:44 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 65038 invoked by uid 99); 24 Feb 2012 19:25:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 19:25:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 19:25:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 90D4423888FD for ; Fri, 24 Feb 2012 19:25:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1293389 - /openjpa/branches/2.1.x/patchoj.py Date: Fri, 24 Feb 2012 19:25:19 -0000 To: commits@openjpa.apache.org From: kwsutter@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120224192519.90D4423888FD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwsutter Date: Fri Feb 24 19:25:19 2012 New Revision: 1293389 URL: http://svn.apache.org/viewvc?rev=1293389&view=rev Log: Integrating the patchoj.py tool for ease of creating patches. It already existed in later releases, so I'm just bringing it backwards. Added: openjpa/branches/2.1.x/patchoj.py Added: openjpa/branches/2.1.x/patchoj.py URL: http://svn.apache.org/viewvc/openjpa/branches/2.1.x/patchoj.py?rev=1293389&view=auto ============================================================================== --- openjpa/branches/2.1.x/patchoj.py (added) +++ openjpa/branches/2.1.x/patchoj.py Fri Feb 24 19:25:19 2012 @@ -0,0 +1,179 @@ +#!/usr/bin/python +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +from optparse import OptionParser +from zipfile import ZipFile +from subprocess import Popen,PIPE +from glob import glob +import os,re + +def main() : + usage= "usage: %prog [optons]" + description = "Generate a jar file which contains the OpenJPA class files which have been changed. The output from svn info and svn diff may also be included. A typical \ + use is to run from the same directory as the parent pom. This will automatically include all changed files with a .java extension." + version = "$prog 0.5" + parser = OptionParser(usage=usage, version=version, description = description) + parser.add_option("-f", "--files", dest="files", help="list of filenames to include") + parser.add_option("-p", "--patchfile", dest="patchfile", help="patch file name", default="patch.jar") + parser.add_option("-i", "--noinfo", action="store_false", dest="includeInfo", help="exclude output from svn info", default=True) + parser.add_option("-d", "--nodiff", action="store_false", dest="includeDiff", help="exclude output from svn diff",default=True) + parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="print debug information",default=False) + # parser.add_option("-p", "--pattern", dest="pattern", help="regex of filenames to match") + + global options + (options,args) = parser.parse_args() + + genZip(options) + +def genZip(options): + """ generate the zip file """ + if options.files == None: + files = getAllFiles() + else : + files = getFilesFromList(options.files) + + zip = ZipFile(options.patchfile, 'w') + + if options.includeInfo: + writeInfo(zip, files) + if options.includeDiff: + writeDiff(zip, files) + + writeClasses(zip, files) + + zip.close() + + print 'Wrote patch to %s. ' % (options.patchfile) + if options.verbose: + print 'Files in patch: %s' % ("\n".join(files)) + +def getAllFiles(): + """ get the list of all modified files. Only Added or Modified .java, .properties files will be considered """ + if options.verbose: + print ' > getAllFiles' + files = [] + + commandOutput = Popen(['svn', 'stat'], stdout=PIPE).communicate()[0].splitlines() + prog = re.compile('([A|M] *)(.*\.java)') + for candidate in commandOutput: + match = prog.match(candidate) + if match : + files.append(match.group(2)) + + prog = re.compile('([A|M] *)(.*\.properties)') + for candidate in commandOutput: + match = prog.match(candidate) + if match : + files.append(match.group(2)) + + + if options.verbose: + print 'Found modified files : ' + str(files) + print ' < getAllFiles' + return files + +def getFilesFromList(files) : + """ get a list of modified files from a comma separated list usually from the command line """ + + if options.verbose : + print ' > getFilesFromList' + print ' returning ' + str(files.split(',')) + print ' < getFilesFromList' + + return files.split(',') + +def writeInfo(zip, files=None): + """ write the output of svn info to a temp file and store in a zip """ + if options.verbose : + print ' > writeInfo' + + patchFile = open('info.txt', 'w') + args = ['svn', 'info'] + + if files: + args.extend(files) + + Popen(args=args, stdout=patchFile).communicate()[0] + + zip.write(patchFile.name) + patchFile.close() + os.remove(patchFile.name) + + if options.verbose: + print ' < writeInfo' + +def writeDiff(zip, files=None): + """ Write the output of svn diff to a temp file and store in a zip """ + if options.verbose: + print ' > writeDiff' + + patchFile = open('patch.txt', 'w') + args = ['svn', 'diff'] + if files: + args.extend(files) + + Popen(args=args, stdout=patchFile).communicate()[0] + + zip.write(patchFile.name) + patchFile.close() + os.remove(patchFile.name) + + if options.verbose: + print ' < writeDiff' + +def javaToClass(file) : + """ simple helper function, converts a string from svn stat (or command line) to its corresponding + .class file + """ + + rval = file.replace('src','target').replace('main','classes').replace('test','test-classes').replace('.java', '.class').replace('java','').replace('\\\\','\\') + return rval; + +def javaToInnerClass(file): + """ helper function, converts .java file to a glob pattern that matches inner classes """ + return javaToClass(file).replace('.class', '$*.class') + +def writeClasses(zip, files=None): + """ Write class files to a zip """ + + prog = re.compile('(.*classes.)(.*)') + propertiesProg = re.compile('(.*resources.)(.*)') + + for file in files : + if str(file).endswith('.java'): + for globMatch in glob(javaToClass(file)) : + if(prog.match(globMatch)): + target = prog.match(globMatch).group(2) + zip.write(os.path.realpath(globMatch), target) + + # match again on inner classes, not sure if glob supports optional matches. + for globMatch in glob(javaToInnerClass(file)) : + if(prog.match(globMatch)): + target = prog.match(globMatch).group(2) + zip.write(os.path.realpath(globMatch), target) + elif str(file).endswith('.properties'): + for globMatch in glob(file) : + if(propertiesProg.match(globMatch)): + target = propertiesProg.match(globMatch).group(2) + zip.write(os.path.realpath(globMatch), target) + +if __name__ == "__main__": + main() + From commits-return-9434-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 24 20:13:27 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E7D59003 for ; Fri, 24 Feb 2012 20:13:27 +0000 (UTC) Received: (qmail 10545 invoked by uid 500); 24 Feb 2012 20:13:27 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 10526 invoked by uid 500); 24 Feb 2012 20:13:27 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 10519 invoked by uid 99); 24 Feb 2012 20:13:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 20:13:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 20:13:24 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E92CC2388860 for ; Fri, 24 Feb 2012 20:13:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1293399 - /openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java Date: Fri, 24 Feb 2012 20:13:02 -0000 To: commits@openjpa.apache.org From: jrbauer@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120224201302.E92CC2388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jrbauer Date: Fri Feb 24 20:13:02 2012 New Revision: 1293399 URL: http://svn.apache.org/viewvc?rev=1293399&view=rev Log: OPENJPA-2143 reduce lock contention on LifecycleEventManager Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java?rev=1293399&r1=1293398&r2=1293399&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java (original) +++ openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java Fri Feb 24 20:13:02 2012 @@ -27,6 +27,9 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + import org.apache.openjpa.meta.ClassMetaData; import org.apache.openjpa.meta.MetaDataDefaults; import org.apache.openjpa.lib.util.Localizer; @@ -64,6 +67,7 @@ public class LifecycleEventManager private boolean _firing = false; private boolean _fail = false; private boolean _failFast = false; + private ReadWriteLock _rwLock = new ReentrantReadWriteLock(); /** * Whether to fail after first exception when firing events to listeners. @@ -83,55 +87,65 @@ public class LifecycleEventManager * Register a lifecycle listener for the given classes. If the classes * array is null, register for all classes. */ - public synchronized void addListener(Object listener, Class[] classes) { + public void addListener(Object listener, Class[] classes) { if (listener == null) return; if (classes != null && classes.length == 0) return; - if (_firing) { - _addListeners.add(listener); - _addListeners.add(classes); - return; - } - - if (classes == null) { - if (_listeners == null) - _listeners = new ListenerList(5); - _listeners.add(listener); - return; - } - - if (_classListeners == null) - _classListeners = new HashMap, ListenerList>(); - ListenerList listeners; - for (int i = 0; i < classes.length; i++) { - listeners = (ListenerList) _classListeners.get(classes[i]); - if (listeners == null) { - listeners = new ListenerList(3); - _classListeners.put(classes[i], listeners); + _rwLock.writeLock().lock(); + try { + if (_firing) { + _addListeners.add(listener); + _addListeners.add(classes); + return; + } + + if (classes == null) { + if (_listeners == null) + _listeners = new ListenerList(5); + _listeners.add(listener); + return; + } + + if (_classListeners == null) + _classListeners = new HashMap, ListenerList>(); + ListenerList listeners; + for (int i = 0; i < classes.length; i++) { + listeners = (ListenerList) _classListeners.get(classes[i]); + if (listeners == null) { + listeners = new ListenerList(3); + _classListeners.put(classes[i], listeners); + } + listeners.add(listener); } - listeners.add(listener); + } finally { + _rwLock.writeLock().unlock(); } } /** * Remove the given listener. */ - public synchronized void removeListener(Object listener) { - if (_firing) { - _remListeners.add(listener); - return; - } - - if (_listeners != null && _listeners.remove(listener)) - return; - if (_classListeners != null) { - ListenerList listeners; - for (Iterator itr = _classListeners.values().iterator(); - itr.hasNext();) { - listeners = (ListenerList) itr.next(); - listeners.remove(listener); + public void removeListener(Object listener) { + _rwLock.writeLock().lock(); + try { + if (_firing) { + _remListeners.add(listener); + return; + } + + if (_listeners != null && _listeners.remove(listener)) + return; + if (_classListeners != null) { + ListenerList listeners; + for (Iterator itr = _classListeners.values().iterator(); + itr.hasNext();) { + listeners = (ListenerList) itr.next(); + listeners.remove(listener); + } } + } finally { + _rwLock.writeLock().unlock(); } } @@ -266,63 +280,68 @@ public class LifecycleEventManager /** * Fire lifecycle event to all registered listeners. */ - public synchronized Exception[] fireEvent(Object source, Object related, + public Exception[] fireEvent(Object source, Object related, ClassMetaData meta, int type) { - boolean reentrant = _firing; - _firing = true; - List exceptions = (reentrant) ? new LinkedList() : _exceps; - MetaDataDefaults def = meta.getRepository().getMetaDataFactory(). - getDefaults(); - - boolean callbacks = def.getCallbacksBeforeListeners(type); - if (callbacks) - makeCallbacks(source, related, meta, type, exceptions); - - LifecycleEvent ev = (LifecycleEvent) fireEvent(null, source, related, - type, _listeners, false, exceptions); - - if (_classListeners != null) { - Class c = source == null ? meta.getDescribedType() : source.getClass(); - do { - ev = (LifecycleEvent) fireEvent(ev, source, related, type, - (ListenerList) _classListeners.get(c), false, exceptions); - c = c.getSuperclass(); - } while (c != null && c != Object.class); - } - - // make system listeners - if (!meta.getLifecycleMetaData().getIgnoreSystemListeners()) { - ListenerList system = meta.getRepository().getSystemListeners(); - fireEvent(ev, source, related, type, system, false, exceptions); - } - - if (!callbacks) - makeCallbacks(source, related, meta, type, exceptions); - - // create return array before clearing exceptions - Exception[] ret; - if (exceptions.isEmpty()) - ret = EMPTY_EXCEPTIONS; - else - ret = (Exception[]) exceptions.toArray - (new Exception[exceptions.size()]); - - // if this wasn't a reentrant call, catch up with calls to add - // and remove listeners made while firing - if (!reentrant) { - _firing = false; - _fail = false; - if (!_addListeners.isEmpty()) - for (Iterator itr = _addListeners.iterator(); itr.hasNext();) - addListener(itr.next(), (Class[]) itr.next()); - if (!_remListeners.isEmpty()) - for (Iterator itr = _remListeners.iterator(); itr.hasNext();) - removeListener(itr.next()); - _addListeners.clear(); - _remListeners.clear(); - _exceps.clear(); + _rwLock.writeLock().lock(); + try { + boolean reentrant = _firing; + _firing = true; + List exceptions = (reentrant) ? new LinkedList() : _exceps; + MetaDataDefaults def = meta.getRepository().getMetaDataFactory(). + getDefaults(); + + boolean callbacks = def.getCallbacksBeforeListeners(type); + if (callbacks) + makeCallbacks(source, related, meta, type, exceptions); + + LifecycleEvent ev = (LifecycleEvent) fireEvent(null, source, related, + type, _listeners, false, exceptions); + + if (_classListeners != null) { + Class c = source == null ? meta.getDescribedType() : source.getClass(); + do { + ev = (LifecycleEvent) fireEvent(ev, source, related, type, + (ListenerList) _classListeners.get(c), false, exceptions); + c = c.getSuperclass(); + } while (c != null && c != Object.class); + } + + // make system listeners + if (!meta.getLifecycleMetaData().getIgnoreSystemListeners()) { + ListenerList system = meta.getRepository().getSystemListeners(); + fireEvent(ev, source, related, type, system, false, exceptions); + } + + if (!callbacks) + makeCallbacks(source, related, meta, type, exceptions); + + // create return array before clearing exceptions + Exception[] ret; + if (exceptions.isEmpty()) + ret = EMPTY_EXCEPTIONS; + else + ret = (Exception[]) exceptions.toArray + (new Exception[exceptions.size()]); + + // if this wasn't a reentrant call, catch up with calls to add + // and remove listeners made while firing + if (!reentrant) { + _firing = false; + _fail = false; + if (!_addListeners.isEmpty()) + for (Iterator itr = _addListeners.iterator(); itr.hasNext();) + addListener(itr.next(), (Class[]) itr.next()); + if (!_remListeners.isEmpty()) + for (Iterator itr = _remListeners.iterator(); itr.hasNext();) + removeListener(itr.next()); + _addListeners.clear(); + _remListeners.clear(); + _exceps.clear(); + } + return ret; + } finally { + _rwLock.writeLock().unlock(); } - return ret; } /** @@ -632,8 +651,8 @@ public class LifecycleEventManager if (listener instanceof AttachListener) { types |= 2 << LifecycleEvent.BEFORE_ATTACH; types |= 2 << LifecycleEvent.AFTER_ATTACH; - } - return types; - } - } + } + return types; + } + } } From commits-return-9435-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 24 20:35:26 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A4A2A90EF for ; Fri, 24 Feb 2012 20:35:26 +0000 (UTC) Received: (qmail 68784 invoked by uid 500); 24 Feb 2012 20:35:26 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 68754 invoked by uid 500); 24 Feb 2012 20:35:26 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 68747 invoked by uid 99); 24 Feb 2012 20:35:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 20:35:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 20:35:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1D61923888D2 for ; Fri, 24 Feb 2012 20:35:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1293402 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java Date: Fri, 24 Feb 2012 20:35:03 -0000 To: commits@openjpa.apache.org From: jrbauer@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120224203503.1D61923888D2@eris.apache.org> Author: jrbauer Date: Fri Feb 24 20:35:02 2012 New Revision: 1293402 URL: http://svn.apache.org/viewvc?rev=1293402&view=rev Log: OPENJPA-2143 reduce lock contention on LifecycleEventManager Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java?rev=1293402&r1=1293401&r2=1293402&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/LifecycleEventManager.java Fri Feb 24 20:35:02 2012 @@ -27,6 +27,9 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + import org.apache.openjpa.meta.ClassMetaData; import org.apache.openjpa.meta.MetaDataDefaults; import org.apache.openjpa.lib.util.Localizer; @@ -64,6 +67,7 @@ public class LifecycleEventManager private boolean _firing = false; private boolean _fail = false; private boolean _failFast = false; + private ReadWriteLock _rwLock = new ReentrantReadWriteLock(); /** * Whether to fail after first exception when firing events to listeners. @@ -83,55 +87,65 @@ public class LifecycleEventManager * Register a lifecycle listener for the given classes. If the classes * array is null, register for all classes. */ - public synchronized void addListener(Object listener, Class[] classes) { + public void addListener(Object listener, Class[] classes) { if (listener == null) return; if (classes != null && classes.length == 0) return; - if (_firing) { - _addListeners.add(listener); - _addListeners.add(classes); - return; - } - - if (classes == null) { - if (_listeners == null) - _listeners = new ListenerList(5); - _listeners.add(listener); - return; - } - - if (_classListeners == null) - _classListeners = new HashMap, ListenerList>(); - ListenerList listeners; - for (int i = 0; i < classes.length; i++) { - listeners = (ListenerList) _classListeners.get(classes[i]); - if (listeners == null) { - listeners = new ListenerList(3); - _classListeners.put(classes[i], listeners); + _rwLock.writeLock().lock(); + try { + if (_firing) { + _addListeners.add(listener); + _addListeners.add(classes); + return; + } + + if (classes == null) { + if (_listeners == null) + _listeners = new ListenerList(5); + _listeners.add(listener); + return; + } + + if (_classListeners == null) + _classListeners = new HashMap, ListenerList>(); + ListenerList listeners; + for (int i = 0; i < classes.length; i++) { + listeners = (ListenerList) _classListeners.get(classes[i]); + if (listeners == null) { + listeners = new ListenerList(3); + _classListeners.put(classes[i], listeners); + } + listeners.add(listener); } - listeners.add(listener); + } finally { + _rwLock.writeLock().unlock(); } } /** * Remove the given listener. */ - public synchronized void removeListener(Object listener) { - if (_firing) { - _remListeners.add(listener); - return; - } - - if (_listeners != null && _listeners.remove(listener)) - return; - if (_classListeners != null) { - ListenerList listeners; - for (Iterator itr = _classListeners.values().iterator(); - itr.hasNext();) { - listeners = (ListenerList) itr.next(); - listeners.remove(listener); + public void removeListener(Object listener) { + _rwLock.writeLock().lock(); + try { + if (_firing) { + _remListeners.add(listener); + return; + } + + if (_listeners != null && _listeners.remove(listener)) + return; + if (_classListeners != null) { + ListenerList listeners; + for (Iterator itr = _classListeners.values().iterator(); + itr.hasNext();) { + listeners = (ListenerList) itr.next(); + listeners.remove(listener); + } } + } finally { + _rwLock.writeLock().unlock(); } } @@ -266,63 +280,68 @@ public class LifecycleEventManager /** * Fire lifecycle event to all registered listeners. */ - public synchronized Exception[] fireEvent(Object source, Object related, + public Exception[] fireEvent(Object source, Object related, ClassMetaData meta, int type) { - boolean reentrant = _firing; - _firing = true; - List exceptions = (reentrant) ? new LinkedList() : _exceps; - MetaDataDefaults def = meta.getRepository().getMetaDataFactory(). - getDefaults(); - - boolean callbacks = def.getCallbacksBeforeListeners(type); - if (callbacks) - makeCallbacks(source, related, meta, type, exceptions); - - LifecycleEvent ev = (LifecycleEvent) fireEvent(null, source, related, - type, _listeners, false, exceptions); - - if (_classListeners != null) { - Class c = source == null ? meta.getDescribedType() : source.getClass(); - do { - ev = (LifecycleEvent) fireEvent(ev, source, related, type, - (ListenerList) _classListeners.get(c), false, exceptions); - c = c.getSuperclass(); - } while (c != null && c != Object.class); - } - - // make system listeners - if (!meta.getLifecycleMetaData().getIgnoreSystemListeners()) { - ListenerList system = meta.getRepository().getSystemListeners(); - fireEvent(ev, source, related, type, system, false, exceptions); - } - - if (!callbacks) - makeCallbacks(source, related, meta, type, exceptions); - - // create return array before clearing exceptions - Exception[] ret; - if (exceptions.isEmpty()) - ret = EMPTY_EXCEPTIONS; - else - ret = (Exception[]) exceptions.toArray - (new Exception[exceptions.size()]); - - // if this wasn't a reentrant call, catch up with calls to add - // and remove listeners made while firing - if (!reentrant) { - _firing = false; - _fail = false; - if (!_addListeners.isEmpty()) - for (Iterator itr = _addListeners.iterator(); itr.hasNext();) - addListener(itr.next(), (Class[]) itr.next()); - if (!_remListeners.isEmpty()) - for (Iterator itr = _remListeners.iterator(); itr.hasNext();) - removeListener(itr.next()); - _addListeners.clear(); - _remListeners.clear(); - _exceps.clear(); + _rwLock.writeLock().lock(); + try { + boolean reentrant = _firing; + _firing = true; + List exceptions = (reentrant) ? new LinkedList() : _exceps; + MetaDataDefaults def = meta.getRepository().getMetaDataFactory(). + getDefaults(); + + boolean callbacks = def.getCallbacksBeforeListeners(type); + if (callbacks) + makeCallbacks(source, related, meta, type, exceptions); + + LifecycleEvent ev = (LifecycleEvent) fireEvent(null, source, related, + type, _listeners, false, exceptions); + + if (_classListeners != null) { + Class c = source == null ? meta.getDescribedType() : source.getClass(); + do { + ev = (LifecycleEvent) fireEvent(ev, source, related, type, + (ListenerList) _classListeners.get(c), false, exceptions); + c = c.getSuperclass(); + } while (c != null && c != Object.class); + } + + // make system listeners + if (!meta.getLifecycleMetaData().getIgnoreSystemListeners()) { + ListenerList system = meta.getRepository().getSystemListeners(); + fireEvent(ev, source, related, type, system, false, exceptions); + } + + if (!callbacks) + makeCallbacks(source, related, meta, type, exceptions); + + // create return array before clearing exceptions + Exception[] ret; + if (exceptions.isEmpty()) + ret = EMPTY_EXCEPTIONS; + else + ret = (Exception[]) exceptions.toArray + (new Exception[exceptions.size()]); + + // if this wasn't a reentrant call, catch up with calls to add + // and remove listeners made while firing + if (!reentrant) { + _firing = false; + _fail = false; + if (!_addListeners.isEmpty()) + for (Iterator itr = _addListeners.iterator(); itr.hasNext();) + addListener(itr.next(), (Class[]) itr.next()); + if (!_remListeners.isEmpty()) + for (Iterator itr = _remListeners.iterator(); itr.hasNext();) + removeListener(itr.next()); + _addListeners.clear(); + _remListeners.clear(); + _exceps.clear(); + } + return ret; + } finally { + _rwLock.writeLock().unlock(); } - return ret; } /** @@ -632,8 +651,8 @@ public class LifecycleEventManager if (listener instanceof AttachListener) { types |= 2 << LifecycleEvent.BEFORE_ATTACH; types |= 2 << LifecycleEvent.AFTER_ATTACH; - } - return types; - } - } + } + return types; + } + } } From commits-return-9436-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sun Feb 26 19:38:25 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FB9F9F30 for ; Sun, 26 Feb 2012 19:38:25 +0000 (UTC) Received: (qmail 57786 invoked by uid 500); 26 Feb 2012 19:38:25 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 57739 invoked by uid 500); 26 Feb 2012 19:38:24 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 57728 invoked by uid 99); 26 Feb 2012 19:38:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Feb 2012 19:38:24 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Sun, 26 Feb 2012 19:38:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1QJc0rM007730 for ; Sun, 26 Feb 2012 19:38:00 GMT Date: Sun, 26 Feb 2012 14:38:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <18372356.47001.1330285080173.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Intro MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
    From commits-return-9437-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 27 21:57:15 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCAE69C78 for ; Mon, 27 Feb 2012 21:57:15 +0000 (UTC) Received: (qmail 64247 invoked by uid 500); 27 Feb 2012 21:57:15 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 64199 invoked by uid 500); 27 Feb 2012 21:57:15 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 64186 invoked by uid 99); 27 Feb 2012 21:57:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2012 21:57:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2012 21:57:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4219A2388860 for ; Mon, 27 Feb 2012 21:56:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1294352 - in /openjpa: branches/2.2.x/openjpa-project/assembly.xml trunk/openjpa-project/assembly.xml Date: Mon, 27 Feb 2012 21:56:52 -0000 To: commits@openjpa.apache.org From: allee8285@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120227215652.4219A2388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: allee8285 Date: Mon Feb 27 21:56:51 2012 New Revision: 1294352 URL: http://svn.apache.org/viewvc?rev=1294352&view=rev Log: OPENJPA-2145 Assemble asm-3.2.jar into binary zip file for distribution. Modified: openjpa/branches/2.2.x/openjpa-project/assembly.xml openjpa/trunk/openjpa-project/assembly.xml Modified: openjpa/branches/2.2.x/openjpa-project/assembly.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-project/assembly.xml?rev=1294352&r1=1294351&r2=1294352&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-project/assembly.xml (original) +++ openjpa/branches/2.2.x/openjpa-project/assembly.xml Mon Feb 27 21:56:51 2012 @@ -145,6 +145,7 @@ org.apache.geronimo.specs:geronimo-validation_1.0_spec org.apache.bval:org.apache.bval.bundle commons-beanutils:commons-beanutils + asm:asm Modified: openjpa/trunk/openjpa-project/assembly.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/assembly.xml?rev=1294352&r1=1294351&r2=1294352&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/assembly.xml (original) +++ openjpa/trunk/openjpa-project/assembly.xml Mon Feb 27 21:56:51 2012 @@ -145,6 +145,7 @@ org.apache.geronimo.specs:geronimo-validation_1.0_spec org.apache.bval:org.apache.bval.bundle commons-beanutils:commons-beanutils + asm:asm From commits-return-9438-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 28 15:57:27 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 687DD951E for ; Tue, 28 Feb 2012 15:57:27 +0000 (UTC) Received: (qmail 76433 invoked by uid 500); 28 Feb 2012 15:57:27 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 76389 invoked by uid 500); 28 Feb 2012 15:57:26 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 76375 invoked by uid 99); 28 Feb 2012 15:57:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 15:57:26 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY 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; Tue, 28 Feb 2012 15:57:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id q1SFv03V008647 for ; Tue, 28 Feb 2012 15:57:00 GMT Date: Tue, 28 Feb 2012 10:57:00 -0500 (EST) From: confluence@apache.org To: commits@openjpa.apache.org Message-ID: <12168552.47447.1330444620025.JavaMail.confluence@thor> Subject: [CONF] OpenJPA > Downloads MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org
    From commits-return-9439-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 28 16:33:52 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E8619D6C for ; Tue, 28 Feb 2012 16:33:52 +0000 (UTC) Received: (qmail 3416 invoked by uid 500); 28 Feb 2012 16:33:52 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 3376 invoked by uid 500); 28 Feb 2012 16:33:52 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 3366 invoked by uid 99); 28 Feb 2012 16:33:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 16:33:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 16:33:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3BA1723888E7 for ; Tue, 28 Feb 2012 16:33:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1294721 - /openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Date: Tue, 28 Feb 2012 16:33:31 -0000 To: commits@openjpa.apache.org From: jgrassel@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120228163331.3BA1723888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jgrassel Date: Tue Feb 28 16:33:30 2012 New Revision: 1294721 URL: http://svn.apache.org/viewvc?rev=1294721&view=rev Log: OPENJPA-2146: StateManager for Embeddable may throw Exception while initializing Modified: openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Modified: openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=1294721&r1=1294720&r2=1294721&view=diff ============================================================================== --- openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java (original) +++ openjpa/branches/2.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Tue Feb 28 16:33:30 2012 @@ -169,7 +169,7 @@ public class StateManagerImpl if (broker.getMultithreaded()) _instanceLock = new ReentrantLock(); - if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN) + if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN && !_meta.isEmbeddable()) throw new UserException(_loc.get("meta-unknownid", _meta)); } From commits-return-9440-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 28 19:08:24 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB18C9ED5 for ; Tue, 28 Feb 2012 19:08:24 +0000 (UTC) Received: (qmail 39287 invoked by uid 500); 28 Feb 2012 19:08:24 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 39253 invoked by uid 500); 28 Feb 2012 19:08:24 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 39240 invoked by uid 99); 28 Feb 2012 19:08:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 19:08:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 19:08:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7EF1C2388A32 for ; Tue, 28 Feb 2012 19:08:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1294791 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Date: Tue, 28 Feb 2012 19:08:03 -0000 To: commits@openjpa.apache.org From: jgrassel@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120228190803.7EF1C2388A32@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jgrassel Date: Tue Feb 28 19:08:03 2012 New Revision: 1294791 URL: http://svn.apache.org/viewvc?rev=1294791&view=rev Log: OPENJPA-2146: StateManager for Embeddable may throw Exception while initializing Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=1294791&r1=1294790&r2=1294791&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Tue Feb 28 19:08:03 2012 @@ -175,7 +175,7 @@ public class StateManagerImpl if (broker.getMultithreaded()) _instanceLock = new ReentrantLock(); - if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN) + if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN && !_meta.isEmbeddable()) throw new UserException(_loc.get("meta-unknownid", _meta)); } From commits-return-9441-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Tue Feb 28 20:24:27 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF6B69576 for ; Tue, 28 Feb 2012 20:24:27 +0000 (UTC) Received: (qmail 32009 invoked by uid 500); 28 Feb 2012 20:24:27 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 31983 invoked by uid 500); 28 Feb 2012 20:24:27 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 31976 invoked by uid 99); 28 Feb 2012 20:24:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 20:24:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 20:24:25 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 80D4B23888E4 for ; Tue, 28 Feb 2012 20:24:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1294818 - /openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Date: Tue, 28 Feb 2012 20:24:04 -0000 To: commits@openjpa.apache.org From: jgrassel@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120228202404.80D4B23888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jgrassel Date: Tue Feb 28 20:24:04 2012 New Revision: 1294818 URL: http://svn.apache.org/viewvc?rev=1294818&view=rev Log: OPENJPA-2146: StateManager for Embeddable may throw Exception while initializing Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=1294818&r1=1294817&r2=1294818&view=diff ============================================================================== --- openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java (original) +++ openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Tue Feb 28 20:24:04 2012 @@ -175,7 +175,7 @@ public class StateManagerImpl if (broker.getMultithreaded()) _instanceLock = new ReentrantLock(); - if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN) + if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN && !_meta.isEmbeddable()) throw new UserException(_loc.get("meta-unknownid", _meta)); } From commits-return-9442-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Wed Feb 29 21:23:10 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B07F29090 for ; Wed, 29 Feb 2012 21:23:10 +0000 (UTC) Received: (qmail 15225 invoked by uid 500); 29 Feb 2012 21:23:10 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 15171 invoked by uid 500); 29 Feb 2012 21:23:10 -0000 Mailing-List: contact commits-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 commits@openjpa.apache.org Received: (qmail 15161 invoked by uid 99); 29 Feb 2012 21:23:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Feb 2012 21:23:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Feb 2012 21:23:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 26C3323888D2 for ; Wed, 29 Feb 2012 21:22:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1295280 - /openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java Date: Wed, 29 Feb 2012 21:22:49 -0000 To: commits@openjpa.apache.org From: hthomann@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120229212249.26C3323888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hthomann Date: Wed Feb 29 21:22:48 2012 New Revision: 1295280 URL: http://svn.apache.org/viewvc?rev=1295280&view=rev Log: OPENJPA-2117: Back-port Albert's trunk changes to 1.2.x. Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java?rev=1295280&r1=1295279&r2=1295280&view=diff ============================================================================== --- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java (original) +++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java Wed Feb 29 21:22:48 2012 @@ -569,6 +569,13 @@ public class XMLPersistenceMappingParser break; } // else no break + case JavaTypes.COLLECTION: + if(!fm.getValue().isSerialized()) { + fm.getElementMapping().getValueInfo().setColumns(_cols); + } else { + fm.getValueInfo().setColumns(_cols); + } + break; case JavaTypes.MAP: fm.getElementMapping().getValueInfo().setColumns(_cols); break;