Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set isolation level "globaly"? #599

Closed
StefanLiebig opened this issue Jul 10, 2019 · 3 comments
Closed

How to set isolation level "globaly"? #599

StefanLiebig opened this issue Jul 10, 2019 · 3 comments

Comments

@StefanLiebig
Copy link

In 0.15.1 I was able to do this:

TransactionManager.manager.defaultIsolationLevel = Connection.TRANSACTION_SERIALIZABLE

With 0.16.1 this no longer compiles because manager became internal.

How would I do this with 0.16.1?

@StefanLiebig StefanLiebig changed the title How to set isolation level "glabaly"? How to set isolation level "globaly"? Jul 10, 2019
@mpe85
Copy link
Contributor

mpe85 commented Jul 11, 2019

I had the same problem and my solution is this:

val database = Database.connect(...)
database.transactionManager.defaultIsolationLevel = Connection.TRANSACTION_SERIALIZABLE

@StefanLiebig
Copy link
Author

I found that too! :-)

Is this the way it should be used?

@Tapac
Copy link
Contributor

Tapac commented Jul 17, 2019

@StefanHUB , I've made TransactionManager.manager public again in 0.16.2, but @mpe85 advice is fine too especially if you work with multiple Databases in your app.

@Tapac Tapac closed this as completed Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants