configuring the implementation, putting items in the cache, retrieving items from
the cache, and removing or flushing items from the cache.
A DataSourceFactory is responsible for configuring and providing access to a
standard JDBC DataSource implementation. You'll likely be configuring some
third-party DataSource s, unless you have a really compelling reason to write your
own, which we suggest avoiding if possible. The DataSourceFactory has only two
methods: one configures the DataSource , and the other provides access to the
The TransactionConfig and Transaction interfaces are the most complex to
implement and the least common as well. Situations that require a custom Trans-
actionConfig should be rare, but if you absolutely need to, iBATIS allows you to
write your own.
These are the standard, supported extension points in iBATIS . Wherever possi-
ble, iBATIS uses interfaces by design to allow you to replace existing functionality.
We couldn't explore all of the possibilities in this chapter, or even in this topic,
but if you look through the code, most layers of the design offer a decent separa-
tion of interface and implementation. In most cases the design will be similar to
that presented here.