Received: from mail1.hub.org (webmail.hub.org [216.126.85.1]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2KCi1N02845; Tue, 20 Mar 2001 07:44:02 -0500 (EST) (envelope-from gunnar@candleweb.no) Received: from thor.candleweb.no (thor.candleweb.no [195.139.160.194]) by mail1.hub.org (8.11.3/8.11.1) with ESMTP id f2KCCks01059; Tue, 20 Mar 2001 07:12:48 -0500 (EST) (envelope-from gunnar@candleweb.no) Received: (from gunnar@localhost) by thor.candleweb.no (8.10.0/8.10.0/on4) id ; Tue, 20 Mar 2001 12:59:22 +0100 (MET) To: Bruce Momjian Cc: "Gunnar R|nning" , Peter Mount , "Thies C. Arntzen" , pgsql-jdbc@postgresql.org, PostgreSQL-interfaces Subject: Re: [JDBC] Re: PostgreSQL and PHP persistent connections References: <200103192354.SAA11684@candle.pha.pa.us> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Gunnar R|nning Date: 20 Mar 2001 12:59:21 +0100 In-Reply-To: Bruce Momjian's message of "Mon, 19 Mar 2001 18:54:05 -0500 (EST)" Message-ID: Lines: 19 X-Mailer: Gnus v5.4.65/Emacs 19.34 X-Archive-Number: 200103/154 X-Sequence-Number: 1315 Bruce Momjian writes: > > Well, I think most connection pools people use are database independent - > > when it comes to JDBC this is the case at least. > > So what platform-indendent method do they use to see that the passed > connection doesn't have an open transaction or some other setting? > None - it is application responsibility to not mess around with the connections. I usually use the Command pattern from the GoF book to do my database access. This ensures me that I have one pluggable executor that can do all the database specific stuff, like proper pre command exec actions, post command exec actions, exeception handling(Error codes would be very welcome in pgsql). Cheers, Gunnar