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/[email protected]/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 <dataSource>
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. <http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ChangeWorld>

Reply via email to