/**
* @see org.apache.avalon.framework.service.ServiceManager#lookup(java.lang.String)
*/
public Object lookup(String role) throws ServiceException {
if ( !this.hasService(role) ) {
throw new ServiceException("AvalonServiceManager",
"Component with '" + role + "' is not defined in this service manager.");
}
try {
return this.beanFactory.getBean(role);
} catch (BeansException be) {
throw new ServiceException("AvalonServiceManager",
"Exception during lookup of component with '" + role + "'.", be);
}
}