context);
// attach any beans that implement ProcessingElement to the PE
// Container
String[] processingElementBeanNames = context.getBeanNamesForType(AbstractPE.class);
for (String processingElementBeanName : processingElementBeanNames) {
AbstractPE bean = (AbstractPE) context.getBean(processingElementBeanName);
bean.setClock(clock);
try {
bean.setSafeKeeper((SafeKeeper) context.getBean("safeKeeper"));
} catch (NoSuchBeanDefinitionException ignored) {
// no safe keeper = no checkpointing / recovery
}
// if the application did not specify an id, use the Spring bean name
if (bean.getId() == null) {
bean.setId(processingElementBeanName);
}
System.out.println("Adding processing element with bean name "
+ processingElementBeanName + ", id "
+ ((AbstractPE) bean).getId());
peContainer.addProcessor((AbstractPE) bean);