     request))
 
 (defn- configure-session
-  "Configures the given Session object according to given options
-  map. Assumes correct types are passed: map
+  "Returns the given Session object, configured according to given
+  options map. Assumes correct types are passed: map
   for :default-request-options, Logger object for :logger, Object
   for :user-object, keyword for :transaction-mode, integer
   for :transaction-timeout."

  See https://docs.marklogic.com/javadoc/xcc/com/marklogic/xcc/ContentSource.html
  for allowed parameter arrangements."
  ([uri options]
   (-> (create-session* uri)
       (configure-session options)))
  ([uri content-base options]
   (-> (create-session* uri content-base)
       (configure-session options)))
  ([uri user pwd options]
   (-> (create-session* uri user pwd)
       (configure-session options))) 
  ([uri user pwd content-base options]
   (-> (create-session* uri user pwd content-base)
       (configure-session options))))
;; TODO I find the repetition of configure-session cluttering.  Probably not a big deal.


    (.setTransactionTimeout session tt))
  session)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Session management
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn create-session
  "Create a Session according to the given parameters, configured
  according to the given options map.
