Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E4E1BB5DBC1 for ; Thu, 16 Jun 2011 22:55:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 06897-03 for ; Fri, 17 Jun 2011 01:55:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com [209.85.216.46]) by mail.postgresql.org (Postfix) with ESMTP id 54E08B5D801 for ; Thu, 16 Jun 2011 22:55:17 -0300 (ADT) Received: by qwk3 with SMTP id 3so943433qwk.19 for ; Thu, 16 Jun 2011 18:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=tQpYdKsUI+wMWR+ppiJSwvT6Tdgs7MJJhAByVq7QrZE=; b=JJcU6ln8PvFxIv/lRP7PHK5wmqFEtAnZQ0lTsdoZnYQzNd6QQzItGYQgc6C65X9hCA 0GsfYHkFNxH8YVwg7ghVge2ZRpOe5nQSyKQKM7KsYyGNXB3JLiSaUHJDUIQTUc/XJfkO /mMjXN4s3cFFSI3yY13TToKMbu/g8K2hj3meo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=i/RqE/WroNYX7slOJdpaW4FeqaNK4Mwl8bBYNYrfJHO9Q20L0v/4cimNfLQr/2sO9w BlmwrUfNeCY0igxQW5kBEeTv/rze2WGtLnq3gzsW1amTCcViep0nst/d3MxiLQjmGkit Uv6GVuD4VujN+qUIJiXn3d1A4/cFIF9CwpsSA= Received: by 10.229.13.152 with SMTP id c24mr1359430qca.87.1308275717481; Thu, 16 Jun 2011 18:55:17 -0700 (PDT) Received: from [192.168.1.12] (pool-71-245-182-40.pitbpa.fios.verizon.net [71.245.182.40]) by mx.google.com with ESMTPS id e28sm1556164qck.42.2011.06.16.18.55.15 (version=SSLv3 cipher=OTHER); Thu, 16 Jun 2011 18:55:15 -0700 (PDT) Message-ID: <4DFAB403.5010309@acm.org> Date: Thu, 16 Jun 2011 21:55:15 -0400 From: Bruce Adams User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Failover Datasource? References: <4DFA5A86.9030301@acm.org> <4DFA671F.2050005@acm.org> <4DFA9704.4000209@hogranch.com> In-Reply-To: <4DFA9704.4000209@hogranch.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.888 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201106/43 X-Sequence-Number: 21967 In principal, I agree; in practice, that's not the way it's been done in the Java application server world. I have two readily available Java database connection pool implementations available: the one bundled with Apache Tomcat and Hibernate's c3p0. Neither of these directly support failover. They each expect the lower level JDBC driver to deal with failover. (This is true of BEA WebLogic and IBM WebSphere as well, at least as of a few years ago when I last used them intensely.) What I'm looking for is very standard stuff in the Java application server world. The JDBC driver handles failover and/or load balancing to multiple backend database servers. - Bruce On 06/16/2011 07:51 PM, John R Pierce wrote: > On 06/16/11 1:27 PM, Bruce Adams wrote: >> Their primary goal appears to be connection pooling. My Java >> application server (Apache Tomcat) is already pooling database >> connections > > I think JDBC is the wrong layer for this, instead it should be > implemented in your java connection pool (tomcat, etc), where you > configure it with the multiple connections and the connection pooling > rules (master/failover, vs round robin vs whatever).