Spring Boot and MongoDB Transactions
Vložit
- čas přidán 14. 12. 2020
- Enjoy! :-)
Thank you for commenting and asking questions.
Discord server - Where we discuss programming languages and tech - Please use the right channel to your input / question :)
/ discord
Library sign up referral link:
lbry.tv/$/invite/@mikemoeller...
Get 25 % discount on your Minecraft servers at Shockbyte.com by using this referral link:
shockbyte.com/billing/aff.php...
Checkout or buy the Introduction to Algorithms book at Amazon:
amzn.to/2RK3Lur
The code is located here:
github.com/ekim197711/springb...
Follow me on twitter:
/ mikemoelnielsen
Chat on Discord:
/ discord
Support me on Patreon:
/ mikemoellernielsen
As an Amazon Associate I earn from qualifying purchases.
Check out the stuff that I like:
kit.co/MikeMoellerNielsen/my-...
Background nature video:
Video by Engin Akyurt from Pexels
www.pexels.com/video/beauty-o... - Věda a technologie
Thank you so much for expline, Mike !
You are welcome :)
thank you for this wonderful explanation :)
You're very welcome!
Hey Mike, thanks for content
Transaction in MongoDB Atlas works well without additional configuration, tested)
Thanks for the tip! Nice
Thanks mike for wonderful explanation,
can we use mongo transaction for different collection corresponding to different dbs, will that be able to support atomacity?
Very good question. I think so. But try it out in a test setup
Hi Sir! Thank you for the video and very clear explanation. Can you please tell me what changes we need to do if we are performing Transactions with ReactiveMongoDB or it would be great if you could bring video on it? waiting for your response.
Added to backlog
First of all thanks for the explanation and your videos!
My question is - can we just set retryWrites to false within the Spring Boot setup?
Disabling it seems to be an option for the local development, however, setting it in the uri parameter did not work for me.
I don't think so...
awesome content sir.
plz make a video on oauth with react or angular. Google login or Facebook login
Added to backlog
Nice content. But why is @Autowired annotation not recommended for production?
@Autowired is only used in unittests. Or else the best practice is to use constructor injection so the code easily can be tested in a unittest using ie. mockito.
Does a transaction manager also, handle concurrent requests at the same time for same API trying to create DB records?
Each request with transaction has to wait for ealier transactions to complete
Cool explanation:) Could you use dark mode for the next time?
No I need to use light mode because it is easier to see on the videos. + It lights up my face better than the dark mode. Yes yes I should buy more light for the office... :-)
Will it work with different collections?
It should.
@@MikesTechCorner Thank You
This is not working with AWS DocumentDB. Transactional rollback is not happening.
No the approach doesn't work any longer. I think a manual rollback is the best solution.
@@MikesTechCorner Yeah, we have to rollback manually but I can't believe AWS DocumentDB doesn't support rollbacks with @Transactional annotation. Looks like either AWS DocumentDB with SpringBoot is not used widely.
The above solution works perfectly well with MongoDB V4.0 onwards.
I don't know. It is rare to use 2 databases. Usually one system = one database. 2 databases = 2 systems.