How to prevent Race Condition for a Java Microservice running across different containers?

Azzizz81

Suspended
Joined
May 4, 2001
Messages
49,430
Reaction score
2,303
Nice. But how come the pentester says he can perform race condition on my code if database will prevent this? That's why I am asking......
Quite likely that he simulated opening two browser windows to the same page and then submitted the forms in the seperate windows or something like that.

Depending on your ORM framework and how you handle exceptions, it could be as simple as adding a new version column and annotating it.

One thing to note is that this is a common scenario and possibly other parts of your app may have the same issues. You probably want to solve it at a framework level
 

Trader11

Arch-Supremacy Member
Joined
Oct 14, 2018
Messages
14,661
Reaction score
4,608
Quite likely that he simulated opening two browser windows to the same page and then submitted the forms in the seperate windows or something like that.

Depending on your ORM framework and how you handle exceptions, it could be as simple as adding a new version column and annotating it.

One thing to note is that this is a common scenario and possibly other parts of your app may have the same issues. You probably want to solve it at a framework level
Hibernate can prevent this?
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ. Forum members and moderators are responsible for their own posts.

Please refer to our Community Guidelines and Standards, Terms of Service and Member T&Cs for more information.
Top