| | |
| | | pool of the maximum size you specify.</para> |
| | | |
| | | <programlisting language="java" |
| | | >final List<ConnectionFactory> factories = new LinkedList<ConnectionFactory>(); |
| | | >final List<ConnectionFactory> factories = new LinkedList<~>(); |
| | | |
| | | factories.add(Connections.newFixedConnectionPool( |
| | | Connections.newAuthenticatedConnectionFactory( |
| | | new LDAPConnectionFactory(remoteAddress,remotePort), |
| | | Requests.newSimpleBindRequest(proxyDN, proxyPassword.toCharArray())), |
| | | factories.add(Connections.newFixedConnectionPool(Connections |
| | | .newAuthenticatedConnectionFactory(Connections |
| | | .newHeartBeatConnectionFactory(new LDAPConnectionFactory( |
| | | remoteAddress, remotePort)), |
| | | Requests.newSimpleBindRequest(proxyDN, |
| | | proxyPassword.toCharArray())), |
| | | Integer.MAX_VALUE));</programlisting> |
| | | |
| | | <para>Connections are returned to the pool when you <literal>close()</literal> |