if (bd.isExecuted()) { //bean is fully configured, no more statements to execute for it:
//bean configured overrides the 'eventBus' bean - replace the existing eventBus with the one configured:
if (bd.getBeanName().equals(EVENT_BUS_NAME)) {
EventBus eventBus = (EventBus)bd.getBean();
enableEvents(eventBus);
}
//ignore global 'shiro.' shortcut mechanism:
if (!bd.isGlobalConfig()) {
BeanEvent event = new ConfiguredBeanEvent(bd.getBeanName(), bd.getBean(),
Collections.unmodifiableMap(objects));
eventBus.publish(event);
}
//initialize the bean if necessary:
LifecycleUtils.init(bd.getBean());
//ignore global 'shiro.' shortcut mechanism:
if (!bd.isGlobalConfig()) {
BeanEvent event = new InitializedBeanEvent(bd.getBeanName(), bd.getBean(),
Collections.unmodifiableMap(objects));
eventBus.publish(event);
}
}
}
}