Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A9C2A6325E7 for ; Sat, 1 May 2010 12:31:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 22580-09 for ; Sat, 1 May 2010 15:31:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 92D58632292 for ; Sat, 1 May 2010 12:31:45 -0300 (ADT) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id 499FF28420; Sat, 1 May 2010 11:31:44 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=n/FPiGg/TIcQovhAuB3lI7Ue0YU=; b=AekF4M ddhyGnzsocXfyi19kgSRd7wSu/Xk8ESZR9ndEwuYarhB1MJIlLKWbn2Iu3YYInod HvnvR1loArs4UrUdgDNs5rqJUGZDy9VJzM8NEUetz2KE/hjL4Q48dGxUnaIZaov6 WWZjHcHWgdkXupXifQ94I7v+PJ4YFpKOORIos= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 41D1228404; Sat, 1 May 2010 11:31:44 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 3EC87A369; Sat, 1 May 2010 11:31:44 -0400 (EDT) Date: Sat, 1 May 2010 11:31:44 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: =?ISO-8859-15?Q?Maxime_L=E9vesque?= cc: pgsql-jdbc@postgresql.org Subject: Re: why do some failure spoils the jdbc connection ? In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Archive-Number: 201005/5 X-Sequence-Number: 20489 On Sat, 1 May 2010, Maxime L?vesque wrote: > =A0When I execute some statements, for example droping a constraint and= =20 > the constraint doesn't exist, an exception gets thrown as expected. If I= =20 > issue another statelemt via the same connection, I get another exception= =20 > saying the transaction is canceled, in other words, the connection is no= =20 > longer useable. >=20 > =A0Is the re a way that I can concinue using the connection ? > Yes, by creating a Savepoint around statements that may fail and rolling=20 back to that Savepoint if an exception occurs. http://java.sun.com/javase/6/docs/api/java/sql/Connection.html#rollback%28j= ava.sql.Savepoint%29 Kris Jurka