Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
2 answers
258 views

Spring 6 TransactionManager Isolation Level Support in IBM Liberty

We have an application running in Liberty 19.X using Spring 5 and Spring Boot 2 which is live in production and working properly. We are migrating that application to Liberty 24.X with Spring 6 and ...
Scott's user avatar
  • 41
0 votes
0 answers
42 views

Spring @Transactional isolation level

I want to clarify if I understood correctly how @Transactional works. I read about isolation levels in the postgreSQL documentation. The database image that I used: postgres:16.4-alpine3.20 Spring ...
Пашко Ефим Павлович's user avatar
2 votes
2 answers
170 views

Is it guaranteed that constraint violation is flagged at the end of transactional block?

I’m using Postgres and have a transactional method defined as follows: @Entity public class SomeEntity { // … } @Transactional(isolation = READ_COMMITED) public void persistUniqueAndSendEmail() { ...
Some Name's user avatar
  • 9,580
0 votes
0 answers
662 views

Hibernate Isolation Problem with MS Sql Server. Read lock

i have a really heavy business logic. I use spring data jpa with microsoft sql server. My code looks like this. @Transactional(rollbackFor = Exception.class) public void executeAllFlows() { ...
nick kladis's user avatar
0 votes
2 answers
537 views

Atomic UPDATE with nested SELECT clause in Postgres

I have a cluster where one of the nodes is master. The synchronization/decision making who will become the new master is done throught the database(Postgres accessed via java/spring/jpa). Here's what ...
Ventsyslav Raikov's user avatar
0 votes
0 answers
1k views

Why we need @Transaction Attribute in spring for only select statement - NO ddl in service layer

I read multiple threads but I didn't get the answer to why we need to use @Transaction attribute for the select query. Assume we don't have any other DDL statements just plain select statements which ...
Jordan's user avatar
  • 307
1 vote
2 answers
2k views

How to create Flyway schema history with snapshot isolation level?

I'm investigating whether it would be possible to use Flyway for our database schema migration, on the project I've been working on... Database migrations are done manually and I would really like to ...
Milan's user avatar
  • 31
0 votes
1 answer
642 views

Do Hibernate Isolation work on insertion?

I have a problem that could probably be addressed in various ways including re-challenging database design, but my manager has a bias for the Hibernate annotations and here we are. We want to insert ...
Aldian's user avatar
  • 2,624
1 vote
1 answer
620 views

Proper Hibernate nested transactions handling

I am sure that I am missing something, but I don't know exactly what... Giving the following snippet: @Service public class MyClass { private MyClass self; private UserRepository ...
Ciobanu Andrei's user avatar
1 vote
1 answer
5k views

Why and when should I use READ UNCOMMITTED isolation level in Spring transaction isolation level

This might be a very generic question. But, still I'm not able to find a proper solution/answer when and why I should use READ UNCOMMITTED isolation level. Most of the articles and spring doc says, ...
Syed's user avatar
  • 2,607
2 votes
1 answer
1k views

Spring transaction propagation and isolation

There are a lot of questions on this topic. I have searched through stack exchange to find a question which is the same as mine, but haven't found any. Please excuse me if this question has already ...
Mdupont's user avatar
  • 25
1 vote
2 answers
1k views

Prevent two transactions from creating the same entity but still allow concurrent creation

I have a system that interfaces with a third party system to create and store car data. The user selects a ThirdPartyCar and uses it to create a Car in my system. A service method saves the car. ...
James's user avatar
  • 3,214
0 votes
1 answer
431 views

Spring @Transactional + Isolation.REPEATABLE_READ for Rate Limiting

We are trying a scenario of Rate Limiting the total no. of JSON records requested in a month to 10000 for an API. We are storing the total count of records in a table against client_id and a Timestamp(...
Sreeram's user avatar
  • 13
1 vote
1 answer
756 views

Precedence of Spring Transaction Isolation level vs Database isolation level

Say, the isolation level for a database is set at READ_COMMITED. Then through spring transaction management I am setting the transaction Isolation level to 1) READ_UNCOMMITED - then what will be ...
samshers's user avatar
  • 3,690
3 votes
0 answers
186 views

DeadLock in mysql using Spring TransactionTemplate

I'm using spring transationTemplate , and run some queries by doInTransaction method. I got exception about deadLock, on 2 queries that executed sequentially into the transaction. REPLACE INTO TABLE(...
Tal Eden's user avatar
  • 145

15 30 50 per page