Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 58590 invoked from network); 2 Sep 2009 13:13:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Sep 2009 13:13:09 -0000 Received: (qmail 99898 invoked by uid 500); 2 Sep 2009 13:13:05 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 99833 invoked by uid 500); 2 Sep 2009 13:13:05 -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 99822 invoked by uid 99); 2 Sep 2009 13:13:05 -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 13:13:05 +0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [147.91.1.122] (HELO mx.rcub.bg.ac.rs) (147.91.1.122) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 13:12:56 +0000 Received: from [127.0.0.1] (ognjen-pc.rcub.bg.ac.rs [147.91.4.66]) by mx.rcub.bg.ac.rs (Postfix) with ESMTP id E5ADE191947F for ; Wed, 2 Sep 2009 15:12:19 +0200 (CEST) Message-ID: <4A9E6F33.5040905@etf.bg.ac.rs> Date: Wed, 02 Sep 2009 15:12:19 +0200 From: Ognjen Blagojevic 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> In-Reply-To: <4A9DB9A3.5030408@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 090901-0, 09/01/2009), Outbound message X-Antivirus-Status: Clean X-RCUB-MailScanner-Information: Please contact the ISP for more information X-RCUB-MailScanner: Found to be clean X-RCUB-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.599, required 7, autolearn=not spam, BAYES_00 -2.60) X-Virus-Checked: Checked by ClamAV on apache.org This is interesting topic. 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? Is that acceptable? Regards, Ognjen Bill Davidson wrote: > Tomcat 6.0.20 using DBCP DataSource > Java 1.6.0_16 > Oracle 10g with RAC. > > I've got two Oracle RAC nodes, mirroring each other. My current fail-over > method if the primary node fails is to shut down the web servers, > reconfigure > them to use the secondary node and restart the web servers. Not pleasant. > > I'm thinking I can make a "FailOverDataSource" that implements DataSource > and wraps around DataSource's for each of the two nodes. Its > getConnection() > method would try to use the getConnection() from the primary node, and > if that > fails, it would try the secondary node. Repeat logic for other DataSource > methods. Instant automagic fail-over. I've actually written it, and it > seems > to get a hold of both DataSource's fine. I can't kill the primary on an > active > busy system to do a "real" test though. > > I'm thinking I can't be the first person to think of this. Are there > any obvious > problems with this idea? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org