On Jun 26, 2009, at 12:03 AM, Gurkan Erdogdu wrote:
Hi;
org.apache.openejb.server.ServiceManager class seems to be not
thread-safe.
Is it important?
private static ServiceManager manager;
public static ServiceManager getManager() {
if (manager == null) {
manager = new ServiceManager();
}
return manager;
}
That particular piece of code is only executed at boot time, which is
a single threaded process. But there's certainly no downside to
fixing it. We could probably just eagerly instantiate that object.
-David