X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 531D511F65A4 for ; Wed, 12 Apr 2006 12:41:20 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.55 X-Spam-Level: X-Spam-Status: No, score=0.55 required=5 tests=[NO_REAL_NAME=0.55] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id YDH+0+wIGQea for ; Wed, 12 Apr 2006 12:41:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 7F6A111F676F for ; Wed, 12 Apr 2006 12:41:16 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 329A530F84; Wed, 12 Apr 2006 17:41:15 +0200 (MET DST) From: kevin@mtel.co.uk X-Newsgroups: pgsql.interfaces.jdbc Subject: postgres jdbc transaction problem surfaces at times Date: 12 Apr 2006 08:41:09 -0700 Organization: http://groups.google.com Lines: 38 Message-ID: <1144856469.014948.89160@j33g2000cwa.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Complaints-To: groups-abuse@google.com User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: j33g2000cwa.googlegroups.com; posting-host=82.71.72.94; posting-account=toK9uQwAAABGt5NkXAAO_aXwNuM-0f1c To: pgsql-jdbc@postgresql.org X-Archive-Number: 200604/92 X-Sequence-Number: 15026 i read in the posts here that postgres 8.0 jdbc had unmasked it;s dislike of changing transaction level mid transaction so i changed my code to the following is this set up correct? try { livedb.setAutoCommit(false); copydb.setAutoCommit(false); livedb.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE); copydb.setTransactionIsolation (Connection.TRANSACTION_SERIALIZABLE); // series of writes to both db's livedb.commit(); livedb.setAutoCommit(true); copydb.commit(); copydb.setAutoCommit(true); } catch (SQLException sqle){ // run a rollback-Release and log it routine; // crash and burn; } this seems to work fine single user, but with several users on i get occasional dumps with transaction change in transaction. the only code to change relates to the LUW start since the last rollout of this servlet and there was never this problem before. the connections are stored as a session attribute, so persist across requests.