Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
With multiple threads initializing, the protocol handler serializes call to processor.initialize() so that only one thread is allowed to initialize at a time.
If initialization fails the design goal is for the remaining threads to fail-fast if a previous thread failed. The check for error was in the wrong place in the DefaultServiceProtocolHandler.initialize(). Modify to do the check after a thread acquires a lock as in the below snippet:
try {
// use a lock to serialize initialization one thread at a time
initLock.lock();
if (initError)
processor.initialize();
...