Use MySql Update Lock or Java Thread-Safe???
Posted by: Arthur Chan
Date: December 13, 2018 03:04AM

PROBLEM STATEMENT:
I have tables that can be read or updated by several different Java apps.
*** During updating, my other apps must be able to generate reports from same tables using old data (a dirty read);
*** Also, it is possible that another user may want to update the same tables using same app, I don't want a race. I want them updated in the order that the transactions are uploaded to the cloud.


QUESTIONS:
Should I be using a mySQL SELECT...FOR SHARE, and if I use ...FOR SHARE, then in the Java code, do I still need a thread-safe environment???
For example, I am now using an ArrayList, I might need to modify code to using a Vector.
I don't want to change codes if at all possible.

THANKS for sharing.

Options: ReplyQuote


Subject
Written By
Posted
Use MySql Update Lock or Java Thread-Safe???
December 13, 2018 03:04AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.