airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1373977 - in /incubator/airavata/trunk/modules: commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/ registry-migrator/src/main/java/org/apache/airavata/migrator/registry/
Date Thu, 16 Aug 2012 18:53:55 GMT
Author: lahiru
Date: Thu Aug 16 18:53:55 2012
New Revision: 1373977

URL: http://svn.apache.org/viewvc?rev=1373977&view=rev
Log:
Applying patch given by Bhathiya for issue https://issues.apache.org/jira/browse/AIRAVATA-541.

Modified:
    incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java
    incubator/airavata/trunk/modules/registry-migrator/src/main/java/org/apache/airavata/migrator/registry/XRegistryMigrationManager.java

Modified: incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java?rev=1373977&r1=1373976&r2=1373977&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java
(original)
+++ incubator/airavata/trunk/modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/impl/AiravataJCRRegistry.java
Thu Aug 16 18:53:55 2012
@@ -177,7 +177,9 @@ public class AiravataJCRRegistry extends
             Node node = serviceNode.getNode(serviceId);
             Property prop = node.getProperty(XML_PROPERTY_NAME);
             result = ServiceDescription.fromXML(prop.getString());
-            } catch (Exception e) {
+        } catch (PathNotFoundException e) {
+            return null;
+        } catch (Exception e) {
             throw new ServiceDescriptionRetrieveException(e);
         } finally {
             closeSession(session);
@@ -229,25 +231,6 @@ public class AiravataJCRRegistry extends
         }
     }
 
-    public ServiceDescription getServiceDesc(String serviceId) throws ServiceDescriptionRetrieveException
{
-        Session session = null;
-        ServiceDescription result = null;
-        try {
-            session = getSession();
-            Node serviceNode = getServiceNode(session);
-            Node node = serviceNode.getNode(serviceId);
-            Property prop = node.getProperty(XML_PROPERTY_NAME);
-            result = ServiceDescription.fromXML(prop.getString());
-        } catch (PathNotFoundException e) {
-            return null;
-        } catch (Exception e) {
-            throw new ServiceDescriptionRetrieveException(e);
-        } finally {
-            closeSession(session);
-        }
-        return result;
-    }
-
     public HostDescription getHostDescription(String hostId) throws RegistryException {
         Session session = null;
         HostDescription result = null;

Modified: incubator/airavata/trunk/modules/registry-migrator/src/main/java/org/apache/airavata/migrator/registry/XRegistryMigrationManager.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/registry-migrator/src/main/java/org/apache/airavata/migrator/registry/XRegistryMigrationManager.java?rev=1373977&r1=1373976&r2=1373977&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/registry-migrator/src/main/java/org/apache/airavata/migrator/registry/XRegistryMigrationManager.java
(original)
+++ incubator/airavata/trunk/modules/registry-migrator/src/main/java/org/apache/airavata/migrator/registry/XRegistryMigrationManager.java
Thu Aug 16 18:53:55 2012
@@ -241,7 +241,7 @@ public class XRegistryMigrationManager {
 
             try {
                 String serviceName = serviceBean.getServiceName();
-                ServiceDescription serviceDescription = jcrRegistry.getServiceDesc(serviceName);
+                ServiceDescription serviceDescription = jcrRegistry.getServiceDescription(serviceName);
                 if(serviceDescription == null) {
                     service = MigrationUtil.createServiceDescription(serviceBean);
                     jcrRegistry.saveServiceDescription(service);



Mime
View raw message