com.github.olavloite:smartcommit-jdbc (maven):  Smart Commit JDBC Driver enables 'smartcommit' mode for all JDBC drivers. In Smart Commit mode a JDBC connection will execute all queries in autocommit mode until it encounters a write operations. From the first write operation until the following commit or rollback, the connection will operate in transactional mode. It will then switch back to autocommit and remain in autocommit until it once again encounters a write operation. Using a JDBC connection in Smart Commit mode will reduce the number of read locks needed. Operating a JDBC connection in Smart Commit mode effectively reduces the isolation level of a transaction to READ_COMMITTED for all queries that are executed *BEFORE* a write operation in a transaction. All queries that are executed *AFTER* a write operation in a transaction, will be executed using the configured isolation level of the JDBC connection. 
Keywords: autocommit|jdbc|jpa|jpa-hibernate|open-session-in-view