X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 270ADDBA08 for ; Sat, 19 Nov 2005 20:52:52 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38052-07 for ; Sun, 20 Nov 2005 00:52:54 +0000 (GMT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.200]) by svr1.postgresql.org (Postfix) with ESMTP id 9BD81DB9FC for ; Sat, 19 Nov 2005 20:52:49 -0400 (AST) Received: by wproxy.gmail.com with SMTP id 69so676710wri for ; Sat, 19 Nov 2005 16:52:53 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=RiRwO3QYrK+SHALHctVUra85C+ico7/mblyWqEaBRuDjAp+ZeMMZfg8icGYEI870+0INw6WLADzW2VmJ97ah6yVV+0D15+NkxyEl38Trar98eEp0MrEm7UbpY8H50SnkBi8GXGV9ibKwvFTuiSdarfJ2iVnQICa3E5OcmE0v3j0= Received: by 10.54.159.11 with SMTP id h11mr379772wre; Sat, 19 Nov 2005 16:52:53 -0800 (PST) Received: by 10.54.94.20 with HTTP; Sat, 19 Nov 2005 16:52:53 -0800 (PST) Message-ID: <3fccaa690511191652s384fd84v41708ff2481660cb@mail.gmail.com> Date: Sat, 19 Nov 2005 18:52:53 -0600 From: Andres Olarte To: pgsql-jdbc@postgresql.org Subject: Re: Deadlock problem In-Reply-To: <20051118212248.GG29354@phlogiston.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19348_15659102.1132447973473" References: <200511181209.000000EC@dev-null> <20051118180347.GA29354@phlogiston.dyndns.org> <20051118212248.GG29354@phlogiston.dyndns.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.643 required=5 tests=[HTML_00_10=0.642, HTML_MESSAGE=0.001] X-Spam-Score: 0.643 X-Spam-Level: X-Archive-Number: 200511/122 X-Sequence-Number: 14220 ------=_Part_19348_15659102.1132447973473 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline There's also the option of using a queue that's accessed by various threads and a single thread with a single connection that actually talks with the DB. I've been sucessfull with this aproach, at least in a very particular and well defined scenario. As for reiventing the wheel, it's probably very pointless and prone to erros like Andrew mentions. The DB has transactions, they work well, use them to your advantage. Andres ------=_Part_19348_15659102.1132447973473 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline There's also the option of using a queue that's accessed by various threads and a single thread with a single connection that actually talks with the DB. I've been sucessfull with this aproach, at least in a very particular and well defined scenario. As for reiventing the wheel, it's probably very pointless and prone to erros like Andrew mentions.  The DB has transactions, they work well, use them to your advantage.

Andres

------=_Part_19348_15659102.1132447973473--