Skip to main content

All Questions

Tagged with
0 votes
0 answers
25 views

Hibernate does not rollback super class entity tables

I have an inheritance of type JOINED between User and RegisteredUser. I have defined a unique constraint on the derived class entity (RegisteredUser). When I create an object of the derived class and ...
Gozar-Manu Ariana's user avatar
0 votes
0 answers
29 views

Issue With HibernateTransactionManager while migrating Spring MVC applicaiton from spring 4.x/hiberate3.x/java1.8 to spring6.1/Hibernate5.x/Java17

I am migrating lagacy spring mvc application with spring4.x/hiberate3.x/java1.8 in tomcat8.5 server to spring6.1/Hiberate5.6.x/java17/tomcat10.1.3. as part of this process , I replaced JOTM ...
Venkata Yesoda's user avatar
2 votes
4 answers
242 views

No transaction active after migrating from Java 8 to 11, Spring 4.3.30 to 5.1.20, and Hibernate 5.2.13 to 5.4.33

I've recently migrated a Java-based web application and I'm encountering transaction issues after the following upgrades: Java: from 8 to 11 Spring: from 4.3.30.RELEASE to 5.1.20.RELEASE Hibernate: ...
Олег Гаврилів's user avatar
0 votes
0 answers
18 views

Spring select queries without transaction vs spring transaction readonly true?

Should we use transaction in spring select queries? I saw that Spring adds Transaction(readOnly=true) to all default select queries but I couldn't understand it, if we don't use custom isolation ...
Sha's user avatar
  • 1,161
1 vote
0 answers
24 views

How to persist h2 changes made inside Spring Batch ItemReader

My goal is that while I am processing my files, to also add them in a persistent H2 instance with their current status: "NEW" during reading, "PROCESSING" in the ItemProcessor, and ...
Q_Q_'s user avatar
  • 23
1 vote
1 answer
36 views

How to dynamically assign TransactionalManager for multiple datasources in Spring boot

Say, I have configured 5 DataSources in my Spring application. Each of those connections have also created a matching bean of type TransactionalManager. When I declare a @Service annotated classes ...
Stefan Jankovic's user avatar
1 vote
0 answers
54 views

If I use Spring Data JPA without @Transactional, will the entity not be in a Managed state in the persistence context?

I used Spring Data JPA's JpaRepository(3.2.2), and after checking the implementation, I found out that it uses jakarta.persistence.EntityManager to perform find operations. As far as I know, when ...
ramason's user avatar
  • 73
0 votes
1 answer
483 views

Spring: How to rollback in a @TransactionalEventListener of phase BEFORE_COMMIT

In Spring Boot 3.x I have transactional-event-listeners. One is bound to phase "BEFORE_COMMIT" and responsible for doing some "last millisecond checks" before the transaction ...
Stephan Pelikan's user avatar
0 votes
0 answers
63 views

How to manage a single transaction across multiple databases using existing transaction managers in Spring?

I am working on a Spring-based application where I have two separate Platform Transaction Manager: One transaction manager for handling transactions on Database A (JpaTranscationManager). Another ...
Aastik's user avatar
  • 1
0 votes
1 answer
56 views

What could cause potential runtime issue when calling a Transactional method from another non-Transactional method of same class?

this is a conceptually question for understanding Transactions in Spring. What potential runtime issue this code can cause? I know when we will try to run it, the transactional context will be missing ...
Gul Ahmed's user avatar
0 votes
0 answers
18 views

NOT_SUPPORTED Propagation use case

what is the real use case for- NOT_SUPPORTED Propagation transactional ? Where do we use it?
Kusum's user avatar
  • 271
0 votes
0 answers
45 views

Retry the transaction in case of rollback failures in Spring Hibernate

I have a function which calls stored procedures to update Oracle DB. I get this error log: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: rollback ...
Sai Madhav's user avatar
0 votes
0 answers
29 views

Postgresql trigger is not triggered in sprint test

In postgresql, I have a table Student(id, name), Guardian(id, type,name) and a relationship table StudentXGuardian, a Student table has a column Guardian. And I have a constraint to constraint a ...
charlie's user avatar
0 votes
0 answers
61 views

Repead reads from JPA repository return the same value

I have this code snippet from a Spring Java web app (with spring data and postgresql DB) and I don't understand the results I get from it. Let's say I have an entity that comes down to (some details ...
WZJoe's user avatar
  • 1
0 votes
2 answers
153 views

Understanding @Transactional Behavior in Nested Method Calls

I have a method annotated with @Transactional, and within this method, I call another method that is not annotated with @Transactional. I am trying to understand the transactional behavior in this ...
hamdam's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
180