}
public void addDynamicResource(Object bean, String beanName, SpringObjectFactory objectFactory) {
Class<? extends Object> cls = bean.getClass();
if (ResourceMetadataCollector.isDynamicResource(cls)) {
DynamicResource dynResource = (DynamicResource)bean;
dynResource.setBeanName(beanName);
SpringObjectFactory old = id2factory.put(beanName, objectFactory);
if (old != null) {
if (logger.isWarnEnabled()) {
logger.warn(Messages
.getMessage("springClassReplaceNewerObjectFactory", beanName)); //$NON-NLS-1$