airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1384545 - in /incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa: impl/AiravataJPARegistry.java resources/ServiceDescriptorResource.java
Date Thu, 13 Sep 2012 21:24:45 GMT
Author: lahiru
Date: Thu Sep 13 21:24:45 2012
New Revision: 1384545

URL: http://svn.apache.org/viewvc?rev=1384545&view=rev
Log:
fixing data retrieving issues in jpa implementation.

Modified:
    incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
    incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ServiceDescriptorResource.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=1384545&r1=1384544&r2=1384545&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 21:24:45 2012
@@ -39,6 +39,8 @@ import org.apache.airavata.commons.gfac.
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.persistance.registry.jpa.JPAResourceAccessor;
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.resources.ApplicationDescriptorResource;
 import org.apache.airavata.persistance.registry.jpa.resources.ConfigurationResource;
@@ -489,7 +491,9 @@ public class AiravataJPARegistry extends
     	if (!isApplicationDescriptorExists(serviceName,hostName,applicationName)){
 			throw new DescriptorDoesNotExistsException(appName);
 		}
-		gateway.removeApplicationDescriptor(appName);
+        ApplicationDescriptorResource applicationDescriptorResource = (ApplicationDescriptorResource)gateway.create(ResourceType.APPLICATION_DESCRIPTOR);
+        String[] strings = {gateway.getGatewayName(), appName, hostName, serviceName};
+        applicationDescriptorResource.removeMe(strings);
     }
 
     public ResourceMetadata getApplicationDescriptorMetadata(String serviceName, String hostName,
String applicationName) throws UnimplementedRegistryOperationException {

Modified: incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ServiceDescriptorResource.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ServiceDescriptorResource.java?rev=1384545&r1=1384544&r2=1384545&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ServiceDescriptorResource.java
(original)
+++ incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ServiceDescriptorResource.java
Thu Sep 13 21:24:45 2012
@@ -156,7 +156,7 @@ public class ServiceDescriptorResource e
             em.merge(serviceDescriptor);
         }
         em.getTransaction().commit();
-        em.close();
+         em.close();
 
     }
 



Mime
View raw message