added support for custom data sources

The existing implementation only allows for Java Bean data sources. If
present, this patch will use a custom data source and fall back to the
existing implementation in all other cases.