Closed seancorfield closed 4 years ago
The change in 905f7c3 only adds locking
on the Connection
if it was an existing connection being passed in. If with-transaction
/transact
is passed a DataSource
or some other non-Connection
object from which to obtain a DataSource
(e.g., a JDBC URL or a db-spec hash map), locking
is not used because the Connection
object is created locally to the transaction code.
This was released in 1.0.445!
Is your feature request related to a problem? Please describe. If you run transactions directly on a single
Connection
across multiple threads, they can interfere with each other. Consider providing a way to isolate them.Describe the solution you'd like Some built-in isolation between transactions executed on the same
Connection
object. Optionally, providing some opt-in or opt-out control via theopts
hash map.Describe alternatives you've considered Wrapping
with-transaction
calls in user code withlocking
on the "transactable" but this is overkill forDataSource
(pooled connections).