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:54:20 UTC
svn commit: r1097826 - in /openjpa/trunk:
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:54:20 2011
New Revision: 1097826
URL: http://svn.apache.org/viewvc?rev=1097826&view=rev
Log:
OPENJPA-1990: Skip calling back to DB2 when an exception is encountered.
Modified:
openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml
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=1097826&r1=1097825&r2=1097826&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 Fri Apr 29 14:54:20 2011
@@ -94,6 +94,7 @@ public class DB2Dictionary
protected int min = 0;
private int defaultBatchLimit = 100;
+ public boolean appendExtendedExceptionText = true;
public DB2Dictionary() {
platform = "DB2";
@@ -555,10 +556,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/trunk/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml?rev=1097826&r1=1097825&r2=1097826&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml (original)
+++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml Fri Apr 29 14:54:20 2011
@@ -3904,6 +3904,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