airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [2/2] git commit: adding more fixes for AIRAVATA-1285
Date Tue, 03 Jun 2014 15:29:39 GMT
adding more fixes for AIRAVATA-1285


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/8b5f2724
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/8b5f2724
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/8b5f2724

Branch: refs/heads/master
Commit: 8b5f2724eaab42297b943e78b01288b0a0dd7bbf
Parents: bf5f8c3
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Tue Jun 3 11:29:31 2014 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Tue Jun 3 11:29:31 2014 -0400

----------------------------------------------------------------------
 .../client/samples/CreateLaunchExperiment.java  |   2 +-
 .../persistance/registry/jpa/ResourceUtils.java |   7 --
 .../registry/jpa/impl/ExperimentRegistry.java   |   4 +-
 .../jpa/model/AdvancedInputDataHandling.java    |   3 +-
 .../jpa/model/AdvancedOutputDataHandling.java   |   3 +-
 .../registry/jpa/model/ApplicationInput.java    |   3 +-
 .../registry/jpa/model/ApplicationInput_PK.java |   4 +-
 .../registry/jpa/model/ApplicationOutput.java   |   3 +-
 .../jpa/model/ApplicationOutput_PK.java         |   4 +-
 .../jpa/model/Application_Descriptor.java       |   3 +-
 .../jpa/model/Application_Descriptor_PK.java    |   4 +-
 .../Computational_Resource_Scheduling.java      |   3 +-
 .../registry/jpa/model/Configuration_PK.java    |   4 +-
 .../registry/jpa/model/DataTransferDetail.java  |   3 +-
 .../registry/jpa/model/ErrorDetail.java         |   3 +-
 .../registry/jpa/model/Experiment.java          |   3 +-
 .../jpa/model/ExperimentConfigData.java         |   3 +-
 .../registry/jpa/model/Experiment_Input.java    |   3 +-
 .../registry/jpa/model/Experiment_Input_PK.java |   4 +-
 .../registry/jpa/model/Experiment_Output.java   |   3 +-
 .../jpa/model/Experiment_Output_PK.java         |   4 +-
 .../persistance/registry/jpa/model/Gateway.java |   3 +-
 .../registry/jpa/model/Gateway_Worker.java      |   3 +-
 .../registry/jpa/model/Gateway_Worker_PK.java   |   4 +-
 .../registry/jpa/model/Host_Descriptor.java     |   3 +-
 .../registry/jpa/model/Host_Descriptor_PK.java  |   4 +-
 .../registry/jpa/model/JobDetail.java           |   3 +-
 .../registry/jpa/model/JobDetails_PK.java       |   4 +-
 .../registry/jpa/model/NodeInput.java           |   3 +-
 .../registry/jpa/model/NodeInput_PK.java        |   4 +-
 .../registry/jpa/model/NodeOutput.java          |   3 +-
 .../registry/jpa/model/NodeOutput_PK.java       |   4 +-
 .../persistance/registry/jpa/model/Project.java |   3 +-
 .../registry/jpa/model/ProjectUser.java         |   3 +-
 .../registry/jpa/model/ProjectUser_PK.java      |   4 +-
 .../registry/jpa/model/Published_Workflow.java  |   3 +-
 .../jpa/model/Published_Workflow_PK.java        |   4 +-
 .../registry/jpa/model/QosParam.java            |   3 +-
 .../registry/jpa/model/Service_Descriptor.java  |   3 +-
 .../jpa/model/Service_Descriptor_PK.java        |   4 +-
 .../persistance/registry/jpa/model/Status.java  |   3 +-
 .../registry/jpa/model/TaskDetail.java          |   3 +-
 .../registry/jpa/model/User_Workflow.java       |   3 +-
 .../registry/jpa/model/User_Workflow_PK.java    |   4 +-
 .../persistance/registry/jpa/model/Users.java   |   3 +-
 .../registry/jpa/model/WorkflowNodeDetail.java  |   3 +-
 .../AdvanceInputDataHandlingResource.java       |   2 +-
 .../AdvancedOutputDataHandlingResource.java     |   1 +
 .../ApplicationDescriptorResource.java          |   4 +
 .../jpa/resources/ApplicationInputResource.java |   1 +
 .../ComputationSchedulingResource.java          |   1 +
 .../jpa/resources/ConfigDataResource.java       |   3 +-
 .../jpa/resources/ConfigurationResource.java    | 100 +++++--------------
 .../resources/DataTransferDetailResource.java   |   5 +-
 .../jpa/resources/ErrorDetailResource.java      |   3 +
 .../jpa/resources/ExperimentInputResource.java  |   1 +
 .../jpa/resources/ExperimentOutputResource.java |  68 ++++++-------
 .../jpa/resources/ExperimentResource.java       |  12 ++-
 .../registry/jpa/resources/GatewayResource.java |   4 +
 .../jpa/resources/HostDescriptorResource.java   |   7 +-
 .../jpa/resources/JobDetailResource.java        |   5 +-
 .../jpa/resources/NodeOutputResource.java       |   2 +-
 .../registry/jpa/resources/ProjectResource.java |   2 +
 .../jpa/resources/ProjectUserResource.java      |   1 +
 .../jpa/resources/PublishWorkflowResource.java  |  12 ++-
 .../jpa/resources/QosParamResource.java         |   1 +
 .../resources/ServiceDescriptorResource.java    |   7 +-
 .../registry/jpa/resources/StatusResource.java  |   1 +
 .../jpa/resources/TaskDetailResource.java       |   2 +
 .../registry/jpa/resources/UserResource.java    |   1 +
 .../jpa/resources/UserWorkflowResource.java     |   1 +
 .../registry/jpa/resources/WorkerResource.java  |  24 +++--
 .../resources/WorkflowNodeDetailResource.java   |   5 +-
 73 files changed, 243 insertions(+), 190 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 4493552..c8c9235 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -168,7 +168,7 @@ public class CreateLaunchExperiment {
 										// File | Settings | File Templates.
 			}
 
