BuffaloServiceConfigurer config = (BuffaloServiceConfigurer) (appCtx.getBean(serviceName));
Object instance = config.getServices().get(serviceId);
if (instance == null) {
throw new NoSuchServiceException("In configBean '" + serviceName +
"', no service named '" + serviceId + "' configed.");
}
return instance;