Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9F5939FB588 for ; Mon, 12 Feb 2007 12:31:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 58215-10 for ; Mon, 12 Feb 2007 12:31:26 -0400 (AST) X-Greylist: delayed 00:16:14.012831 by SQLgrey-1.7.4 Received: from p101m058.symantecmail.net (p101m058.symantecmail.net [198.65.127.58]) by postgresql.org (Postfix) with ESMTP id EE6409FB578 for ; Mon, 12 Feb 2007 12:31:23 -0400 (AST) Received: from unknown [217.109.194.249] (EHLO p101m058.symantecmail.net) by p101m058.symantecmail.net (mxl_mta-2.14.0-15) with ESMTP id e5690d54.1514122160.377810.p101m058.symantecmail.net (envelope-from ); Mon, 12 Feb 2007 09:31:26 -0700 (MST) Received: from unknown [217.109.194.249] (EHLO relais4.velizy.fr.sterianet) by p101m058.symantecmail.net (mxl_mta-2.14.0-15) with ESMTP id f8290d54.2122533808.353633.p101m058.symantecmail.net (envelope-from ); Mon, 12 Feb 2007 09:15:11 -0700 (MST) Received: from mailvel.velizy.fr.sterianet (mailvel.velizy.fr.sterianet [10.2.25.115]) by relais4.velizy.fr.sterianet (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <17VH08RGCXSKH102IC@relais4.velizy.fr.sterianet> for pgsql-jdbc@postgresql.org; Mon, 12 Feb 2007 17:14:54 +0100 (Paris, Madrid) Received: from [127.0.0.1] ([10.2.40.163]) by mailvel.velizy.fr.sterianet (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <168J08RFHJJKH100ZS@mailvel.velizy.fr.sterianet> for pgsql-jdbc@postgresql.org; Mon, 12 Feb 2007 17:14:17 +0100 (Paris, Madrid) Date: Mon, 12 Feb 2007 17:15:01 +0100 From: Nicolas Vervelle Subject: Problem with loginTimeout To: pgsql-jdbc@postgresql.org Message-id: <45D09285.4080503@steria.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) X-Spam: [F=0.0100000000; S=0.010(2007010901)] X-MAIL-FROM: X-SOURCE-IP: [217.109.194.249] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200702/48 X-Sequence-Number: 16604 Hi, I am new to this list, so hello everyone. I am having troubles with getConnection() and the loginTimeout property. I am working with a 7.4.2 server and I was also using the 7.4 jdbc driver (build 215). Everything is under Red Hat RHEL 3, JDK 1.4.2. My application is running under JBoss 3.2.6. With this version, there was no support for timeout when using getConnection(), so sometimes it takes 3 minutes for getConnection() to send an exception. I have to connect to 35 databases one after an other so the delay is really too important (3 * 35 minutes = 1h45). Looking at the mailing list archives, I saw posts concerning this problem and the solution of calling getConnection() in a separate Thread and dealing with the timeout (6 seconds) in the mail thread. I implemented this fix, but stumbled into an other problem: when a first getConnection() is still running, following getConnection() won't return a connection until the first one is finished. This implies that once a getConnection() timedout (the 6 seconds timeout), every other attempt to use getConnection() will also time out (6 seconds) until the first getConnection() will definitely fail (3 minutes). I don't see how I can find a solution for this problem, anyone can help me ? I tried updating to the latest JDBC driver (8.2 build 504), and the problem seems to be fixed. But then I am getting errors with my EJB Entities when trying to create new instances : Could not create entity org.postgresql.util.PSQLException: ERROR: column "tab_alarme_emis_pcc" is of type boolean but expression is of type character The corresponding field is defined as : - in the EJB entity: with @ejb.persistence column-name="TAB_ALARME_EMIS_PCC" public abstract Boolean getEmisPcc(); - in the database: with tab_alarme_emis_pcc boolean What is the problem ? Please help. Is there a global setting to have the pgdriver behaving as it was in 7.4 ? I spent almost the entire day on this problem and still haven't found a solution :( Thanks, Nicolas