Jamie
unread,Apr 22, 2013, 9:48:41 AM4/22/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mybati...@googlegroups.com
Currently working on upgrading ibatis to Mybatis, not using Spring or Guice, and I'm having an issue recreating a connection of type DBCP. I understand there are new datasource types in mybatis (unpooled, pooled, jndi) but would like the option to use DBCP if possible for comparing performance between the two in mybatis. There have been several posts in mybatis-user either mentioning the use of DBCP or asking about it, I'm hoping someone can point me in the right direction. I've tried passing in various dbcp datasource factories in my configuration file without any luck. I did find an implementation for Guice (org.mybatis.guice.datasource.dbcp.SharedPoolDataSourceProvider), but was unable to find anything for mybatis without Guice.
Has anyone successfully set up a dbcp connection without Spring or Guice? Could you post an example of your configuration? Or do I have to build my own Provider as was done for Guice?
Here's my old configuration from ibatis
<transactionManager type="JDBC" commitRequired="false">
<dataSource type="DBCP">
<property name="driverClassName" value="${driver}" />
<property name="url" value="${url}" />
<property name="username" value="${username}" />
<property name="password" value="${password}" />
<property name="defaultAutoCommit" value="false" />
<property name="maxActive" value="20"/>
<property name="maxIdle" value="0"/>
<property name="maxWait" value="30000"/>
<property name="validationQuery" value="select 1 from sysibm.sysdummy1 with ur"/>
<property name="minIdle" value="0"/>
<property name="timeBetweenEvictionRunsMillis" value="300000"/>
<property name="numTestsPerEvictionRun" value="5"/>
<property name="minEvictableIdleTimeMillis" value="900000"/>
</dataSource>
</transactionManager>