Search in sources :

Example 1 with DataSourceLookup

use of org.springframework.jdbc.datasource.lookup.DataSourceLookup 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));
}
Also used : JndiDataSourceLookup(org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup) DataSourceLookup(org.springframework.jdbc.datasource.lookup.DataSourceLookup) JndiDataSourceLookup(org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup) ProxyDataSource(com.haulmont.cuba.core.sys.jdbc.ProxyDataSource)

Aggregations

ProxyDataSource (com.haulmont.cuba.core.sys.jdbc.ProxyDataSource)1 DataSourceLookup (org.springframework.jdbc.datasource.lookup.DataSourceLookup)1 JndiDataSourceLookup (org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup)1