Examples of PoolManager


Examples of org.apache.cayenne.conn.PoolManager

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

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

Examples of org.apache.cayenne.conn.PoolManager

            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

Examples of org.apache.cayenne.conn.PoolManager

        public DataSource getDataSource(String location) throws Exception {
            try {
                prepareDB();

                PoolManager pm = new PoolManager(
                        org.hsqldb.jdbcDriver.class.getName(),
                        url,
                        1,
                        1,
                        "sa",
View Full Code Here

Examples of org.apache.cayenne.conn.PoolManager

        try {
            PoolDataSource poolDS = new PoolDataSource(
                    connectionInfo.getJdbcDriver(),
                    connectionInfo.getDataSourceUrl());
            return new PoolManager(
                    poolDS,
                    1,
                    1,
                    connectionInfo.getUserName(),
                    connectionInfo.getPassword());
View Full Code Here

Examples of org.apache.cayenne.conn.PoolManager

        int minConnections = getIntProperty(JDBC_MIN_CONNECTIONS_PROPERTY, suffix, 1);
        int maxConnections = getIntProperty(JDBC_MAX_CONNECTIONS_PROPERTY, suffix, 1);

        ConnectionLogger logger = new ConnectionLogger();
        try {
            return new PoolManager(
                    driver,
                    url,
                    minConnections,
                    maxConnections,
                    username,
View Full Code Here

Examples of org.apache.cayenne.conn.PoolManager

        try {
            PoolDataSource poolDS = new PoolDataSource(
                    connectionInfo.getJdbcDriver(),
                    connectionInfo.getDataSourceUrl());
            return new PoolManager(
                    poolDS,
                    1,
                    1,
                    connectionInfo.getUserName(),
                    connectionInfo.getPassword());
View Full Code Here

Examples of org.apache.cayenne.conn.PoolManager

        public DataSource getDataSource(String location) throws Exception {
            try {
                prepareDB();

                PoolManager pm = new PoolManager(
                        org.hsqldb.jdbcDriver.class.getName(),
                        url,
                        1,
                        1,
                        "sa",
View Full Code Here

Examples of org.apache.cayenne.conn.PoolManager

     * Creates DataSource and loads local schema.
     */
    private DataSource createDataSource() {
        DataSource dataSource;
        try {
            dataSource = new PoolManager("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:"
                    + dbName, 1, 2, "sa", null);
        }
        catch (SQLException e) {
            throw new RuntimeException("Error creating DataSource", e);
        }
View Full Code Here

Examples of org.apache.cayenne.conn.PoolManager

        if (dsi.getMinConnections() > dsi.getMaxConnections()) {
            dsi.setMaxConnections(dsi.getMinConnections());
        }

        return new PoolManager(dsi.getJdbcDriver(), dsi.getDataSourceUrl(), dsi
                .getMinConnections(), dsi.getMaxConnections(), dsi.getUserName(), dsi
                .getPassword());
    }
View Full Code Here

Examples of org.apache.cayenne.conn.PoolManager

            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
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.