final ServiceManager m = this.getComponentLocator();
Source source = null;
// search for a SourceFactory implementing the protocol
SourceFactory factory = null;
try {
factory = this.getSourceFactory(m, protocol);
systemID = this.absolutize(factory, baseURI, systemID);
if (getLogger().isDebugEnabled()) {
getLogger().debug("Resolved to systemID : " + systemID);
}
source = factory.getSource(systemID, parameters);
} catch (final ProcessingException ce) {
// no selector available, use fallback
} finally {
m.release(factory);
}
if (null == source) {
try {
factory = this.getSourceFactory(m, "*");
systemID = this.absolutize(factory, baseURI, systemID);
if (getLogger().isDebugEnabled()) {
getLogger().debug("Resolved to systemID : " + systemID);
}
source = factory.getSource(systemID, parameters);
} catch (ProcessingException se) {
throw new SourceException("Unable to select source factory for " + systemID, se);
} finally {
m.release(factory);
}