BeanHolder beanHolder;
if (ObjectHelper.isNotEmpty(ref)) {
if (cache != null && cache) {
// cache the registry lookup which avoids repeat lookup in the registry
beanHolder = new RegistryBean(routeContext.getCamelContext(), ref).createCacheHolder();
} else {
beanHolder = new RegistryBean(routeContext.getCamelContext(), ref);
}
// bean holder will check if the bean exists
bean = beanHolder.getBean();
answer = new BeanProcessor(beanHolder);
} else {