This is called by the constructor of BootstrapContextImpl
String className = null;
String methodName = "getInstance";
Class cls = null;
WorkManager wm = null;
try {
className = System.getProperty(WORK_MANAGER_CLASS, DEFAULT);
// Default work manager implementation is not a singleton.
if (className.equals(DEFAULT)) {
return new CommonWorkManager(poolName);
}
cls = Class.forName(className);
if (cls != null) {
Method method = cls.getMethod("getInstance", new Class[]{});
wm = (WorkManager) method.invoke(cls, new Object[] {});
}
} catch (Exception e) {
String msg = localStrings.getString("workmanager.instantiation_error");
logger.log(Level.SEVERE, msg, e);
}
return wm;