Reputation: 103
I am new to spring. I have a piece of code written above several of my methods in my project.
@Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
What I have been able to search on it is, this code refers to Transactional synchronization and this particular code means that , if two threads come at the same time and make some database update, all the database updations will be executed when both the threads finish their execution. I am right on my analysis? Also could anyone throw some more light on this topic.
Upvotes: 1
Views: 113
Reputation: 79
No, this is incorrect.
The database updation will be done as soon as a thread transaction finishes.it will not wait for all other threads
Upvotes: 0
Reputation: 21381
No, your statement is not right.
If you scrap the word Synchronization
and you replace the word thread
with transaction
from your text then you are on the right path.
Spring Transaction Management
is not a light matter as it may deceptively appear by the declarative annotations.
Read the detailed Documentation.
Upvotes: 1