Package io.dropwizard.db

Examples of io.dropwizard.db.ManagedDataSource


        this.dsf = dsf;
    }

    @Override
    public ManagedDataSource build(MetricRegistry metricRegistry, String name) throws ClassNotFoundException {
        ManagedDataSource ds = dsf.build(metricRegistry, name);
        return dsf.getUrl().startsWith("jdbc:fiber:")
                ? ds : FiberManagedDataSource.wrap(ds, 10);
    }
View Full Code Here


    public SessionFactory build(HibernateBundle<?> bundle,
                                Environment environment,
                                DataSourceFactory dbConfig,
                                List<Class<?>> entities) {
        final ManagedDataSource dataSource = dbConfig.build(environment.metrics(), "hibernate");
        return build(bundle, environment, dbConfig, dataSource, entities);
    }
View Full Code Here

    }

    public DBI build(Environment environment,
                     DataSourceFactory configuration,
                     String name) {
        final ManagedDataSource dataSource = configuration.build(environment.metrics(), name);
        return build(environment, configuration, dataSource, name);
    }
View Full Code Here

    }

    private CloseableLiquibase openLiquibase(final DataSourceFactory dataSourceFactory, final Namespace namespace)
            throws SQLException, LiquibaseException {
        final CloseableLiquibase liquibase;
        final ManagedDataSource dataSource = dataSourceFactory.build(new MetricRegistry(), "liquibase");

        final String migrationsFile = namespace.getString("migrations-file");
        if (migrationsFile == null) {
            liquibase = new CloseableLiquibase(dataSource);
        } else {
View Full Code Here

TOP

Related Classes of io.dropwizard.db.ManagedDataSource

Copyright © 2018 www.massapicom. 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.