org.apache.commons.dbcp.BasicDataSource is actually a connection pool, from which you can borrow/return connections to any flavour of database: Oracle, Sybase, DB2, etc.
com.ibm.db2.jcc.DB2DataSource is a DB2 data source.
So, you could have a DBCP pool of perhaps 100 DB2 connections. The pool will return you a pretty generic datasource for use in your code - unless you cast it explicitly to a DB2 one e.g. in order to get access to its fuller API. Edit following comment below: you shouldn't really need to do this, normal idiom of use is to go with the regular DataSource interface.
Read more about DBCP and its configuration options at:
http://commons.apache.org/proper/commons-dbcp/index.html
http://commons.apache.org/proper/commons-dbcp/configuration.html