// ds and creator are associated here, not after the proxying of the next if if active
creatorByDataSource.put(ds, creator);
if (logSql) {
ds = (DataSource) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
new Class<?>[]{DataSource.class}, new LoggingSqlDataSource(ds));
}
return ds;
} finally {
if (useContainerLoader) {