/**
* @see Scope#get(String, ObjectFactory)
*/
@Override
public Object get(String name, ObjectFactory<?> objectFactory) {
JobContext context = getContext();
Object scopedObject = context.getAttribute(name);
if (scopedObject == null) {
synchronized (mutex) {
scopedObject = context.getAttribute(name);
if (scopedObject == null) {
logger.debug(String.format("Creating object in scope=%s, name=%s", this.getName(), name));
scopedObject = objectFactory.getObject();
context.setAttribute(name, scopedObject);
}
}