You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by JoeSmith <fi...@gmail.com> on 2007/03/01 04:31:34 UTC

c3p0 vs dbcp?

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?

Re: c3p0 vs dbcp?

Posted by JoeSmith <fi...@gmail.com>.
Thank you.  I thought so.  Can anyone comment on c3p0 vs. dbcp?  Is either
one considered to be better/faster than the other? Or better in some usage
models than others?


On 2/28/07, Clinton Begin <cl...@gmail.com> 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 < fidwork@gmail.com> 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?
>
>
>

Re: c3p0 vs dbcp?

Posted by Clinton Begin <cl...@gmail.com>.
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 < fidwork@gmail.com> 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?