From fd197214a922428f79f9b512e9fc4c144d0724f8 Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 30 Mar 2011 17:58:32 +0000 Subject: [PATCH] OPENJPA-1969 - Decode HYT00 to LockTimeoutException git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1087028 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java | 2 +- .../org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java index 5a4e95f32..6b88d77a6 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLServerDictionary.java @@ -291,7 +291,7 @@ public class SQLServerDictionary extends AbstractSQLServerDictionary { public boolean isFatalException(int subtype, SQLException ex) { String errorState = ex.getSQLState(); if ((subtype == StoreException.LOCK || subtype == StoreException.QUERY) - &&("1222".equals(errorState) || "HY008".equals(errorState))) + &&("1222".equals(errorState) || "HY008".equals(errorState) || "HYT00".equals(errorState))) return false; return super.isFatalException(subtype, ex); } diff --git a/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml b/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml index 1a27b0904..e7ec7578e 100644 --- a/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml +++ b/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml @@ -47,12 +47,12 @@ - 1204,1205,1222,HY008,40001 + 1204,1205,1222,HY008,HYT00,40001 544,2601,2627,8114,8115 23000 1205 - HY008 + HY008,HYT00