Spring & Spring Data JPA: Managing Transactions

preview_player
Показать описание
Spring Boot and Spring Data JPA make the handling of transactions extremely simple. They enable you to declare your preferred transaction handling and provide seamless integration with Hibernate and JPA.

The only thing you need to do is to annotate one of your methods with @Transactional. But what does that actually do? Which method(s) should you annotate with @Transactional? And why can you set different propagation levels?

I will answer all of these questions in this video. To make that a little bit easier to understand, I will focus on local transactions. These are transactions between your application and 1 external system, e.g., your database.

Like my channel? Subscribe!

Join the free Member Library:

Want to connect with me?

#Spring #SpringDataJPA #Transactions
Рекомендации по теме
Комментарии
Автор

Commenting only to appreciate how well you have organized this video.

mrabbas
Автор

Been struggling for a few days to figure out how this annotations help with our backend applications and your video made it so clear to me now. God bless you, man!

keremkarademir
Автор

Top tier content, thank you for your work.

heribertoalortadeo
Автор

Gave me very good clear knowledge on @Transactional attribute. Thank you.

swapnakumari
Автор

Thanks for the video. It helped me a lot to understand more about Phanton Read and how to deal with it.

israelduarte
Автор

Very informative and well explained. Thank you!

yuriyk
Автор

good explanation, thank you for the video

mehmetbilgin
Автор

Thank you for another great video . Can you also cover the need of optimistic locking and when do we need to use that in spring data jpa .

kratikothari
Автор

Thank you for another great explanation. By the way why didn't you mention 'isolation' attribute?

hyperborean
Автор

Hi janssen,

Thanks for excellently explaining transaction management in Spring Data JPA.
Is there any resource on your blog expalining the use of @Lock and @Version please?

Regads

fullnaoufal
Автор

Thank you, a very clear video, just a question: does spring support both declarative and programmatic transaction management ?

ginoallisonrasoanaivo
Автор

didn't know that readonly done by not doing dirty checking! thanks

park
Автор

Excellent video, please could you talk about Hibernate caching? thanks...

stanleyizturriaga
Автор

excellently explained ee+, Please make more videos on this.

SushilKumarBhaskar
Автор

Best video about this subject! Thanks so much!!

OracleOfSages
Автор

Thanks for the great video. If there are 3 different table updates. I have written them in different methods. I used @Transaction annotation for all of them but when 3rd fails, it does not rollback 1st two method transactions. How can I solve this?

jasper
Автор

Thanks for sharing all this knowledge. I m confused on why we need to add @Transaction without customizing it in the service if it's by default in repository.

shomer
Автор

Sometimes the rollback for Exception.class won't work when we use multiple entities for multiple tables and make more than one CRUD operations in a service class . Any suggestions for this .. ??

jaideeph
Автор

Sir your video are very informative..but one question arises, How to avoid cocurrent read and insert if your java application is deployed on different servers Or jvm and connect with one db how transaction work in that scenario..

ketantank
Автор

It is possible to add the annotation @Transactional on the class. On each of my services I put on the class level @Transactional(readOnly = true) like that by default I do not open a transaction and if my method modify the base then I add an @Transactional on the méthode.

christophe_agoero