From b84ebeaf0379258387d247a6fe1eede48b4fbe5a Mon Sep 17 00:00:00 2001 From: wenshao Date: Wed, 29 Jun 2011 10:42:50 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://code.alibabatech.com/svn/druid/trunk@320 b9813039-fb51-4c41-a8b9-e21c2acb5095 --- .../pool/vendor/InformixExceptionSorter.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/main/java/com/alibaba/druid/pool/vendor/InformixExceptionSorter.java diff --git a/src/main/java/com/alibaba/druid/pool/vendor/InformixExceptionSorter.java b/src/main/java/com/alibaba/druid/pool/vendor/InformixExceptionSorter.java new file mode 100644 index 0000000000..2e7bab11be --- /dev/null +++ b/src/main/java/com/alibaba/druid/pool/vendor/InformixExceptionSorter.java @@ -0,0 +1,38 @@ +package com.alibaba.druid.pool.vendor; + +import java.io.Serializable; +import java.sql.SQLException; + +import com.alibaba.druid.pool.ExceptionSorter; + +public class InformixExceptionSorter implements ExceptionSorter, Serializable { + + private static final long serialVersionUID = -5175884111768095263L; + + public boolean isExceptionFatal(SQLException e) { + switch (e.getErrorCode()) { + case -710: // Table has been dropped, altered or renamed JBAS-3120 + case -79716: // System or internal error + case -79730: // Connection noit established + case -79734: // INFORMIXSERVER has to be specified + case -79735: // Can't instantiate protocol + case -79736: // No connection/statement established yet + case -79756: // Invalid connection URL + case -79757: // Invalid subprotocol + case -79758: // Invalid IP address + case -79759: // Invalid port nnumber + case -79760: // Invalid database name + case -79788: // User name must be specified + case -79811: // Connection without user/password not supported + case -79812: // User/password does not match with datasource + case -79836: // Proxy error: no database connection + case -79837: // Proxy error: IO error + case -79879: // Unexpected exception + + return true; + } + + return false; + } + +}