From derby-dev-return-8943-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Wed Oct 05 20:41:56 2005 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 87626 invoked from network); 5 Oct 2005 20:41:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Oct 2005 20:41:54 -0000 Received: (qmail 11912 invoked by uid 500); 5 Oct 2005 20:41:52 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 11892 invoked by uid 500); 5 Oct 2005 20:41:52 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 11881 invoked by uid 99); 5 Oct 2005 20:41:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2005 13:41:52 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=SPF_HELO_FAIL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.182.146] (HELO e6.ny.us.ibm.com) (32.97.182.146) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2005 13:41:55 -0700 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j95KfOhL027132 for ; Wed, 5 Oct 2005 16:41:24 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay04.pok.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j95Kf908084800 for ; Wed, 5 Oct 2005 16:41:24 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11/8.13.3) with ESMTP id j95Kf8wZ006624 for ; Wed, 5 Oct 2005 16:41:08 -0400 Received: from [127.0.0.1] (DMCSDJDT41P.usca.ibm.com [9.72.133.55]) by d01av01.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j95Kf7Vt006444 for ; Wed, 5 Oct 2005 16:41:08 -0400 Message-ID: <43443A61.7030504@debrunners.com> Date: Wed, 05 Oct 2005 13:41:05 -0700 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: [jira] Commented: (DERBY-254) SQLStates for SQLExceptions thrown from the client should not be null and should match embedded where possible References: <1885503136.1128531231309.JavaMail.jira@ajax.apache.org> <43440CF9.1020202@sbcglobal.net> In-Reply-To: <43440CF9.1020202@sbcglobal.net> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Kathey Marsden wrote: >>Daniel John Debrunner commented on DERBY-254: >>--------------------------------------------- >> >>I'm not sure Derby should be recommending checking the error code for an exception, I don't think today it's specified as any part of the documentation that the error code is a severity. Use of the error code is vendor specific and will result in non-portable programs. JDBC 4.0 is addressing this with the sub-classing of SQLException. >> >> >> > > So with the product as is, (before JDBC 4.0) what is the recommended way > to check if an exception makes a connection invalid. Currently I know > there are users that are using the error codes (Exception Severity)? Execute a simple statement against the connection, e.g. VALUES 1. Is the severity error code even portable between embedded and the client driver? > The errorcode is documented as severity for embedded. > > http://db.apache.org/derby/docs/10.0/manuals/develop/develop86.html#IDX717 Hmmm, I thought all that had been removed since it does encourage non-portable JDBC programming. For example the class org.apache.derby.types.ExceptionSeverity referenced in that page no longer exists and is not part of the published javadoc for Derby. Dan.