* Logger, usable by subclasses.
*/
protected final Log logger = LogFactory.getLog(getClass());
public Object get(String name, ObjectFactory objectFactory) {
MutableAttributeMap scope = getScope();
Object scopedObject = scope.get(name);
if (scopedObject == null) {
if (logger.isDebugEnabled()) {
logger.debug("No scoped instance '" + name + "' found; creating new instance");
}
scopedObject = objectFactory.getObject();
scope.put(name, scopedObject);
} else {
if (logger.isDebugEnabled()) {
logger.debug("Returning scoped instance '" + name + "'");
}
}