Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow setting default transaction isolation level on TransactionManager implementations #231

@ragnese

Description

@ragnese

It would be helpful to allow setting defaultIsolation on JdbcTransactionManager and SpringManagedTransactionManager, etc.

It may be surprising to always default it to REPEATABLE_READ. Some DataSource impls already have an option to set the default isolation level. Likewise, the database itself also has a default isolation level that can be adjusted. It seems reasonable to either allow the caller to set it, or to at least use the DataSource or Connection passed in to set the default.

Also, Database.connect should be updated to allow passing in a default isolation level if the TransactionManager will take it as a constructor argument. If it just uses the datasource/connection, then the API doesn't need to change, but it should probably be documented.

Thank You!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions