Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 58771 invoked from network); 30 May 2008 03:59:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 May 2008 03:59:19 -0000 Received: (qmail 89955 invoked by uid 500); 30 May 2008 03:59:20 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 89939 invoked by uid 500); 30 May 2008 03:59:20 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 89928 invoked by uid 99); 30 May 2008 03:59:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 May 2008 20:59:20 -0700 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: local policy) Received: from [63.249.95.37] (HELO mail.cruzio.com) (63.249.95.37) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2008 03:58:29 +0000 Received: from [192.168.0.103] (dsl-63-249-97-217.cruzio.com [63.249.97.217]) by mail.cruzio.com with ESMTP id m4U3wkq4035206 for ; Thu, 29 May 2008 20:58:46 -0700 (PDT) Message-ID: <483F7C25.1070908@cruzio.com> Date: Thu, 29 May 2008 21:01:41 -0700 From: Richard Yee User-Agent: Thunderbird 1.4 (Windows/20050908) MIME-Version: 1.0 To: user-java@ibatis.apache.org Subject: Re: C3P0 configuration example for iBatis anyone? References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Anton, If you are using Oracle, have you considered using the oracle.jdbc.pool.OracleConnectionPoolDataSource? -Richard Anton Rothenbacher wrote: > Greetings, the short story is that we have tried DBCP and > SimpleDatasource with iBatis but had some issues with each, we are > connecting to an Oracle 10g database. > > * SimpleDatasource exhibits an issue with pool.pingquery taking > roughly 15min before a bad connection is deemed bad and removed from > the pool, there seems to be no reaper or evictor thread to test idle > connections on a regular basis as opposed to testing at checkout time. > * DBCP has an evictor thread that can test and recycle bad connections > on a regular basis but we were unable to get any decent information in > the log about it's idle connection test activity (not a huge issue > granted but we would like to see some detail when there is a bad > connection so that we can investigate what is going on). > > A third option that we are investigating is to try C3P0 to be used as > a connection pool mechanism to be used by iBatis but I'm unable to > find documentation or examples on exactly how to configure > SqlMapConfig.xml/SqlMapConfig.properties to make it work. > > I found the following link that suggests it is definitely possible but > I'm not following exactly how to configure this. > > > _http://www.mail-archive.com/user-java@ibatis.apache.org/msg07957.html_ > ================================= > On 2/28/07, Clinton Begin <[EMAIL PROTECTED]> wrote: > Absolutely. You can use any DataSource implementation you like. All you > need to do is build a DataSourceFactory and pass the fully qualified > classname (or type alias) into the datasource type in the > element of your SqlMapConfig.xml > public interface DataSourceFactory { > public void initialize(Map map); > public DataSource getDataSource(); > } > Clinton > On 2/28/07, JoeSmith < [EMAIL PROTECTED]> wrote: > > > > Is it possible to use the c3p0 datasource/connection pool with > > iBatis? Does anyone know how this package compares to dbcp? Are there any > > known issues or problems? > ================================= > > Has anyone successfully used C3P0 datasource with ibatis? If so could > you share an example configuration (or point me to some docs) as to > the proper config to swap out dbcp or simple datasource with c3p0? > > It seems it shouldn't be difficult but google is not being my friend > in finding information on it. Does it require additional code in the > app or just config changes in the SqlMapConfig.xml? > Thanks for any insight you can provide. > > > ------------------------------------------------------------------------ > Change the world with e-mail. Join the i�m Initiative from Microsoft. >