Package org.apache.cayenne.conn

Examples of org.apache.cayenne.conn.PoolManager


            logger.info(message);
            throw new ConfigurationException(message);
        }

        try {
            return new PoolManager(
                    dataSourceDescriptor.getJdbcDriver(),
                    dataSourceDescriptor.getDataSourceUrl(),
                    dataSourceDescriptor.getMinConnections(),
                    dataSourceDescriptor.getMaxConnections(),
                    dataSourceDescriptor.getUserName(),
View Full Code Here


        this.load(location);

        ConnectionLogger logger = new ConnectionLogger();

        try {
            return new PoolManager(driverInfo.getJdbcDriver(), driverInfo
                    .getDataSourceUrl(), driverInfo.getMinConnections(), driverInfo
                    .getMaxConnections(), driverInfo.getUserName(), driverInfo
                    .getPassword(), logger);
        }
        catch (Exception ex) {
View Full Code Here

        this.load(location);

        ConnectionLogger logger = new ConnectionLogger();

        try {
            return new PoolManager(driverInfo.getJdbcDriver(), driverInfo
                    .getDataSourceUrl(), driverInfo.getMinConnections(), driverInfo
                    .getMaxConnections(), driverInfo.getUserName(), driverInfo
                    .getPassword(), logger);
        }
        catch (Exception ex) {
View Full Code Here

            maxConnection = 1;
        }

        // this code follows Cayenne DriverDataSourceFactory logic...
        try {
            return new PoolManager(
                    driverName,
                    url,
                    minConnection,
                    maxConnection,
                    properties.getProperty(Provider.DATA_SOURCE_USER_NAME_PROPERTY),
View Full Code Here

                .getDataNodes()
                .iterator()
                .next();

        // access DS directly as 'getDataSource' returns a wrapper.
        PoolManager manager = (PoolManager) node.dataSource;
        manager.setMaxConnections(manager.getMaxConnections() + delta);
    }
View Full Code Here

        this.load(location);

        ConnectionLogger logger = new ConnectionLogger();

        try {
            return new PoolManager(driverInfo.getJdbcDriver(), driverInfo
                    .getDataSourceUrl(), driverInfo.getMinConnections(), driverInfo
                    .getMaxConnections(), driverInfo.getUserName(), driverInfo
                    .getPassword(), logger);
        }
        catch (Exception ex) {
View Full Code Here

        this.load(location);

        ConnectionLogger logger = new ConnectionLogger();

        try {
            return new PoolManager(driverInfo.getJdbcDriver(), driverInfo
                    .getDataSourceUrl(), driverInfo.getMinConnections(), driverInfo
                    .getMaxConnections(), driverInfo.getUserName(), driverInfo
                    .getPassword(), logger);
        }
        catch (Exception ex) {
View Full Code Here

            logger.info(message);
            throw new ConfigurationException(message);
        }

        try {
            return new PoolManager(dataSourceDescriptor.getJdbcDriver(), dataSourceDescriptor.getDataSourceUrl(),
                    dataSourceDescriptor.getMinConnections(), dataSourceDescriptor.getMaxConnections(),
                    dataSourceDescriptor.getUserName(), dataSourceDescriptor.getPassword(), jdbcEventLogger);
        } catch (Exception e) {
            jdbcEventLogger.logConnectFailure(e);
            throw e;
View Full Code Here

        assertEquals(PersistenceState.COMMITTED, newObject.getPersistenceState());
    }

    private void changeMaxConnections(int delta) {
        PoolManager manager = (PoolManager) dataSourceFactory.getSharedDataSource();
        manager.setMaxConnections(manager.getMaxConnections() + delta);
    }
View Full Code Here

            throw new SQLException("Incomplete connection info: no DB URL set.");
        }

        // use default values for connection pool ... no info is available from
        // preferences...
        return new PoolManager(info.getJdbcDriver(), info.getUrl(), 1, 5, info
                .getUserName(), info.getPassword());
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.conn.PoolManager

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.