Examples of addDataSourceProperty()


Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

        config.addDataSourceProperty("password", propertyResolver.getProperty("password"));

        //MySQL optimizations, see https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration
        if ("com.mysql.jdbc.jdbc2.optional.MysqlDataSource".equals(propertyResolver.getProperty("dataSourceClassName"))) {
            config.addDataSourceProperty("cachePrepStmts", propertyResolver.getProperty("cachePrepStmts", "true"));
            config.addDataSourceProperty("prepStmtCacheSize", propertyResolver.getProperty("prepStmtCacheSize", "250"));
            config.addDataSourceProperty("prepStmtCacheSqlLimit", propertyResolver.getProperty("prepStmtCacheSqlLimit", "2048"));
            config.addDataSourceProperty("useServerPrepStmts", propertyResolver.getProperty("useServerPrepStmts", "true"));
        }
        return new HikariDataSource(config);
    }
View Full Code Here

Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

        //MySQL optimizations, see https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration
        if ("com.mysql.jdbc.jdbc2.optional.MysqlDataSource".equals(propertyResolver.getProperty("dataSourceClassName"))) {
            config.addDataSourceProperty("cachePrepStmts", propertyResolver.getProperty("cachePrepStmts", "true"));
            config.addDataSourceProperty("prepStmtCacheSize", propertyResolver.getProperty("prepStmtCacheSize", "250"));
            config.addDataSourceProperty("prepStmtCacheSqlLimit", propertyResolver.getProperty("prepStmtCacheSqlLimit", "2048"));
            config.addDataSourceProperty("useServerPrepStmts", propertyResolver.getProperty("useServerPrepStmts", "true"));
        }
        return new HikariDataSource(config);
    }
View Full Code Here

Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

        //MySQL optimizations, see https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration
        if ("com.mysql.jdbc.jdbc2.optional.MysqlDataSource".equals(propertyResolver.getProperty("dataSourceClassName"))) {
            config.addDataSourceProperty("cachePrepStmts", propertyResolver.getProperty("cachePrepStmts", "true"));
            config.addDataSourceProperty("prepStmtCacheSize", propertyResolver.getProperty("prepStmtCacheSize", "250"));
            config.addDataSourceProperty("prepStmtCacheSqlLimit", propertyResolver.getProperty("prepStmtCacheSqlLimit", "2048"));
            config.addDataSourceProperty("useServerPrepStmts", propertyResolver.getProperty("useServerPrepStmts", "true"));
        }
        return new HikariDataSource(config);
    }

    @Bean
View Full Code Here

Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

        config.setUsername(username);
        config.setPassword(passwd);

        // MySQL 인 경우 성능을 위해 아래 설정을 사용합니다.
        if (DataConst.DRIVER_CLASS_MYSQL.equals(driverClass)) {
            config.addDataSourceProperty("cachePrepStmts", "true");
            config.addDataSourceProperty("prepStmtCacheSize", "250");
            config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
            config.addDataSourceProperty("useServerPrepStmts", "true");
        }
View Full Code Here

Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

        config.setPassword(passwd);

        // MySQL 인 경우 성능을 위해 아래 설정을 사용합니다.
        if (DataConst.DRIVER_CLASS_MYSQL.equals(driverClass)) {
            config.addDataSourceProperty("cachePrepStmts", "true");
            config.addDataSourceProperty("prepStmtCacheSize", "250");
            config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
            config.addDataSourceProperty("useServerPrepStmts", "true");
        }

        if (props != null) {
View Full Code Here

Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

        // MySQL 인 경우 성능을 위해 아래 설정을 사용합니다.
        if (DataConst.DRIVER_CLASS_MYSQL.equals(driverClass)) {
            config.addDataSourceProperty("cachePrepStmts", "true");
            config.addDataSourceProperty("prepStmtCacheSize", "250");
            config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
            config.addDataSourceProperty("useServerPrepStmts", "true");
        }

        if (props != null) {
            for (Map.Entry<Object, Object> entry : props.entrySet())
View Full Code Here

Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

        // MySQL 인 경우 성능을 위해 아래 설정을 사용합니다.
        if (DataConst.DRIVER_CLASS_MYSQL.equals(driverClass)) {
            config.addDataSourceProperty("cachePrepStmts", "true");
            config.addDataSourceProperty("prepStmtCacheSize", "250");
            config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
            config.addDataSourceProperty("useServerPrepStmts", "true");
        }

        if (props != null) {
            for (Map.Entry<Object, Object> entry : props.entrySet())
                config.addDataSourceProperty(entry.getKey().toString(), entry.getValue().toString());
View Full Code Here

Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

            config.addDataSourceProperty("useServerPrepStmts", "true");
        }

        if (props != null) {
            for (Map.Entry<Object, Object> entry : props.entrySet())
                config.addDataSourceProperty(entry.getKey().toString(), entry.getValue().toString());
        }

        config.setInitializationFailFast(true);
        config.setConnectionTestQuery("SELECT 1");
View Full Code Here

Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

   */
  protected DataSource getDataSource() throws SQLException {
    HikariConfig config = new HikariConfig();
    config.setMaximumPoolSize(100);
    config.setDataSourceClassName(System.getProperty("norm.dataSourceClassName"));
    config.addDataSourceProperty("serverName", System.getProperty("norm.serverName"));
    config.addDataSourceProperty("databaseName", System.getProperty("norm.databaseName"));
    config.addDataSourceProperty("user", System.getProperty("norm.user"));
    config.addDataSourceProperty("password", System.getProperty("norm.password"));
    config.setInitializationFailFast(true);
    return new HikariDataSource(config);
View Full Code Here

Examples of com.zaxxer.hikari.HikariConfig.addDataSourceProperty()

  protected DataSource getDataSource() throws SQLException {
    HikariConfig config = new HikariConfig();
    config.setMaximumPoolSize(100);
    config.setDataSourceClassName(System.getProperty("norm.dataSourceClassName"));
    config.addDataSourceProperty("serverName", System.getProperty("norm.serverName"));
    config.addDataSourceProperty("databaseName", System.getProperty("norm.databaseName"));
    config.addDataSourceProperty("user", System.getProperty("norm.user"));
    config.addDataSourceProperty("password", System.getProperty("norm.password"));
    config.setInitializationFailFast(true);
    return new HikariDataSource(config);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.