// host name
hostName = findHostFromServiceMap(registryService, appName);
} catch (XmlException e) {
throw new GfacException(e, FaultCode.InitalizationError);
}
} else {
throw new GfacException("Service Map for " + context.getServiceName() + " does not found on resource Catalog " + registryService, FaultCode.InvalidRequest);
}
/*
* Determine provider
*/
if (GfacUtils.isLocalHost(hostName)) {
return new LocalProvider();
} else {
// set Security context for executionContext
if (context.getSecurityContext(GramProvider.MYPROXY_SECURITY_CONTEXT) != null) {
context.getExecutionContext().setSecurityContext(context.getSecurityContext(GramProvider.MYPROXY_SECURITY_CONTEXT));
} else {
throw new GfacException("Cannot get security context to run on Gram", FaultCode.InvalidRequest);
}
return new GramProvider();
}
}