Skip to content

Commit 0e78294

Browse files
committed
[derby] allow to configure whether :transaction_isolation will be 'serializable'
1 parent 5f75187 commit 0e78294

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/arjdbc/derby/adapter.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ def init_connection(jdbc_connection)
109109

110110
def configure_connection
111111
# must be done or SELECT...FOR UPDATE won't work how we expect :
112-
@connection.transaction_isolation = :serializable
112+
tx_isolation = config[:transaction_isolation] # set false to leave as is
113+
tx_isolation = :serializable if tx_isolation.nil?
114+
@connection.transaction_isolation = tx_isolation if tx_isolation
113115
# if a user name was specified upon connection, the user's name is the
114116
# default schema for the connection, if a schema with that name exists
115117
set_schema(config[:schema]) if config.key?(:schema)

0 commit comments

Comments
 (0)