Examples of PoolManager


Examples of com.sun.enterprise.resource.pool.PoolManager

    public Object allocateConnection(ManagedConnectionFactory mcf,
                                     ConnectionRequestInfo cxRequestInfo, String jndiNameToUse, Object conn)
            throws ResourceException {
        validateResourceAndPool();
        PoolManager poolmgr = ConnectorRuntime.getRuntime().getPoolManager();
        boolean resourceShareable = true;

        ResourceReferenceDescriptor ref =  poolmgr.getResourceReference(jndiNameToUse, logicalName);

        if (ref != null) {
            String shareableStr = ref.getSharingScope();

            if (shareableStr.equals(ref.RESOURCE_UNSHAREABLE)) {
View Full Code Here

Examples of com.sun.enterprise.resource.pool.PoolManager

    protected Object internalGetConnection(ManagedConnectionFactory mcf,
                                           final ResourcePrincipal prin, ConnectionRequestInfo cxRequestInfo,
                                           boolean shareable, String jndiNameToUse, Object conn, boolean isUnknownAuth)
            throws ResourceException {
        try {
            PoolManager poolmgr = ConnectorRuntime.getRuntime().getPoolManager();
            ConnectorRegistry registry = ConnectorRegistry.getInstance();
            PoolMetaData pmd = registry.getPoolMetaData(poolInfo);

            ResourceSpec spec = new ResourceSpec(jndiNameToUse,
                    ResourceSpec.JNDI_NAME, pmd);
View Full Code Here

Examples of org.apache.cayenne.conn.PoolManager

      DriverManager.registerDriver(new DriverShim(d));
    }

    // Connect
    Out.debug(getClass(), "Connecting to " + settings.url);
    dataSource = new PoolManager(
        null, // Setting this to null will force Cayenne to use the DriverManager
        settings.url,
        1,
        1,
        settings.username,
View Full Code Here

Examples of org.apache.cayenne.conn.PoolManager

        assertEquals(PersistenceState.DELETED, hollow.getPersistenceState());
    }

    private void changeMaxConnections(int delta) {
        PoolManager manager = (PoolManager) dataSource;
        manager.setMaxConnections(manager.getMaxConnections() + delta);
    }
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

            throw new ConfigurationException(message);
        }

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

Examples of org.apache.cayenne.conn.PoolManager

        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

Examples of org.apache.cayenne.conn.PoolManager

            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

Examples of org.apache.cayenne.conn.PoolManager

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

    private void changeMaxConnections(int delta) {
        PoolManager manager = (PoolManager) dataSource;
        manager.setMaxConnections(manager.getMaxConnections() + delta);
    }
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.