public static AiravataRegistry2 acquireRegistry(ServletContext context) {
AiravataRegistry2 airavataRegistry=null;
String user = WorkflowContext.getRequestUser();
String gatewayId = WorkflowContext.getGatewayId();
Gateway gateway = new Gateway(gatewayId);
AiravataUser airavataUser = new AiravataUser(user);
/*RegistryInstancesPool registryInstancesPool =
(RegistryInstancesPool) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY_POOL);
Map<RegIdentifier,AiravataRegistry2> registryMap = registryInstancesPool.getRegistryInstancesList();
boolean foundReg=false;*/
try{