2014-09-03 84 views
-1

我使用無界標SDK從this示例創建了安全的LDAP連接。創建多個SSL連接池

我可以使用以下代碼爲不安全的服務器創建LDAPConnectionPool。

LDAPConnectionPool connectionPool = new LDAPConnectionPool(serverSet, bindRequest, 10); 

如何創建LDAPConnectionPool超過一個服務器(LDAP和LDAPS),即安全和不安全的。

回答

0

LDAPConnectionPool connectionPool = new LDAPConnectionPool(serverSet, bindRequest, 10);Serverset可以設置socketFactory

所以不管你的服務器集 「failoverSet」 或 「roundRobinSet」,它可以設置的SocketFactory在其構造像

roundRobinSet = new RoundRobinServerSet(addresses, ports, socketFactory);