Тёмный

[QUESTION] Why doesn't @Transactional work when called within the same class? 

Laur Spilca
Подписаться 24 тыс.
Просмотров 4,2 тыс.
50% 1

In this video, I answer the question: Why doesn't @Transactional work when called within the same class?
Code on GitHub: github.com/lsp...

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

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 26   
@laurspilca
@laurspilca 4 года назад
Code on GitHub: github.com/lspil/youtubechannel/tree/master/springdelegationexample
@OCMDfan
@OCMDfan 4 года назад
Thank you for such a nice explanation! Your channel is brilliant!
@laurspilca
@laurspilca 4 года назад
Thank you for the appreciations :)
@rajasaroj2297
@rajasaroj2297 Год назад
Its was the most complex concept in spring thanks for such a clear explanation 🙌
@jeremiahayeni5478
@jeremiahayeni5478 Год назад
This is very refreshing. Thank you so much for this. This has brought a lot of clarity to an issue I was experiencing. Thank you Laur.
@ursugheorghe7201
@ursugheorghe7201 4 года назад
Now, it’s clear! Thanks for this video!
@beznerwow1948
@beznerwow1948 3 года назад
Man, you talk so passionate about it :D I love it!
@valentinmanea9381
@valentinmanea9381 4 года назад
Thank you for explaining this interesting scenario !
@danielma1362
@danielma1362 20 дней назад
Hi, thank you for the clear explain, but wondering if @Autowired private A a; would cause the Circular Dependency issue?
@StefanBanu
@StefanBanu 3 года назад
Loved this clear explanation. Thanks.
@_abhishekmj_
@_abhishekmj_ 3 года назад
Woww, like watching a suspense movie! And clear explanation.. :). Can you please share isolation video link?
@laurspilca
@laurspilca 3 года назад
Hey. Sure. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QzyucYRGRlk.html
@niteshnandan7317
@niteshnandan7317 Год назад
Thanks a lot for explaining it beautifully
@KarthikRamurg
@KarthikRamurg Год назад
Thanks for the explanation, now wondering what would happen if we replaced springs @Transactional with javax @Transactional.
@laurspilca
@laurspilca Год назад
Hi Karthik. I think from some version Spring supports both. But I'd not rely on the Jakarta one.
@0equalsTo1
@0equalsTo1 Год назад
var a = context.getBean(A.class); This will not create the proxy???
@laurspilca
@laurspilca Год назад
Hi. Yes. This will create a proxy as well.
@alexandruaga8086
@alexandruaga8086 4 года назад
Poate ar fi ajutat sa spui si de varianta in care faci self injection si apelezi.
@laurspilca
@laurspilca 4 года назад
Hi Alex. Thank you. Somewhere around minute 10:30 I do a self-injection. But indeed I did not specify explicitly that this is a way to make the @Transactional propagation level work. Thanks for spotting it!
@ionionescu4791
@ionionescu4791 4 года назад
*note to self*: yup, exactly the same thing happens with my EJBs also...
@laurspilca
@laurspilca 4 года назад
@@ionionescu4791 Hi Ion. The philosophy in EJB is basically the same. When you inject the object (in that case by using @EJB as annotation) and proxy is injected in fact. If you use "this", then the framework doesn't see the annotations anymore. You'll also spot the same behavior in CDI for example as well :)
@АлексейСементковский
brilliant!
@gulfstream1800
@gulfstream1800 2 года назад
Respect bro
@12crenshaw
@12crenshaw 2 месяца назад
I have a better question, why there's a white ide?
@sadiqshaik3141
@sadiqshaik3141 5 месяцев назад
if my service method is calling different repository multiple times within the method if it is annotated with @Transactional even though i want to run my whole method within the database transaction like in a single transaction Reason being that am doing database queries for pre-conditions here that may no longer be true by the time you hit my controller without a transaction.
@laurspilca
@laurspilca 5 месяцев назад
Hi. I do not understand if this is a question or a statement. If it is a question could you please rephrase it?
Далее
Транзакции - Spring Framework в деталях
1:20:21
The REAL Truth Behind the DVD Logo
01:00
Просмотров 31 млн
What’s your height?🩷🙀💚
00:59
Просмотров 3,6 млн
Human vs Jet Engine
00:19
Просмотров 113 млн
#kikakim
00:17
Просмотров 7 млн
Spring & Spring Data JPA: Managing Transactions
10:34
Understanding Proxy
12:12
Просмотров 4,4 тыс.
Why Rust is NOT a Passing Fad...
8:54
Просмотров 40 тыс.
The REAL Truth Behind the DVD Logo
01:00
Просмотров 31 млн