use of com.haulmont.cuba.core.sys.jdbc.ProxyDataSource in project cuba by cuba-platform.
the class DataSourceProvider method getApplicationDataSource.
protected DataSource getApplicationDataSource(String storeName) {
String actualStoreName = storeName == null ? Stores.MAIN : storeName;
Map<String, String> dsParameters = getDataSourceParameters(actualStoreName);
HikariConfig config = getConnectionPoolConfig(actualStoreName, dsParameters);
return new ProxyDataSource(new HikariDataSource(config));
}
use of com.haulmont.cuba.core.sys.jdbc.ProxyDataSource in project cuba by cuba-platform.
the class DataSourceProvider method getJndiDataSource.
protected DataSource getJndiDataSource(String jndiName) {
Preconditions.checkNotNull(jndiName, "Jndi name is null");
DataSourceLookup lookup = new JndiDataSourceLookup();
return new ProxyDataSource(lookup.getDataSource(jndiName));
}
Aggregations