-            System.out.println(airavata.getExperimentStatus(expId));
+//            System.out.println(airavata.getExperimentStatus(expId));
             List<DataObjectType> output = airavata.getExperimentOutputs(expId);
             for (DataObjectType dataObjectType : output) {
                 System.out.println(dataObjectType.getKey() + " : " + dataObjectType.getType() + " : " + dataObjectType.getValue());

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
index 410a393..7d81c7b 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
@@ -44,8 +44,6 @@ public class ResourceUtils {
     private static final String PERSISTENCE_UNIT_NAME = "airavata_data";
     protected static EntityManagerFactory factory;
 
-    private static Lock lock = new ReentrantLock();
-
     public static void reset(){
     	factory=null;
     }
@@ -457,9 +455,4 @@ public class ResourceUtils {
             }
         }
     }
-
-    public static Lock getLock() {
-        return lock;
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index c390cc2..7a1823a 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -1633,8 +1633,8 @@ public class ExperimentRegistry {
             if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
                 WorkerResource resource = (WorkerResource)gatewayResource.create(ResourceType.GATEWAY_WORKER);
                 resource.setUser((String)value);
-//                List<ExperimentResource> resources = resource.getExperiments();
-                List<ExperimentResource> resources = resource.getExperimentsByCaching((String)value);
+                List<ExperimentResource> resources = resource.getExperiments();
+//                List<ExperimentResource> resources = resource.getExperimentsByCaching((String)value);
                 for (ExperimentResource experimentResource : resources) {
                     Experiment experiment = ThriftDataModelConversion.getExperiment(experimentResource);
                     experiments.add(experiment);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
index 4ed2f03..8f40f2d 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
@@ -24,11 +24,12 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name = "ADVANCE_INPUT_DATA_HANDLING")
-public class AdvancedInputDataHandling {
+public class AdvancedInputDataHandling implements Serializable {
     @Id
     @GeneratedValue
     @Column(name = "INPUT_DATA_HANDLING_ID")

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
index 6785246..d305f22 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
@@ -24,11 +24,12 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name = "ADVANCE_OUTPUT_DATA_HANDLING")
-public class AdvancedOutputDataHandling {
+public class AdvancedOutputDataHandling implements Serializable {
     @Id
     @GeneratedValue
     @Column(name = "OUTPUT_DATA_HANDLING_ID")

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
index 0b2a6de..38bb0a1 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name = "APPLICATION_INPUT")
 @IdClass(ApplicationInput_PK.class)
-public class ApplicationInput {
+public class ApplicationInput implements Serializable {
     @Id
     @Column(name = "TASK_ID")
     private String taskId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
index 476b2c7..e99cbd2 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class ApplicationInput_PK {
+import java.io.Serializable;
+
+public class ApplicationInput_PK implements Serializable {
     private String taskId;
     private String inputKey;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
index dbe7b08..a4547b2 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name = "APPLICATION_OUTPUT")
 @IdClass(ApplicationOutput_PK.class)
-public class ApplicationOutput {
+public class ApplicationOutput implements Serializable {
     @Id
     @Column(name = "TASK_ID")
     private String taskId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
index d046134..17a5021 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class ApplicationOutput_PK {
+import java.io.Serializable;
+
+public class ApplicationOutput_PK implements Serializable {
     private String taskId;
     private String outputKey;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor.java
index ee4b536..22a03de 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor.java
@@ -22,11 +22,12 @@
 package org.apache.airavata.persistance.registry.jpa.model;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @Entity
 @IdClass(Application_Descriptor_PK.class)
 @Table(name ="APPLICATION_DESCRIPTOR")
-public class Application_Descriptor {
+public class Application_Descriptor  implements Serializable {
     @Id
     @Column(name = "APPLICATION_DESCRIPTOR_ID")
     private String application_descriptor_ID;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor_PK.java
index ff13d2a..b54cb4f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Application_Descriptor_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class Application_Descriptor_PK {
+import java.io.Serializable;
+
+public class Application_Descriptor_PK implements Serializable {
     private String gateway_name;
     private String application_descriptor_ID;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
index eb96958..01c0bca 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @DataCache
 @Entity
 @Table(name = "COMPUTATIONAL_RESOURCE_SCHEDULING")
-public class Computational_Resource_Scheduling {
+public class Computational_Resource_Scheduling implements Serializable {
     @Id
     @GeneratedValue
     @Column(name = "RESOURCE_SCHEDULING_ID")

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
index 233dcf5..b58fd71 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class Configuration_PK {
+import java.io.Serializable;
+
+public class Configuration_PK implements Serializable {
     private String config_key;
     private String config_val;
     private String category_id;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
index dd14847..95ad0e9 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @DataCache
 @Entity
 @Table(name = "DATA_TRANSFER_DETAIL")
-public class DataTransferDetail {
+public class DataTransferDetail implements Serializable {
     @Id
     @Column(name = "TRANSFER_ID")
     private String transferId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
index 0e41c67..9d1d21e 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
@@ -25,12 +25,13 @@ import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
 
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @DataCache
 @Entity
 @Table(name = "ERROR_DETAIL")
-public class ErrorDetail {
+public class ErrorDetail implements Serializable {
     @Id
     @GeneratedValue
     @Column(name = "ERROR_ID")

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
index 25f119f..381efa8 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @Entity
 @Table(name = "EXPERIMENT")
 @DataCache
-public class Experiment {
+public class Experiment implements Serializable {
     @Id
     @Column(name = "EXPERIMENT_ID")
     private String expId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
index 1b2ee30..6ddbff7 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
@@ -24,11 +24,12 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name = "CONFIG_DATA")
-public class ExperimentConfigData {
+public class ExperimentConfigData implements Serializable {
     @Id
     @Column(name = "EXPERIMENT_ID")
     private String expId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
index fc50040..007cc1a 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name ="EXPERIMENT_INPUT")
 @IdClass(Experiment_Input_PK.class)
-public class Experiment_Input {
+public class Experiment_Input implements Serializable {
     @Id
     @Column(name = "EXPERIMENT_ID")
     private String experiment_id;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
index 355fc80..d8770e7 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class Experiment_Input_PK {
+import java.io.Serializable;
+
+public class Experiment_Input_PK implements Serializable {
     private String experiment_id;
     private String ex_key;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
index 33acd2d..1979aec 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name ="")
 @IdClass(Experiment_Output_PK.class)
-public class Experiment_Output {
+public class Experiment_Output  implements Serializable {
     @Id
     @Column(name = "EXPERIMENT_ID")
     private String experiment_id;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
index 797cd90..6fee94e 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class Experiment_Output_PK {
+import java.io.Serializable;
+
+public class Experiment_Output_PK implements Serializable {
     private String experiment_id;
     private String ex_key;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
index b141a6c..29ee028 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
@@ -26,11 +26,12 @@ import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Table;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name ="GATEWAY")
-public class Gateway {
+public class Gateway implements Serializable {
     @Id
     @Column(name = "GATEWAY_NAME")
     private String gateway_name;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
index fe11d56..018cdb4 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
@@ -23,12 +23,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name ="GATEWAY_WORKER")
 @IdClass(Gateway_Worker_PK.class)
-public class Gateway_Worker {
+public class Gateway_Worker implements Serializable {
     @Id
     @Column(name = "GATEWAY_NAME")
     private String gateway_name;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
index 8f3af02..81cbef8 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class Gateway_Worker_PK {
+import java.io.Serializable;
+
+public class Gateway_Worker_PK implements Serializable {
     private String gateway_name;
     private String user_name;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor.java
index 8fb8f6d..de1f2da 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor.java
@@ -21,11 +21,12 @@
 package org.apache.airavata.persistance.registry.jpa.model;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @Entity
 @Table(name ="HOST_DESCRIPTOR")
 @IdClass(Host_Descriptor_PK.class)
-public class Host_Descriptor {
+public class Host_Descriptor implements Serializable {
     @Id
     @Column(name = "HOST_DESCRIPTOR_ID")
     private String host_descriptor_ID;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor_PK.java
index 4cb61b2..5d56d5f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Host_Descriptor_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class Host_Descriptor_PK {
+import java.io.Serializable;
+
+public class Host_Descriptor_PK implements Serializable {
     private String gateway_name;
     private String host_descriptor_ID;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
index a65c1a5..c13fa2f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
@@ -24,13 +24,14 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @DataCache
 @Entity
 @Table(name = "JOB_DETAIL")
 @IdClass(JobDetails_PK.class)
-public class JobDetail {
+public class JobDetail implements Serializable {
     @Id
     @Column(name = "JOB_ID")
     private String jobId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
index bb1cf30..1247fb6 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class JobDetails_PK {
+import java.io.Serializable;
+
+public class JobDetails_PK implements Serializable {
     private String jobId;
     private String taskId;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
index f7864b4..9bfb917 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name = "NODE_INPUT")
 @IdClass(NodeInput_PK.class)
-public class NodeInput {
+public class NodeInput implements Serializable {
     @Id
     @Column(name = "NODE_INSTANCE_ID")
     private String nodeId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
index d7526db..9db1cbe 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class NodeInput_PK {
+import java.io.Serializable;
+
+public class NodeInput_PK implements Serializable {
     private String nodeId;
     private String inputKey;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
index 67cb080..15518ba 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name = "NODE_OUTPUT")
 @IdClass(NodeOutput_PK.class)
-public class NodeOutput {
+public class NodeOutput implements Serializable {
     @Id
     @Column(name = "NODE_INSTANCE_ID")
     private String nodeId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
index 0d2ae71..84fded8 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class NodeOutput_PK {
+import java.io.Serializable;
+
+public class NodeOutput_PK implements Serializable {
     private String nodeId;
     private String outputKey;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
index 0efd2d7..ef2cb3f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
@@ -23,12 +23,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @DataCache
 @Entity
 @Table(name ="PROJECT")
-public class Project {
+public class Project implements Serializable {
     @Id
     @Column(name = "PROJECT_ID")
     private String project_id;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
index b7f19e3..1509612 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
@@ -25,12 +25,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @IdClass(ProjectUser_PK.class)
 @Table(name = "PROJECT_USER")
-public class ProjectUser {
+public class ProjectUser implements Serializable {
     @Id
     @Column(name = "PROJECT_ID")
     private String projectID;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
index 695374e..4b1be3e 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class ProjectUser_PK {
+import java.io.Serializable;
+
+public class ProjectUser_PK implements Serializable {
     private String projectID;
     private String userName;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow.java
index 0702545..2e80b37 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow.java
@@ -21,12 +21,13 @@
 package org.apache.airavata.persistance.registry.jpa.model;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @Entity
 @Table(name ="PUBLISHED_WORKFLOW")
 @IdClass(Published_Workflow_PK.class)
-public class Published_Workflow {
+public class Published_Workflow implements Serializable {
 
     @Id
     @Column(name = "PUBLISH_WORKFLOW_NAME")

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow_PK.java
index f41bfba..1d5c0db 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Published_Workflow_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class Published_Workflow_PK {
+import java.io.Serializable;
+
+public class Published_Workflow_PK implements Serializable {
     private String gateway_name;
     private String publish_workflow_name;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
index fd9979b..a0dbfa0 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
@@ -24,11 +24,12 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name = "QOS_PARAMS")
-public class QosParam {
+public class QosParam implements Serializable {
     @Id
     @GeneratedValue
     @Column(name = "QOS_ID")

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor.java
index 736614d..ac0c872 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor.java
@@ -21,11 +21,12 @@
 package org.apache.airavata.persistance.registry.jpa.model;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @Entity
 @Table(name ="SERVICE_DESCRIPTOR")
 @IdClass(Service_Descriptor_PK.class)
-public class Service_Descriptor {
+public class Service_Descriptor implements Serializable {
     @Id
     @Column(name = "SERVICE_DESCRIPTOR_ID")
     private String service_descriptor_ID;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor_PK.java
index d8a480a..6952340 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Service_Descriptor_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class Service_Descriptor_PK {
+import java.io.Serializable;
+
+public class Service_Descriptor_PK  implements Serializable {
     private String gateway_name;
     private String service_descriptor_ID;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
index 2ac9435..4783af5 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @DataCache
 @Entity
 @Table(name = "STATUS")
-public class Status {
+public class Status implements Serializable {
     @Id
     @GeneratedValue
     @Column(name = "STATUS_ID")

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
index 8d6a1e9..7d3361d 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @DataCache
 @Entity
 @Table(name = "TASK_DETAIL")
-public class TaskDetail {
+public class TaskDetail implements Serializable {
     @Id
     @Column(name = "TASK_ID")
     private String taskId;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow.java
index 685689f..8aa3b4f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow.java
@@ -21,12 +21,13 @@
 package org.apache.airavata.persistance.registry.jpa.model;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @Entity
 @Table(name ="USER_WORKFLOW")
 @IdClass(User_Workflow_PK.class)
-public class User_Workflow {
+public class User_Workflow implements Serializable {
     @Id
     @Column(name = "GATEWAY_NAME")
     private String gateway_name;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow_PK.java
index d27cb6b..5fb75c3 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/User_Workflow_PK.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa.model;
 
-public class User_Workflow_PK {
+import java.io.Serializable;
+
+public class User_Workflow_PK implements Serializable {
     private String template_name;
     private String gateway_name;
     private String owner;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
index 7203117..9005985 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
@@ -23,11 +23,12 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 
 @DataCache
 @Entity
 @Table(name ="USERS")
-public class Users {
+public class Users implements Serializable {
 
     @Id
     @Column(name = "USER_NAME")

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
index 9c6daca..92a7691 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
@@ -24,12 +24,13 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
 @DataCache
 @Entity
 @Table(name = "WORKFLOW_NODE_DETAIL")
-public class WorkflowNodeDetail {
+public class WorkflowNodeDetail implements Serializable {
     @Column(name = "EXPERIMENT_ID")
     private String expId;
     @Id

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
index d38768c..d463cb8 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
@@ -152,7 +152,7 @@ public class AdvanceInputDataHandlingResource extends AbstractResource {
             em.persist(dataHandling);
             dataHandlingId = dataHandling.getDataHandlingId();
             em.getTransaction().commit();
-
+            em.close();
         }catch (Exception e){
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
index 7ff23c6..e6aa9f4 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
@@ -143,6 +143,7 @@ public class AdvancedOutputDataHandlingResource extends AbstractResource {
             em.persist(dataHandling);
             outputDataHandlingId = dataHandling.getOutputDataHandlingId();
             em.getTransaction().commit();
+            em.close();
         }catch (Exception e){
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationDescriptorResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationDescriptorResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationDescriptorResource.java
index 1901172..f8ad51d 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationDescriptorResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationDescriptorResource.java
@@ -227,6 +227,7 @@ public class ApplicationDescriptorResource extends AbstractResource {
             Gateway gateway = em.find(Gateway.class, gatewayName);
             Users user = em.find(Users.class, updatedUser);
             applicationDescriptor.setGateway(gateway);
+            applicationDescriptor.setGateway_name(gateway.getGateway_name());
             applicationDescriptor.setUser(user);
             byte[] contentBytes = content.getBytes();
             applicationDescriptor.setApplication_descriptor_xml(contentBytes);
@@ -234,6 +235,8 @@ public class ApplicationDescriptorResource extends AbstractResource {
             applicationDescriptor.setHost_descriptor_ID(hostDescName);
             if (existingAppDesc != null) {
                 existingAppDesc.setUser(user);
+                existingAppDesc.setGateway(gateway);
+                existingAppDesc.setGateway_name(gateway.getGateway_name());
                 existingAppDesc.setApplication_descriptor_xml(contentBytes);
                 existingAppDesc.setHost_descriptor_ID(hostDescName);
                 existingAppDesc.setService_descriptor_ID(serviceDescName);
@@ -242,6 +245,7 @@ public class ApplicationDescriptorResource extends AbstractResource {
                 em.persist(applicationDescriptor);
             }
             em.getTransaction().commit();
+            em.close();
         } catch (Exception e){
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
index 9a9786b..686e4bf 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
@@ -138,6 +138,7 @@ public class ApplicationInputResource extends AbstractResource {
                 em.persist(applicationInput);
             }
             em.getTransaction().commit();
+            em.close();
         } catch (Exception e) {
             throw new RegistryException(e.getMessage());
         } finally {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
index 97a8a81..57a5f33 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
@@ -203,6 +203,7 @@ public class ComputationSchedulingResource extends AbstractResource {
             em.persist(scheduling);
             schedulingId = scheduling.getSchedulingId();
             em.getTransaction().commit();
+            em.close();
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
index b972e4f..643d9c5 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
@@ -121,9 +121,10 @@ public class ConfigDataResource extends AbstractResource {
                 existingConfig.setShareExp(shareExp);
                 configData = em.merge(existingConfig);
             } else {
-                em.merge(configData);
+                em.persist(configData);
             }
             em.getTransaction().commit();
+            em.close();
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
index 8da1089..0184d1c 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
@@ -49,7 +49,6 @@ public class ConfigurationResource extends AbstractResource {
     }
 
     /**
-     *
      * @param configKey configuration key
      * @param configVal configuration value
      */
@@ -61,6 +60,7 @@ public class ConfigurationResource extends AbstractResource {
     /**
      * Since Configuration does not depend on any other data structures at the
      * system, this method is not valid
+     *
      * @param type child resource types
      * @return UnsupportedOperationException
      */
@@ -74,11 +74,12 @@ public class ConfigurationResource extends AbstractResource {
     /**
      * Since Configuration does not depend on any other data structures at the
      * system, this method is not valid
+     *
      * @param type child resource types
-     * @param name  name of the child resource
-     * throws UnsupportedOperationException
+     * @param name name of the child resource
+     *             throws UnsupportedOperationException
      */
-    public void remove(ResourceType type, Object name) throws RegistryException{
+    public void remove(ResourceType type, Object name) throws RegistryException {
         logger.error("Unsupported operation for configuration resource " +
                 "since there are no child resources generated by configuration resource.. ",
                 new UnsupportedOperationException());
@@ -89,11 +90,12 @@ public class ConfigurationResource extends AbstractResource {
     /**
      * Since Configuration does not depend on any other data structures at the
      * system, this method is not valid
+     *
      * @param type child resource types
-     * @param name  name of the child resource
+     * @param name name of the child resource
      * @return UnsupportedOperationException
      */
-    public Resource get(ResourceType type, Object name) throws RegistryException{
+    public Resource get(ResourceType type, Object name) throws RegistryException {
         logger.error("Unsupported operation for configuration resource " +
                 "since there are no child resources generated by configuration resource.. ",
                 new UnsupportedOperationException());
@@ -101,49 +103,13 @@ public class ConfigurationResource extends AbstractResource {
     }
 
     /**
-     * key should be the configuration name
-     * @param keys names
-     * @return list of ConfigurationResources
-     */
-    public List<Resource> populate(Object[] keys) throws RegistryException{
-        List<Resource> list = new ArrayList<Resource>();
-        EntityManager em = ResourceUtils.getEntityManager();
-        em.getTransaction().begin();
-        QueryGenerator queryGenerator = new QueryGenerator(CONFIGURATION);
-        queryGenerator.setParameter(ConfigurationConstants.CONFIG_KEY, keys[0]);
-        Query q = queryGenerator.selectQuery(em);
-        List resultList = q.getResultList();
-        if (resultList.size() != 0) {
-            for (Object result : resultList) {
-                Configuration configuration = (Configuration) result;
-                ConfigurationResource configurationResource =
-                        (ConfigurationResource)Utils.getResource(ResourceType.CONFIGURATION, configuration);
-                list.add(configurationResource);
-            }
-        }
-        em.getTransaction().commit();
-        try {
-            em.close();
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em.isOpen()){
-                em.close();
-            }
-        }
-        return list;
-
-    }
-
-    /**
-     *
      * Since Configuration does not depend on any other data structures at the
      * system, this method is not valid
+     *
      * @param type child resource types
      * @return UnsupportedOperationException
      */
-    public List<Resource> get(ResourceType type) throws RegistryException{
+    public List<Resource> get(ResourceType type) throws RegistryException {
         logger.error("Unsupported operation for configuration resource " +
                 "since there are no child resources generated by configuration resource.. ",
                 new UnsupportedOperationException());
@@ -151,7 +117,6 @@ public class ConfigurationResource extends AbstractResource {
     }
 
     /**
-     *
      * @param expireDate expire date of the configuration
      */
     public void setExpireDate(Timestamp expireDate) {
@@ -159,26 +124,15 @@ public class ConfigurationResource extends AbstractResource {
     }
 
     /**
-     *  save configuration to database
+     * save configuration to database
      */
-    public synchronized void save() throws RegistryException{
-        Lock lock = ResourceUtils.getLock();
-        lock.lock();
+    public synchronized void save() throws RegistryException {
+        EntityManager em = null;
         try {
-            EntityManager em = ResourceUtils.getEntityManager();
+            em = ResourceUtils.getEntityManager();
             //whether existing
             Configuration existing = em.find(Configuration.class, new Configuration_PK(configKey, configVal, categoryID));
-            try {
-                em.close();
-            }catch (Exception e){
-                logger.error(e.getMessage(), e);
-                throw new RegistryException(e);
-            }finally {
-                if (em.isOpen()){
-                    em.close();
-                }
-            }
-
+            em.close();
             em = ResourceUtils.getEntityManager();
             em.getTransaction().begin();
             Configuration configuration = new Configuration();
@@ -191,29 +145,24 @@ public class ConfigurationResource extends AbstractResource {
                 existing.setCategory_id(categoryID);
                 configuration = em.merge(existing);
             } else {
-                em.merge(configuration);
+                em.persist(configuration);
             }
-
             em.getTransaction().commit();
-            try {
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
                 em.close();
-            }catch (Exception e){
-                logger.error(e.getMessage(), e);
-                throw new RegistryException(e);
-            }finally {
-                if (em.isOpen()){
-                    em.close();
-                }
             }
         }
-        finally {
-            lock.unlock();
-        }
     }
 
     /**
      * Since Configuration does not depend on any other data structures at the
      * system, this method is not valid
+     *
      * @param type child resource types
      * @param name of the child resource
      * @return UnsupportedOperationException
@@ -226,7 +175,6 @@ public class ConfigurationResource extends AbstractResource {
     }
 
     /**
-     *
      * @return configuration value
      */
     public String getConfigVal() {
@@ -234,7 +182,6 @@ public class ConfigurationResource extends AbstractResource {
     }
 
     /**
-     *
      * @param configKey configuration key
      */
     public void setConfigKey(String configKey) {
@@ -242,7 +189,6 @@ public class ConfigurationResource extends AbstractResource {
     }
 
     /**
-     *
      * @param configVal configuration value
      */
     public void setConfigVal(String configVal) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
index 20ded67..4ea4515 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
@@ -111,6 +111,7 @@ public class DataTransferDetailResource extends AbstractResource {
                     break;
             }
             em.getTransaction().commit();
+            em.close();
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);
@@ -186,6 +187,7 @@ public class DataTransferDetailResource extends AbstractResource {
                     throw new UnsupportedOperationException();
             }
             em.getTransaction().commit();
+            em.close();
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);
@@ -226,9 +228,10 @@ public class DataTransferDetailResource extends AbstractResource {
                 }
                 dataTransferDetail = em.merge(existingDF);
             } else {
-                em.merge(dataTransferDetail);
+                em.persist(dataTransferDetail);
             }
             em.getTransaction().commit();
+            em.close();
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
index 7407efa..07ffaac 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
@@ -185,11 +185,13 @@ public class ErrorDetailResource extends AbstractResource {
             if (taskDetailResource != null) {
                 TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
                 errorDetail.setTask(taskDetail);
+                errorDetail.setTaskId(taskDetail.getTaskId());
             }
 
             if (nodeDetail != null) {
                 WorkflowNodeDetail workflowNodeDetail = em.find(WorkflowNodeDetail.class, nodeDetail.getNodeInstanceId());
                 errorDetail.setNodeDetails(workflowNodeDetail);
+                errorDetail.setNodeId(workflowNodeDetail.getNodeId());
             }
             errorDetail.setCreationTime(creationTime);
             errorDetail.setActualErrorMsg(actualErrorMsg.toCharArray());
@@ -202,6 +204,7 @@ public class ErrorDetailResource extends AbstractResource {
             em.persist(errorDetail);
             errorId = errorDetail.getErrorID();
             em.getTransaction().commit();
+            em.close();
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
index 4c7dd9c..bb9e980 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
@@ -133,6 +133,7 @@ public class ExperimentInputResource extends AbstractResource {
                 em.persist(exInput);
             }
             em.getTransaction().commit();
+            em.close();
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8b5f2724/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
index fb40abf..28e2640 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
@@ -103,50 +103,42 @@ public class ExperimentOutputResource extends AbstractResource {
         throw new UnsupportedOperationException();
     }
 
-    public void save() throws RegistryException{
-        EntityManager em = ResourceUtils.getEntityManager();
-        Experiment_Output existingOutput = em.find(Experiment_Output.class, new Experiment_Output_PK(experimentResource.getExpID(), experimentKey));
+    public void save() throws RegistryException {
+        EntityManager em = null;
         try {
+            em = ResourceUtils.getEntityManager();
+            Experiment_Output existingOutput = em.find(Experiment_Output.class, new Experiment_Output_PK(experimentResource.getExpID(), experimentKey));
             em.close();
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em.isOpen()){
-                em.close();
-            }
-        }
 
-        em = ResourceUtils.getEntityManager();
-        em.getTransaction().begin();
-        Experiment_Output exOutput = new Experiment_Output();
-        exOutput.setEx_key(experimentKey);
-        Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-        exOutput.setExperiment(experiment);
-        exOutput.setExperiment_id(experiment.getExpId());
-        exOutput.setValue(value);
-        exOutput.setOutputKeyType(outputType);
-        exOutput.setMetadata(metadata);
-
-        if (existingOutput != null){
-            existingOutput.setEx_key(experimentKey);
-            existingOutput.setExperiment(experiment);
-            existingOutput.setValue(value);
-            existingOutput.setExperiment_id(experiment.getExpId());
-            existingOutput.setOutputKeyType(outputType);
-            existingOutput.setMetadata(metadata);
-            exOutput = em.merge(existingOutput);
-        }else {
-            em.persist(exOutput);
-        }
-        em.getTransaction().commit();
-        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Experiment_Output exOutput = new Experiment_Output();
+            exOutput.setEx_key(experimentKey);
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            exOutput.setExperiment(experiment);
+            exOutput.setExperiment_id(experiment.getExpId());
+            exOutput.setValue(value);
+            exOutput.setOutputKeyType(outputType);
+            exOutput.setMetadata(metadata);
+
+            if (existingOutput != null) {
+                existingOutput.setEx_key(experimentKey);
+                existingOutput.setExperiment(experiment);
+                existingOutput.setValue(value);
+                existingOutput.setExperiment_id(experiment.getExpId());
+                existingOutput.setOutputKeyType(outputType);
+                existingOutput.setMetadata(metadata);
+                exOutput = em.merge(existingOutput);
+            } else {
+                em.persist(exOutput);
+            }
+            em.getTransaction().commit();
             em.close();
-        }catch (Exception e){
+        } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);
-        }finally {
-            if (em.isOpen()){
+        } finally {
+            if (em != null && em.isOpen()) {
                 em.close();
             }
         }


Mime
View raw message