public void updateApplicationDescriptor(String serviceName, String hostName, ApplicationDescription descriptor) throws RegistryException {
if (descriptorRegistry != null){
descriptorRegistry.updateApplicationDescriptor(serviceName, hostName, descriptor);
} else {
if (serviceName==null || hostName==null){
throw new InsufficientDataException("Service name or Host name cannot be null");
}
GatewayResource gateway = jpa.getGateway();
String applicationName = descriptor.getType().getApplicationName().getStringValue();
applicationName = createAppName(serviceName, hostName, applicationName);
if (!isApplicationDescriptorExists(serviceName,hostName,descriptor.getType().getApplicationName().getStringValue())){