You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by cu...@apache.org on 2011/04/29 16:57:55 UTC
svn commit: r1097829 - in /openjpa/sandboxes/perf-2.1.x:
openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
openjpa-project/src/doc/manual/ref_guide_dbsetup.xml
Author: curtisr7
Date: Fri Apr 29 14:57:55 2011
New Revision: 1097829
URL: http://svn.apache.org/viewvc?rev=1097829&view=rev
Log:
OPENJPA-1990: Porting to sandbox.
Modified:
openjpa/sandboxes/perf-2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
openjpa/sandboxes/perf-2.1.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml
Modified: openjpa/sandboxes/perf-2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
URL: http://svn.apache.org/viewvc/openjpa/sandboxes/perf-2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?rev=1097829&r1=1097828&r2=1097829&view=diff
==============================================================================
--- openjpa/sandboxes/perf-2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java (original)
+++ openjpa/sandboxes/perf-2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Fri Apr 29 14:57:55 2011
@@ -92,6 +92,7 @@ public class DB2Dictionary
protected int min = 0;
private int defaultBatchLimit = 100;
+ public boolean appendExtendedExceptionText = true;
public DB2Dictionary() {
platform = "DB2";
@@ -585,10 +586,10 @@ public class DB2Dictionary
return "";
}
- public OpenJPAException newStoreException(String msg, SQLException[] causes,
- Object failed) {
- if (causes != null && causes.length > 0)
+ public OpenJPAException newStoreException(String msg, SQLException[] causes, Object failed) {
+ if (appendExtendedExceptionText == true && causes != null && causes.length > 0) {
msg = appendExtendedExceptionMsg(msg, causes[0]);
+ }
return super.newStoreException(msg, causes, failed);
}
Modified: openjpa/sandboxes/perf-2.1.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml
URL: http://svn.apache.org/viewvc/openjpa/sandboxes/perf-2.1.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml?rev=1097829&r1=1097828&r2=1097829&view=diff
==============================================================================
--- openjpa/sandboxes/perf-2.1.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml (original)
+++ openjpa/sandboxes/perf-2.1.x/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml Fri Apr 29 14:57:55 2011
@@ -3900,6 +3900,39 @@ the operation will fail.
</itemizedlist>
</section>
+ <section id="ref_guide_dbsetup_dbsupport_db2">
+ <title>
+ DB2 Properties
+ </title>
+ <indexterm zone="ref_guide_dbsetup_dbsupport_db2">
+ <primary>
+ DB2
+ </primary>
+ <seealso>
+ DBDictionary
+ </seealso>
+ </indexterm>
+ <para>
+The <literal>db2</literal> dictionary understands the following additional
+properties:
+ </para>
+ <itemizedlist>
+ <listitem id="DB2Dictionary.AppendExtendedExceptionText">
+ <para>
+ <indexterm>
+ <primary>
+ DB2
+ </primary>
+ <secondary>
+ AppendExtendedExceptionText
+ </secondary>
+ </indexterm>
+<literal>AppendExtendedExceptionText</literal>: If false, OpenJPA will not call back to the database to
+get extended exception text.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
<section id="ref_guide_dbsetup_dbsupport_delim_id">
<title>
Delimited Identifiers Support