+ " does not found on resource Catalog " + registryService);
/*
* Load host
*/
HostDescription host = scheduleToHost(registryService, context.getServiceName());
if (host == null)
throw new SchedulerException("Host Desciption for " + context.getServiceName()
+ " does not found on resource Catalog " + registryService);
/*
* Load app
*/
ApplicationDescription app = null;
try {
app = registryService.getApplicationManager().getApplicationDescription(context.getServiceName(),
getRegisteredHost(registryService, context.getServiceName()).getType().getHostName());
} catch (AiravataAPIInvocationException e2) {
e2.printStackTrace();
}
if (app == null)
throw new SchedulerException("App Desciption for " + context.getServiceName()
+ " does not found on resource Catalog " + registryService);
/*
* Check class and binding
*/
if (context.getExecutionDescription() == null) {
context.setExecutionDescription(new DefaultExecutionDescription());
}
context.getExecutionDescription().setHost(host);
context.getExecutionDescription().setService(serviceDesc);
context.getExecutionDescription().setApp(app);
OMElement omSecurityContextHeader = context.getExecutionContext().getSecurityContextHeader();
ContextHeaderDocument document = null;
try {
if (omSecurityContextHeader != null) {
document = ContextHeaderDocument.Factory.parse(omSecurityContextHeader.toStringWithConsume());
}
} catch (XMLStreamException e) {
e.printStackTrace();
} catch (XmlException e) {
e.printStackTrace();
}
SecurityContextDocument.SecurityContext.AmazonWebservices amazonWebservices = null;
if (document != null) {
amazonWebservices = document.getContextHeader().getSecurityContext().getAmazonWebservices();
}
/*
* Determine provider
*/
String hostName = host.getType().getHostAddress();
try {
if (GfacUtils.isLocalHost(hostName)) {
return new LocalProvider();
} else if (amazonWebservices != null && hostName != null) {
log.info("host name: " + hostName);