}
}
}
// we are not processing in parallel and have no (valid) cached response
XMLSerializer serializer = null;
try {
final Source source = session.resolveURI(uri, this.resolver);
// stream directly (and cache the response)
if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Streaming directly from source.");
}
if (session.getExpires() > 0) {
serializer = (XMLSerializer)this.manager.lookup(XMLSerializer.ROLE);
XMLTeePipe tee = new XMLTeePipe(handler, serializer);
SourceUtil.toSAX(source, tee);
SourceValidity[] validities = new SourceValidity[1];
validities[0] = session.getExpiresValidity();
CachedResponse response = new CachedResponse(validities,
(byte[])serializer.getSAXFragment());
session.getCacheStorageProxy().put(uri, response);
} else {
SourceUtil.toSAX(source, handler);
}