return;
}
try {
this.resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
} catch (ServiceException se) {
throw new SourceException("Missing service dependency: " + SourceResolver.ROLE, se);
}
try {
this.cache = (Cache) this.manager.lookup(this.cacheRole);
} catch (ServiceException se) {
throw new SourceException("Missing service dependency: " + this.cacheRole, se);
}
if (this.async) {
try {
this.refresher = (Refresher) this.manager.lookup(this.refresherRole);
} catch (ServiceException se) {
// clean up
if (this.resolver != null){
this.manager.release(this.resolver);
this.resolver = null;
}
throw new SourceException("Missing service dependency: " + this.refresherRole, se);
}
}
this.isInitialized = true;
}