airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1384448 - /incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
Date Thu, 13 Sep 2012 18:10:41 GMT
Author: lahiru
Date: Thu Sep 13 18:10:40 2012
New Revision: 1384448

URL: http://svn.apache.org/viewvc?rev=1384448&view=rev
Log:
fixing a issue in getServiceDescriptor and getDeploymntDescriptor methods.

Modified:
    incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java

Modified: incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java?rev=1384448&r1=1384447&r2=1384448&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
(original)
+++ incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
Thu Sep 13 18:10:40 2012
@@ -279,7 +279,7 @@ public class AiravataJPARegistry extends
     public HostDescription getHostDescriptor(String hostName) throws RegistryException {
         GatewayResource gateway = jpa.getGateway();
 		if (!isHostDescriptorExists(hostName)){
-        	throw new DescriptorDoesNotExistsException(hostName);
+        	return null;
         }
         HostDescriptorResource hostDescriptorResource = gateway.getHostDescriptorResource(hostName);
         return createHostDescriptor(hostDescriptorResource);
@@ -349,8 +349,8 @@ public class AiravataJPARegistry extends
 
     public ServiceDescription getServiceDescriptor(String serviceName) throws DescriptorDoesNotExistsException,
MalformedDescriptorException {
     	GatewayResource gateway = jpa.getGateway();
-		if (!gateway.isHostDescriptorExists(serviceName)){
-        	throw new DescriptorDoesNotExistsException(serviceName);
+		if (!gateway.isServiceDescriptorExists(serviceName)){
+        	return null;
         }
         ServiceDescriptorResource serviceDescriptorResource = gateway.getServiceDescriptorResource(serviceName);
         return createServiceDescriptor(serviceDescriptorResource);



Mime
View raw message