I use something like this to talk to db2:
Code:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
lazy-init="true">
<property name="poolPreparedStatements" value="true" />
<property name="url" value="jdbc:db2://localhost:50000/HCA:driverType=4;currentSchema=DB2ADMIN;" />
<property name="driverClassName" value="com.ibm.db2.jcc.DB2Driver" />
<property name="username" value="username" />
<property name="password" value="password" />
</bean>
I use the DB2Driver for the driverClassName, and the commons dbcp for the dataSource. I've used spring's SingleConnectionDataSource as the dataSource as well. In any case, I avoid the dataSource provided by DB2 and have had success.