|
|
|
@ -195,7 +195,7 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan |
|
|
|
* through an explicit statement on the transactional connection: |
|
|
|
* through an explicit statement on the transactional connection: |
|
|
|
* "SET TRANSACTION READ ONLY" as understood by Oracle, MySQL and Postgres. |
|
|
|
* "SET TRANSACTION READ ONLY" as understood by Oracle, MySQL and Postgres. |
|
|
|
* <p>The exact treatment, including any SQL statement executed on the connection, |
|
|
|
* <p>The exact treatment, including any SQL statement executed on the connection, |
|
|
|
* can be customized through through {@link #prepareTransactionalConnection}. |
|
|
|
* can be customized through {@link #prepareTransactionalConnection}. |
|
|
|
* <p>This mode of read-only handling goes beyond the {@link Connection#setReadOnly} |
|
|
|
* <p>This mode of read-only handling goes beyond the {@link Connection#setReadOnly} |
|
|
|
* hint that Spring applies by default. In contrast to that standard JDBC hint, |
|
|
|
* hint that Spring applies by default. In contrast to that standard JDBC hint, |
|
|
|
* "SET TRANSACTION READ ONLY" enforces an isolation-level-like connection mode |
|
|
|
* "SET TRANSACTION READ ONLY" enforces an isolation-level-like connection mode |
|
|
|
@ -250,9 +250,6 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan |
|
|
|
return (txObject.hasConnectionHolder() && txObject.getConnectionHolder().isTransactionActive()); |
|
|
|
return (txObject.hasConnectionHolder() && txObject.getConnectionHolder().isTransactionActive()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* This implementation sets the isolation level but ignores the timeout. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void doBegin(Object transaction, TransactionDefinition definition) { |
|
|
|
protected void doBegin(Object transaction, TransactionDefinition definition) { |
|
|
|
DataSourceTransactionObject txObject = (DataSourceTransactionObject) transaction; |
|
|
|
DataSourceTransactionObject txObject = (DataSourceTransactionObject) transaction; |
|
|
|
|