static class JdbcUtils.DataSourcePool
extends java.lang.Object
This in turn makes it easier to cache
SqlDialect
objects. Otherwise, each time we
see a new data source, we have to open a connection to find out what
database product and version it is.
Modifier and Type | Field and Description |
---|---|
private com.google.common.cache.LoadingCache<java.util.List<java.lang.String>,org.apache.commons.dbcp2.BasicDataSource> |
cache |
static JdbcUtils.DataSourcePool |
INSTANCE |
Constructor and Description |
---|
DataSourcePool() |
Modifier and Type | Method and Description |
---|---|
private static org.apache.commons.dbcp2.BasicDataSource |
dataSource(java.util.List<java.lang.String> key) |
javax.sql.DataSource |
get(java.lang.String url,
java.lang.String driverClassName,
java.lang.String username,
java.lang.String password) |
public static final JdbcUtils.DataSourcePool INSTANCE
private final com.google.common.cache.LoadingCache<java.util.List<java.lang.String>,org.apache.commons.dbcp2.BasicDataSource> cache
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.