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 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 :)
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.
Thank you for such a nice explanation! Your channel is brilliant!
Thank you for the appreciations :)
Its was the most complex concept in spring thanks for such a clear explanation 🙌
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.
Now, it’s clear!
Thanks for this video!
Thank you for explaining this interesting scenario !
Hi, thank you for the clear explain, but wondering if @Autowired private A a; would cause the Circular Dependency issue?
Woww, like watching a suspense movie! And clear explanation.. :). Can you please share isolation video link?
Hey. Sure. ua-cam.com/video/QzyucYRGRlk/v-deo.html
Man, you talk so passionate about it :D I love it!
Loved this clear explanation. Thanks.
Code on GitHub: github.com/lspil/youtubechannel/tree/master/springdelegationexample
Thanks a lot for explaining it beautifully
Thanks for the explanation, now wondering what would happen if we replaced springs @Transactional with javax @Transactional.
Hi Karthik. I think from some version Spring supports both. But I'd not rely on the Jakarta one.
Respect bro
brilliant!
Poate ar fi ajutat sa spui si de varianta in care faci self injection si apelezi.
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!
*note to self*: yup, exactly the same thing happens with my EJBs also...
@@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 :)
var a = context.getBean(A.class); This will not create the proxy???
Hi. Yes. This will create a proxy as well.
I have a better question, why there's a white ide?
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.
Hi. I do not understand if this is a question or a statement. If it is a question could you please rephrase it?