airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1520668 - /airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
Date Fri, 06 Sep 2013 19:09:30 GMT
Author: samindaw
Date: Fri Sep  6 19:09:29 2013
New Revision: 1520668

URL: http://svn.apache.org/r1520668
Log:
rearranging the gateway id validation test after db validation

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

Modified: 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/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java?rev=1520668&r1=1520667&r2=1520668&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
(original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
Fri Sep  6 19:09:29 2013
@@ -151,9 +151,6 @@ public class AiravataJPARegistry extends
     
     @Override
     protected void initialize() throws RegistryException {
-    	if (!ResourceUtils.isGatewayExist(getGateway().getGatewayName())){
-    		throw new GatewayNotRegisteredException(getGateway().getGatewayName());
-    	}
     	jpa = new JPAResourceAccessor(this);
     	//TODO check if the db connections are proper & accessible & the relevant db/tables
are
     	//present
@@ -190,6 +187,9 @@ public class AiravataJPARegistry extends
             throw new RegistryAPIVersionIncompatibleException("Incompatible registry versions.
Please check whether you updated the API and Registry " +
                     "versions.");
         }
+        if (!ResourceUtils.isGatewayExist(getGateway().getGatewayName())){
+    		throw new GatewayNotRegisteredException(getGateway().getGatewayName());
+    	}
     }
 
     static {



Mime
View raw message