简体   繁体   English

事务同步

[英]Transactional Synchronization

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. 任何人都可以在这个话题上发表更多的看法。

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. 如果您取消了“ Synchronization ”一词,并且用文本中的“ transaction替换了“ thread ”一词,那么您将走上正确的道路。

Spring Transaction Management is not a light matter as it may deceptively appear by the declarative annotations. Spring Transaction Management并不是一件轻而易举的事,因为声明性注释可能会欺骗性地出现它。

Read the detailed Documentation . 阅读详细的文档

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 数据库更新将在线程事务完成后立即完成。它不会等待所有其他线程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM