Package org.apache.directory.ldap.client.api

Examples of org.apache.directory.ldap.client.api.LdapConnectionPool


        config.setLdapHost( "localHost" );
        config.setLdapPort( port );
        config.setName( DEFAULT_ADMIN );
        config.setCredentials( DEFAULT_PASSWORD );
        PoolableLdapConnectionFactory factory = new PoolableLdapConnectionFactory( config );
        pool = new LdapConnectionPool( factory );
        pool.setTestOnBorrow( true );
        pool.setWhenExhaustedAction( GenericObjectPool.WHEN_EXHAUSTED_GROW );
    }
View Full Code Here


            config.setLdapHost( DEFAULT_HOST );
            config.setLdapPort( port );
            config.setName( DEFAULT_ADMIN );
            config.setCredentials( DEFAULT_PASSWORD );
            PoolableLdapConnectionFactory factory = new PoolableLdapConnectionFactory( config );
            LdapConnectionPool pool = new LdapConnectionPool( factory );
            pool.setTestOnBorrow( true );
            pools.put( port, pool );
        }

        return pools.get( port );
    }
View Full Code Here

                    if ( classCreateLdapConnectionPoolRule != null
                        && classCreateLdapConnectionPoolRule.getLdapServer() != ldapServer )
                    {
                        LOG.trace( "Creating connection pool to new ldap server" );

                        LdapConnectionPool oldLdapConnectionPool = ldapConnectionPool;
                        LdapConnectionTemplate oldLdapConnectionTemplate = ldapConnectionTemplate;

                        ldapConnectionPool = classCreateLdapConnectionPoolRule
                            .createLdapConnectionPool( ldapServer );
                        ldapConnectionTemplate = new LdapConnectionTemplate( ldapConnectionPool );
View Full Code Here

        poolConfig.timeBetweenEvictionRunsMillis = createLdapConnectionPool
            .timeBetweenEvictionRunsMillis();
        poolConfig.whenExhaustedAction = createLdapConnectionPool
            .whenExhaustedAction();

        return new LdapConnectionPool(
            new PoolableLdapConnectionFactory( factory ), poolConfig );
    }
View Full Code Here

            cc.setName(config.getBindDN());
            cc.setCredentials(config.getBindPassword());
        }

        PoolableLdapConnectionFactory factory = new PoolableLdapConnectionFactory(cc);
        adminPool = new LdapConnectionPool(factory);
        adminPool.setTestOnBorrow(true);
        adminPool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_GROW);

        // setup unbound connection pool. let's create a new version of the config
        cc = createConnectionConfig();
View Full Code Here

            config.setLdapHost( DEFAULT_HOST );
            config.setLdapPort( port );
            config.setName( DEFAULT_ADMIN );
            config.setCredentials( DEFAULT_PASSWORD );
            PoolableLdapConnectionFactory factory = new PoolableLdapConnectionFactory( config );
            LdapConnectionPool pool = new LdapConnectionPool( factory );
            pool.setTestOnBorrow( true );
            pools.put( port, pool );
        }

        return pools.get( port );
    }
View Full Code Here

            config.setLdapHost( DEFAULT_HOST );
            config.setLdapPort( port );
            config.setName( DEFAULT_ADMIN );
            config.setCredentials( DEFAULT_PASSWORD );
            PoolableLdapConnectionFactory factory = new PoolableLdapConnectionFactory( config );
            LdapConnectionPool pool = new LdapConnectionPool( factory );
            pool.setTestOnBorrow( true );
            pools.put( port, pool );
        }

        return pools.get( port );
    }
View Full Code Here

            config.setLdapHost( DEFAULT_HOST );
            config.setLdapPort( port );
            config.setName( DEFAULT_ADMIN );
            config.setCredentials( DEFAULT_PASSWORD );
            PoolableLdapConnectionFactory factory = new PoolableLdapConnectionFactory( config );
            LdapConnectionPool pool = new LdapConnectionPool( factory );
            pool.setTestOnBorrow( true );
            pools.put( port, pool );
        }

        return pools.get( port );
    }
View Full Code Here

            cc.setName(config.getBindDN());
            cc.setCredentials(config.getBindPassword());
        }

        PoolableLdapConnectionFactory factory = new PoolableLdapConnectionFactory(cc);
        adminPool = new LdapConnectionPool(factory);
        adminPool.setTestOnBorrow(true);
        adminPool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_GROW);

        // setup unbound connection pool. let's create a new version of the config
        cc = createConnectionConfig();
View Full Code Here

            config.setLdapHost( DEFAULT_HOST );
            config.setLdapPort( port );
            config.setName( DEFAULT_ADMIN );
            config.setCredentials( DEFAULT_PASSWORD );
            PoolableLdapConnectionFactory factory = new PoolableLdapConnectionFactory( config );
            LdapConnectionPool pool = new LdapConnectionPool( factory );
            pool.setTestOnBorrow( true );
            pools.put( port, pool );
        }

        return pools.get( port );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.ldap.client.api.LdapConnectionPool

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.