openejb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Blevins (JIRA)" <>
Subject [jira] Created: (OPENEJB-1012) Multi-threaded Singleton Lazy Instantiation Issue
Date Sat, 28 Mar 2009 00:56:50 GMT
Multi-threaded Singleton Lazy Instantiation Issue

                 Key: OPENEJB-1012
             Project: OpenEJB
          Issue Type: Bug
          Components: container system
    Affects Versions: 3.1
            Reporter: David Blevins
             Fix For: 3.1.1

Old code foolishly used an "if (instance == null) instance = createInstance()" which is not
thread safe -- my bad :).

Current code now uses Atomics and Futures to guarantee only one thread will win the right
to lazily construct the singleton.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message