com.microsoft.sqlserver.jdbc.SQLServerDataSource Java Examples

The following examples show how to use com.microsoft.sqlserver.jdbc.SQLServerDataSource. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SQLServerTestSettings.java    From dashbuilder with Apache License 2.0 7 votes vote down vote up
@Override
public SQLDataSourceLocator getDataSourceLocator() {
    return new SQLDataSourceLocator() {
        public DataSource lookup(SQLDataSetDef def) throws Exception {
            String url = connectionSettings.getProperty("url");
            String user = connectionSettings.getProperty("user");
            String password = connectionSettings.getProperty("password");

            SQLServerDataSource ds = new SQLServerDataSource();
            ds.setURL(url);
            if (!StringUtils.isBlank(user)) {
                ds.setUser(user);
            }
            if (!StringUtils.isBlank(password)) {
                ds.setPassword(password);
            }
            return ds;
        }
    };
}
 
Example #2
Source File: SQLServerDataSourceProvider.java    From hibernate-types with Apache License 2.0 4 votes vote down vote up
@Override
public Class<? extends DataSource> dataSourceClassName() {
	return SQLServerDataSource.class;
}
 
Example #3
Source File: SQLServerDataSourceProvider.java    From high-performance-java-persistence with Apache License 2.0 4 votes vote down vote up
@Override
public Class<? extends DataSource> dataSourceClassName() {
	return SQLServerDataSource.class;
}
 
Example #4
Source File: AbstractTest.java    From hibernate-master-class with Apache License 2.0 4 votes vote down vote up
@Override
public Class<? extends DataSource> dataSourceClassName() {
    return SQLServerDataSource.class;
}