Permalink
Browse files

Removed reconnect option

  • Loading branch information...
1 parent 151cb58 commit ed30e7882c73261809e200484b7dc7223f8009c6 @alienscience committed Feb 8, 2011
Showing with 2 additions and 9 deletions.
  1. +1 −4 README.md
  2. +1 −4 src/clj_ldap/client.clj
  3. +0 −1 test/clj_ldap/test/client.clj
View
@@ -29,18 +29,15 @@ clj-ldap is a thin layer on the [unboundid sdk](http://www.unboundid.com/product
Connects to an ldap server and returns a, thread safe, [LDAPConnectionPool](http://www.unboundid.com/products/ldap-sdk/docs/javadoc/com/unboundid/ldap/sdk/LDAPConnectionPool.html).
Options is a map with the following entries:
:address Address of server, defaults to localhost
- :port Port to connect to, defaults to 389
+ :port Port to connect to, defaults to 389 (or 636 for ldaps)
:bind-dn The DN to bind as, optional
:password The password to bind with, optional
:num-connections The number of connections in the pool, defaults to 1
:ssl? Boolean, connect over SSL (ldaps), defaults to false
:trust-store Only trust SSL certificates that are in this
JKS format file, optional, defaults to trusting all
certificates
- :reconnect? Boolean, automatically reopen closed connections,
- defaults to false
:connect-timeout The timeout for making connections (milliseconds),
- defaults to 1 minute
:timeout The timeout when waiting for a response from the server
(milliseconds), defaults to 5 minutes
View
@@ -26,10 +26,9 @@
(defn- create-connection
"Create an LDAPConnection object"
[{:keys [address port ssl? trust-store
- reconnect? connect-timeout timeout]}]
+ connect-timeout timeout]}]
(let [host (or address "localhost")
opt (LDAPConnectionOptions.)]
- (when reconnect? (.setAutoReconnect opt true))
(when connect-timeout (.setConnectTimeoutMillis opt connect-timeout))
(when timeout (.setResponseTimeoutMillis opt timeout))
(if ssl?
@@ -123,8 +122,6 @@
:trust-store Only trust SSL certificates that are in this
JKS format file, optional, defaults to trusting all
certificates
- :reconnect? Boolean, automatically reopen closed connections,
- defaults to false
:connect-timeout The timeout for making connections (milliseconds),
defaults to 1 minute
:timeout The timeout when waiting for a response from the server
@@ -58,7 +58,6 @@
:num-connections 4})
(ldap/connect {:ssl? true :port ssl-port})
(ldap/connect {:port port
- :reconnect? true
:connect-timeout 1000
:timeout 5000})])

0 comments on commit ed30e78

Please sign in to comment.