David, Thanks for the fix. Keep up the good work!
This issue has been filed and fixed: > https://issues.apache.org/jira/browse/OPENEJB-1012 > > The new code uses an AtomicReference to hold a FutureTask object. The > thread to win the Atomic compare and swap operation is the thread that will > construct the singleton via futureTask.run(). > > I also added a test case that uses a CyclicBarrier to queue up a few > hundred threads to reproduce the race condition as optimally as possible. > All looks good. > > Howard, thank you again for reporting the issue. > > -David > >
