Тёмный

What is optimistic and pessimistic LOCK | How to use this lock in spring boot 3 with example 

Java Tech Solutions
Подписаться 4,4 тыс.
Просмотров 10 тыс.
50% 1

Опубликовано:

 

30 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 40   
@ramanandkumar7780
@ramanandkumar7780 25 дней назад
Thank you, you have explained very well optimistic n pessimistic locking using real time example .
@JavaTechSolutions
@JavaTechSolutions 25 дней назад
@@ramanandkumar7780 thank you
@djkumar9726
@djkumar9726 Год назад
Thanks for your real-time examples, all your videos are very much useful for real time implementation of different micro service concept. Keep uploading such kind of informative videos
@JavaTechSolutions
@JavaTechSolutions Год назад
Thanks
@meghanak8854
@meghanak8854 9 месяцев назад
Thank you for your videos with real time projects. Please make more videos on Spring boot and spring cloud technologies.
@JavaTechSolutions
@JavaTechSolutions 9 месяцев назад
Thanks
@rmkulanthaivelu
@rmkulanthaivelu 5 месяцев назад
Great Explanation. Thank you so much.
@JavaTechSolutions
@JavaTechSolutions 5 месяцев назад
You are welcome!
@DurgeshKumawatdk
@DurgeshKumawatdk Год назад
you picked a good example to explain the locking mechanism
@JavaTechSolutions
@JavaTechSolutions Год назад
Thank you
@chandan07talreja
@chandan07talreja Год назад
Excellent explanation keep videos on spring boot coming 🙌🏻
@JavaTechSolutions
@JavaTechSolutions Год назад
Sure.. Thanks
@Vinoth_Subramani
@Vinoth_Subramani 9 месяцев назад
In the case of rollback scenario which lock type is suitable
@JavaTechSolutions
@JavaTechSolutions 9 месяцев назад
Both approach are fine... Depends on your needs
@jinalmodi4636
@jinalmodi4636 7 месяцев назад
Can this be useful when we have the same application deployed on multiple instances?
@JavaTechSolutions
@JavaTechSolutions 7 месяцев назад
I believe so
@mehmetnamver914
@mehmetnamver914 8 месяцев назад
As i understand This lock mechanism only work for one instance ? İf we have 2 instance we should use saga ?
@JavaTechSolutions
@JavaTechSolutions 8 месяцев назад
If any transaction started in any instance then it will complete for that instance only
@Akash-yo4nj
@Akash-yo4nj 2 месяца назад
If possible can we give priority for transaction for eg bookTicket1 have high priority
@JavaTechSolutions
@JavaTechSolutions 2 месяца назад
We can set the priority for the transaction
@nenuanenenuane6645
@nenuanenenuane6645 Год назад
Hello great vedio is it same process for old springboot versions also?
@JavaTechSolutions
@JavaTechSolutions Год назад
It should work. Only little bit modification is required as in Java 17 and spring boot 3 modified lots of thing
@nenuanenenuane6645
@nenuanenenuane6645 Год назад
@@JavaTechSolutions thank you
@nenuanenenuane6645
@nenuanenenuane6645 Год назад
@@JavaTechSolutions one more doubt is @version annotation and version field needed if we are using Pessimistic locking? Can we remove that field and annotation in entity?
@kaushikmitra1982
@kaushikmitra1982 Год назад
good explanation !!!
@JavaTechSolutions
@JavaTechSolutions Год назад
Thanks
@Vinoth_Subramani
@Vinoth_Subramani 9 месяцев назад
@Version is needed for pessimistic lock also?
@JavaTechSolutions
@JavaTechSolutions 9 месяцев назад
For applying optimistic lock version annotation is required. But for pessimistic locking version annotation not needed
@theunusual4566
@theunusual4566 Год назад
Hello sir, I didn't understand one thing : How ticket was saved in db with "BusId" ? Because In the code busDetails was not saved in ticket object.. Yes.. ticket was added in Bus entity , but still this Bus entity was not saved.. Pls suggest
@JavaTechSolutions
@JavaTechSolutions Год назад
It's a cascading save
@puneetsaneja3007
@puneetsaneja3007 11 месяцев назад
Hi. When should we use saga design pattern or when should we use locking mechanisn ?
@JavaTechSolutions
@JavaTechSolutions 11 месяцев назад
Its depends. Looking mechanism should be used if you want to maintain the data consistency then locking should be used. Even if same data used by multiple thread then locking can be used. Regarding saga design pattern is used based on scenario. It will be used if we want to maintained transaction in multiple microservices.
@puneetsaneja3007
@puneetsaneja3007 11 месяцев назад
@@JavaTechSolutions we cant use locking mechanism when there is 3rd party post api. As we dont have source code in that case. Is that make sense ?
@JavaTechSolutions
@JavaTechSolutions 11 месяцев назад
@@puneetsaneja3007 yes... True...
@turxandunya4010
@turxandunya4010 Месяц назад
Creating entity is not a part of lesson. Pls do it before video. Not in the video
@ThanhPhamTien-vr4gf
@ThanhPhamTien-vr4gf 8 месяцев назад
Waste time , first 40 mins was for project creation , eventually just add 1 annotation and dont explain what it does
@JavaTechSolutions
@JavaTechSolutions 8 месяцев назад
Thank you for your concern... But it's in from beginning
@mercelessmonk957
@mercelessmonk957 3 месяца назад
you should switch off your clicks buddy
@JavaTechSolutions
@JavaTechSolutions 3 месяца назад
@@mercelessmonk957 Already taken care.. Thank you
Далее
Optimistic Locking - What, When, Why, and How?
16:34
Просмотров 15 тыс.
Don't bother ganking Ammar - ESL Dota 2
00:23
Просмотров 131 тыс.
Когда Долго В Рейсе)))
00:16
Просмотров 159 тыс.
МЖ. Может, папа - ты? 16.02.2023
40:03
Просмотров 261 тыс.
what is OPTIMISTIC LOCK?
18:41
Просмотров 59 тыс.
Блокировки в базах данных
9:21
Просмотров 4,2 тыс.
Spring & Spring Data JPA: Managing Transactions
10:34
Don't bother ganking Ammar - ESL Dota 2
00:23
Просмотров 131 тыс.