Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mostly cosmetic, for readability

  • Loading branch information...
commit a3b3209d7beea2a49bd0ff3f31a55cecbe498305 1 parent 653a712
@jcrossley3 jcrossley3 authored
View
2  modules/xa/src/main/clojure/immutant/xa/jdbc_1.clj
@@ -2,7 +2,7 @@
(in-ns 'clojure.java.jdbc)
(use '[clojure.java.jdbc.internal :only [transaction*]])
(def ^{:dynamic true} *tx-strategy* @(resolve 'transaction*))
-(intern 'clojure.java.jdbc.internal 'transaction* (fn [& args] (apply *tx-strategy* args)))
+(intern 'clojure.java.jdbc.internal 'transaction* (fn [f] (*tx-strategy* f)))
(defmacro with-transaction-strategy
[strategy & body]
`(binding [*tx-strategy* ~strategy] ~@body))
View
2  modules/xa/src/main/clojure/immutant/xa/jdbc_2.clj
@@ -1,7 +1,7 @@
;;; Monkey-patchery to prevent calls to setAutoCommit/commit/rollback on connection
(in-ns 'clojure.java.jdbc)
(def ^{:dynamic true} *tx-strategy* transaction*)
-(defn transaction* [& args] (apply *tx-strategy* args))
+(defn transaction* [f] (*tx-strategy* f))
(defmacro with-transaction-strategy
[strategy & body]
`(binding [*tx-strategy* ~strategy] ~@body))
View
2  modules/xa/src/main/clojure/immutant/xa/transaction.clj
@@ -21,7 +21,7 @@
[clojure.tools.logging :as log]
clojure.java.jdbc))
-(if (ns-resolve 'clojure.java.jdbc 'with-transaction-strategy)
+(if (resolve 'clojure.java.jdbc/with-transaction-strategy)
(log/info "Using proper version of java.jdbc to set transaction strategy")
(try
(require 'immutant.xa.jdbc-2)
Please sign in to comment.
Something went wrong with that request. Please try again.