Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Mostly cosmetic, for readability

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

0 comments on commit a3b3209

Please sign in to comment.
Something went wrong with that request. Please try again.