Addresses #106 by adding experimental locking in this case

This commit is contained in:
Sean Corfield 2020-04-27 17:52:11 -07:00
parent aa1c8a4cea
commit 905f7c3e12
2 changed files with 7 additions and 1 deletions

View file

@ -2,6 +2,11 @@
Only accretive/fixative changes will be made from now on. Only accretive/fixative changes will be made from now on.
The following changes have been made on **master** since the 1.0.424 release:
* Add MySQL-specific result set streaming tip.
* Investigate possible solutions for #106 (mutable transaction thread safety) -- experimental `locking` on `Connection` object.
## Stable Builds ## Stable Builds
* 2020-04-10 -- 1.0.424 * 2020-04-10 -- 1.0.424

View file

@ -82,7 +82,8 @@
(extend-protocol p/Transactable (extend-protocol p/Transactable
java.sql.Connection java.sql.Connection
(-transact [this body-fn opts] (-transact [this body-fn opts]
(transact* this body-fn opts)) (locking this
(transact* this body-fn opts)))
javax.sql.DataSource javax.sql.DataSource
(-transact [this body-fn opts] (-transact [this body-fn opts]
(with-open [con (p/get-connection this opts)] (with-open [con (p/get-connection this opts)]