airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1520074 - /airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
Date Wed, 04 Sep 2013 17:18:15 GMT
Author: samindaw
Date: Wed Sep  4 17:18:15 2013
New Revision: 1520074

URL: http://svn.apache.org/r1520074
Log:
checking if the gateway is registered in airavata etc.

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

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java?rev=1520074&r1=1520073&r2=1520074&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
Wed Sep  4 17:18:15 2013
@@ -133,10 +133,10 @@ public class ResourceUtils {
         QueryGenerator generator = new QueryGenerator(AbstractResource.GATEWAY);
         generator.setParameter(AbstractResource.GatewayConstants.GATEWAY_NAME, gatewayName);
         Query q = generator.selectQuery(em);
-        Gateway gateway = (Gateway) q.getSingleResult();
+        int size = q.getResultList().size();
         em.getTransaction().commit();
         em.close();
-        return gateway != null;
+		return size>0;
     }
 
     /**



Mime
View raw message