Skip to main content
10 events
when toggle format what by license comment
Aug 19, 2016 at 10:34 comment added Aiden Parent class is always called by using newInstance
Aug 19, 2016 at 9:05 history edited Willi Mentzel CC BY-SA 3.0
deleted 19 characters in body
Aug 19, 2016 at 9:05 history edited Aiden CC BY-SA 3.0
deleted 9 characters in body
Aug 19, 2016 at 9:03 vote accept Aiden
Aug 19, 2016 at 9:14
Aug 19, 2016 at 8:23 answer added UmNyobe timeline score: 1
Aug 19, 2016 at 8:00 comment added JB Nizet Impossible to tell. Too many unknowns. What do the DAOs do. What is naturalKey? What is parentClass and how many instances of thoese are they. Where are transactions, etc. But trying to fix transactional issues with thread synchronization is not the right approach. If you need a globally incrementing sequence, use a database sequence, that's what it's for. But reading all your question and peudo-code, I have a hard time understanding what you're trying to achieve.
Aug 19, 2016 at 7:59 comment added Kayaman void synchronized function updateDBSequence()? That's not Java.
Aug 19, 2016 at 7:56 comment added Aiden But what about behavior of threads in this scenario ?
Aug 19, 2016 at 7:53 comment added JB Nizet Use a real database sequence.
Aug 19, 2016 at 7:45 history asked Aiden CC BY-SA 3.0