private void computeDependencies(DeploymentManifest manifest) {
if (manifest == null)
computeDependencies(getSubsystemManifest());
else {
ProvisionResourceHeader header = manifest.getProvisionResourceHeader();
if (header == null)
return;
for (ProvisionResourceHeader.Clause clause : header.getClauses()) {
Resource resource = findDependency(clause);
if (resource == null)
throw new SubsystemException("Resource does not exist: " + clause);
addDependency(resource);
}