Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id EE0A7B5DBF7 for ; Fri, 23 Sep 2011 03:32:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 25824-06 for ; Fri, 23 Sep 2011 06:32:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mx1-app.tibco.com (mx1-app.tibco.com [63.100.100.142]) by mail.postgresql.org (Postfix) with ESMTP id 11FEFB5DC09 for ; Fri, 23 Sep 2011 03:32:14 -0300 (ADT) X-IronPort-AV: E=Sophos;i="4.68,427,1312182000"; d="scan'208";a="29861487" Received: from tibco-5.tibco.com (HELO PA-CASHUB01.na.tibco.com) ([63.100.100.5]) by mx1-app.tibco.com with ESMTP; 22 Sep 2011 23:32:14 -0700 Received: from PA-MBX04.na.tibco.com ([fe80::6418:8781:cd80:4038]) by PA-CASHUB01.na.tibco.com ([::1]) with mapi id 14.01.0270.001; Thu, 22 Sep 2011 23:32:13 -0700 From: Amar Dhole To: "pgsql-sql@postgresql.org" Subject: use of savepoint in containter managed transaction Thread-Topic: use of savepoint in containter managed transaction Thread-Index: AQHMebqHWre/5sbSEU6xfw/goZv3eQ== Date: Fri, 23 Sep 2011 06:32:13 +0000 Message-ID: References: <201109221949.20671.johnf@jfcomputer.com> <5EABD4DE-5CB8-4C65-A1FF-3166A683EE3F@yahoo.com> <201109222140.16949.johnf@jfcomputer.com> In-Reply-To: <201109222140.16949.johnf@jfcomputer.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.97.98.42] x-tm-as-product-ver: SMEX-10.0.0.1459-6.800.1017-18400.005 x-tm-as-result: No--37.193300-8.000000-31 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/68 X-Sequence-Number: 35868 HI All, I have requirement to use save point. But I am using session bean whose tra= nsaction is managed by container. While executing sql insert I got unique k= ey constraint because of this my other command following this exception got= ignored. I want to continue my transaction even after this as we ignore th= is insert and make an entry in other table for this error. And proceed head= . with Postgres this is not possible. I cant user plsql block as behaviour = is spread in all my application. Need some suggestion to achieve this with= savepoint.=20 I have some question. 1) Can I use savepoint in Container Managed transaction ? 2) Can I make some custom change to jdbc driver to ignore duplicate key exc= eption or to raise warning instead ERROR. Thanks Amar