Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 99833 invoked from network); 2 Sep 2009 15:25:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Sep 2009 15:25:31 -0000 Received: (qmail 38015 invoked by uid 500); 2 Sep 2009 15:25:26 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 37954 invoked by uid 500); 2 Sep 2009 15:25:26 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 37943 invoked by uid 99); 2 Sep 2009 15:25:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 15:25:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of billdsd@gmail.com designates 209.85.220.220 as permitted sender) Received: from [209.85.220.220] (HELO mail-fx0-f220.google.com) (209.85.220.220) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 15:25:17 +0000 Received: by fxm20 with SMTP id 20so905333fxm.0 for ; Wed, 02 Sep 2009 08:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=AF3HOacHjaAywepWZeJ6fPjI51nNOqIrU5FKb8KIDFg=; b=HM9d3I4RsoS+dJs0KlgTPDAVu7hUMVzIR8Gj1P5gVm7s7SMeGcshQZVZ/UgAi8OJdn lQUXingZBU9LZfo4neW7IBzPIJLxvZw8Ehw9rorC/KLXIW7m1/o1KJwZNQcqqBGsR1bH HHHKYr+RsvtezC/XdwamVn4EHYpnjZ0ytXMgA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=Dm+C4RrEWM3xHHsmzWnYYIaBpiJnLheopn3wmlyMDEcm3uctosV7aHqfS83Icrmla1 mgGX6OnRgDdPo3mN3GiAucjVB9W45bNzFCe3sTRsd8g9PaTd1ICp7Ba6GA53Cf3AGOAm IDptYnA6PTcAEt8MpoVwjoCfmHITTESZat9OU= Received: by 10.103.84.12 with SMTP id m12mr3619221mul.79.1251905095556; Wed, 02 Sep 2009 08:24:55 -0700 (PDT) Received: from ?192.168.1.101? (cpe-66-91-231-160.san.res.rr.com [66.91.231.160]) by mx.google.com with ESMTPS id i5sm137930mue.16.2009.09.02.08.24.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 02 Sep 2009 08:24:54 -0700 (PDT) Message-ID: <4A9E8E49.1020205@gmail.com> Date: Wed, 02 Sep 2009 08:24:57 -0700 From: Bill Davidson User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Using multiple DataSource's for fail-over. References: <4A9DB9A3.5030408@gmail.com> <4A9E6F33.5040905@etf.bg.ac.rs> In-Reply-To: <4A9E6F33.5040905@etf.bg.ac.rs> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Ognjen Blagojevic wrote: > IANA-failover-expert, but one question comes to my mind. What happens > when the first server is recovered? Some cached connections will still > point to second server, while newly created connections will go to the > first one? Actually, it doesn't switch which is the primary. It keeps trying the primary every time and failing over to the secondary every time the primary fails. When the primary comes back, it will get the primary. Basic logic is this: try{ conn = primary.getConnection(); }catch ( SQLException e ){ conn = secondary.getConnection(); } return conn; I'm a little concerned that the first failure might take time due to having to wait on a timeout or something like that. That could kill performance, so that's one of the reasons I'm asking about it here. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org