airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [2/3] airavata git commit: fixing JPA issues
Date Fri, 02 Oct 2015 15:33:58 GMT
fixing JPA issues


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

Branch: refs/heads/master
Commit: bb43bfdd5d2e7927de9614320002d6fc27492c57
Parents: 4cf30ee
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Fri Oct 2 11:33:10 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Fri Oct 2 11:33:10 2015 -0400

----------------------------------------------------------------------
 .../apache/airavata/gfac/core/GFacUtils.java    | 22 ++++-
 .../airavata/gfac/impl/GFacEngineImpl.java      | 44 +++++++---
 .../apache/airavata/gfac/impl/GFacWorker.java   |  9 ++-
 .../impl/task/SSHForkJobSubmissionTask.java     |  1 +
 .../gfac/impl/task/SSHJobSubmissionTask.java    | 12 +++
 .../gfac/monitor/email/EmailBasedMonitor.java   |  6 ++
 .../experiment/catalog/ExpCatResourceUtils.java | 18 ++---
 .../experiment/catalog/model/Experiment.java    | 12 ---
 .../catalog/model/ExperimentError.java          |  6 --
 .../catalog/model/ExperimentInput.java          | 11 ---
 .../catalog/model/ExperimentOutput.java         |  9 ---
 .../catalog/model/ExperimentStatus.java         |  4 -
 .../catalog/model/ExperimentSummary.java        | 11 ---
 .../core/experiment/catalog/model/Gateway.java  |  4 -
 .../experiment/catalog/model/GatewayWorker.java |  1 -
 .../core/experiment/catalog/model/Job.java      |  7 --
 .../experiment/catalog/model/JobStatus.java     |  4 -
 .../core/experiment/catalog/model/Process.java  | 13 ---
 .../experiment/catalog/model/ProcessError.java  |  7 --
 .../experiment/catalog/model/ProcessInput.java  | 11 ---
 .../experiment/catalog/model/ProcessOutput.java |  8 --
 .../catalog/model/ProcessResourceSchedule.java  |  8 --
 .../experiment/catalog/model/ProcessStatus.java |  4 -
 .../core/experiment/catalog/model/Project.java  |  6 --
 .../experiment/catalog/model/ProjectUser.java   |  1 -
 .../core/experiment/catalog/model/Task.java     |  7 --
 .../experiment/catalog/model/TaskError.java     |  6 --
 .../experiment/catalog/model/TaskStatus.java    |  4 -
 .../catalog/model/UserConfigurationData.java    | 14 ----
 .../core/experiment/catalog/model/Users.java    |  2 -
 .../resources/ExperimentErrorResource.java      | 14 +++-
 .../resources/ExperimentInputResource.java      | 14 +++-
 .../resources/ExperimentOutputResource.java     | 14 +++-
 .../catalog/resources/ExperimentResource.java   | 78 +++++++++++++++---
 .../resources/ExperimentStatusResource.java     | 14 +++-
 .../catalog/resources/JobResource.java          | 42 ++++++++--
 .../catalog/resources/JobStatusResource.java    | 14 +++-
 .../catalog/resources/ProcessErrorResource.java | 14 +++-
 .../catalog/resources/ProcessInputResource.java | 14 +++-
 .../resources/ProcessOutputResource.java        | 14 +++-
 .../catalog/resources/ProcessResource.java      | 84 +++++++++++++++++---
 .../ProcessResourceScheduleResource.java        | 14 +++-
 .../resources/ProcessStatusResource.java        | 14 +++-
 .../catalog/resources/TaskErrorResource.java    | 14 +++-
 .../catalog/resources/TaskResource.java         | 49 ++++++++++--
 .../catalog/resources/TaskStatusResource.java   | 14 +++-
 .../UserConfigurationDataResource.java          | 14 +++-
 .../catalog/utils/QueryGenerator.java           |  6 +-
 .../utils/ThriftDataModelConversion.java        | 32 ++++++--
 49 files changed, 485 insertions(+), 260 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index 571293a..128edae 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -240,7 +240,11 @@ public class GFacUtils {
 			JobStatus jobStatus = jobModel.getJobStatus();
             ExperimentCatalog experimentCatalog = processContext.getExperimentCatalog();
             jobModel.setJobStatus(jobStatus);
-            jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+            if (jobStatus.getTimeOfStateChange() == 0 || jobStatus.getTimeOfStateChange() > 0 ){
+                jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+            }else {
+                jobStatus.setTimeOfStateChange(jobStatus.getTimeOfStateChange());
+            }
             CompositeIdentifier ids = new CompositeIdentifier(jobModel.getProcessId(), jobModel.getJobId());
 			experimentCatalog.add(ExpCatChildDataType.JOB_STATUS, jobStatus, ids);
             JobIdentifier identifier = new JobIdentifier(jobModel.getJobId(), jobModel.getTaskId(),
@@ -264,7 +268,11 @@ public class GFacUtils {
 	        ProcessContext processContext = taskContext.getParentProcessContext();
 	        ExperimentCatalog experimentCatalog = processContext.getExperimentCatalog();
 	        TaskStatus status = taskContext.getTaskStatus();
-	        status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+            if (status.getTimeOfStateChange() == 0 || status.getTimeOfStateChange() > 0 ){
+                status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+            }else {
+                status.setTimeOfStateChange(status.getTimeOfStateChange());
+            }
 	        experimentCatalog.add(ExpCatChildDataType.TASK_STATUS, status, taskContext.getTaskId());
 	        TaskIdentifier identifier = new TaskIdentifier(taskContext.getTaskId(),
 			        processContext.getProcessId(), processContext.getProcessModel().getExperimentId(),
@@ -286,7 +294,11 @@ public class GFacUtils {
             // first we save job jobModel to the registry for sa and then save the job status.
             ExperimentCatalog experimentCatalog = processContext.getExperimentCatalog();
             ProcessStatus status = processContext.getProcessStatus();
-            status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+            if (status.getTimeOfStateChange() == 0 || status.getTimeOfStateChange() > 0 ){
+                status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+            }else {
+                status.setTimeOfStateChange(status.getTimeOfStateChange());
+            }
             experimentCatalog.add(ExpCatChildDataType.PROCESS_STATUS, status, processContext.getProcessId());
             ProcessIdentifier identifier = new ProcessIdentifier(processContext.getProcessId(),
                                                                  processContext.getProcessModel().getExperimentId(),
@@ -1156,13 +1168,15 @@ public class GFacUtils {
 		if (processContext.isCancel()) {
 			ProcessStatus pStatus = new ProcessStatus(ProcessState.CANCELLING);
 			pStatus.setReason("Process Cancel triggered");
+			pStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 			processContext.setProcessStatus(pStatus);
 			saveAndPublishProcessStatus(processContext);
 			// do cancel operation here
 
 			pStatus.setState(ProcessState.CANCELED);
 			processContext.setProcessStatus(pStatus);
-			saveAndPublishProcessStatus(processContext);
+            pStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+            saveAndPublishProcessStatus(processContext);
 		}else if (processContext.isHandOver()) {
 
 		} else {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
index 371642c..e7ff647 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
@@ -185,7 +185,9 @@ public class GFacEngineImpl implements GFacEngine {
 		}
 		TaskContext taskCtx;
 		TaskStatus taskStatus;
-		processContext.setProcessStatus(new ProcessStatus(ProcessState.EXECUTING));
+        ProcessStatus status = new ProcessStatus(ProcessState.EXECUTING);
+        status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        processContext.setProcessStatus(status);
 		JobSubmissionTask jobSubmissionTask = Factory.getJobSubmissionTask(processContext.getJobSubmissionProtocol());
 		if (processContext.isInterrupted()) {
 			GFacUtils.handleProcessInterrupt(processContext);
@@ -229,7 +231,9 @@ public class GFacEngineImpl implements GFacEngine {
 		}
 		TaskContext taskCtx;
 		TaskStatus taskStatus;// execute process inputs
-		processContext.setProcessStatus(new ProcessStatus(ProcessState.INPUT_DATA_STAGING));
+        ProcessStatus status = new ProcessStatus(ProcessState.INPUT_DATA_STAGING);
+        status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        processContext.setProcessStatus(status);
 		GFacUtils.saveAndPublishProcessStatus(processContext);
 		List<InputDataObjectType> processInputs = processContext.getProcessModel().getProcessInputs();
 		sortByInputOrder(processInputs);
@@ -294,15 +298,17 @@ public class GFacEngineImpl implements GFacEngine {
 			return true;
 		}
 		TaskContext taskCtx;
-		processContext.setProcessStatus(new ProcessStatus(ProcessState.CONFIGURING_WORKSPACE));
+        ProcessStatus status = new ProcessStatus(ProcessState.CONFIGURING_WORKSPACE);
+        status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        processContext.setProcessStatus(status);
 		GFacUtils.saveAndPublishProcessStatus(processContext);
 		// Run all environment setup tasks
 		taskCtx = getEnvSetupTaskContext(processContext);
 		saveTaskModel(taskCtx);
-		GFacUtils.saveAndPublishTaskStatus(taskCtx);
 		SSHEnvironmentSetupTask envSetupTask = new SSHEnvironmentSetupTask();
-		TaskStatus taskStatus = executeTask(taskCtx, envSetupTask, recover);
-		if (taskStatus.getState() == TaskState.FAILED) {
+        TaskStatus taskStatus = executeTask(taskCtx, envSetupTask, recover);
+        GFacUtils.saveAndPublishTaskStatus(taskCtx);
+        if (taskStatus.getState() == TaskState.FAILED) {
 			log.error("expId: {}, processId: {}, taskId: {} type: {},:- Input staging failed, " +
 					"reason:" + " {}", taskCtx.getParentProcessContext().getExperimentId(), taskCtx
 					.getParentProcessContext().getProcessId(), taskCtx.getTaskId(), envSetupTask.getType
@@ -384,7 +390,9 @@ public class GFacEngineImpl implements GFacEngine {
 	 * @throws GFacException
 	 */
 	private boolean postProcessing(ProcessContext processContext, boolean recovery) throws GFacException {
-		processContext.setProcessStatus(new ProcessStatus(ProcessState.POST_PROCESSING));
+        ProcessStatus status = new ProcessStatus(ProcessState.POST_PROCESSING);
+        status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        processContext.setProcessStatus(status);
 		GFacUtils.saveAndPublishProcessStatus(processContext);
 //		taskCtx = getEnvCleanupTaskContext(processContext);
 		if (processContext.isInterrupted()) {
@@ -403,7 +411,9 @@ public class GFacEngineImpl implements GFacEngine {
 	 */
 	private boolean outputDataStaging(ProcessContext processContext, boolean recovery) throws GFacException {
 		TaskContext taskCtx;
-		processContext.setProcessStatus(new ProcessStatus(ProcessState.OUTPUT_DATA_STAGING));
+        ProcessStatus status = new ProcessStatus(ProcessState.OUTPUT_DATA_STAGING);
+        status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        processContext.setProcessStatus(status);
 		GFacUtils.saveAndPublishProcessStatus(processContext);
         File localWorkingdir = new File(processContext.getLocalWorkingDir());
         localWorkingdir.mkdirs(); // make local dir if not exist
@@ -479,7 +489,9 @@ public class GFacEngineImpl implements GFacEngine {
 	}
 
 	private TaskStatus executeTask(TaskContext taskCtx, Task task, boolean recover) throws GFacException {
-		taskCtx.setTaskStatus(new TaskStatus(TaskState.EXECUTING));
+        TaskStatus status = new TaskStatus(TaskState.EXECUTING);
+        status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        taskCtx.setTaskStatus(status);
 		GFacUtils.saveAndPublishTaskStatus(taskCtx);
 		TaskStatus taskStatus = null;
 		if (recover) {
@@ -487,6 +499,7 @@ public class GFacEngineImpl implements GFacEngine {
 		} else {
 			taskStatus = task.execute(taskCtx);
 		}
+        taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 		taskCtx.setTaskStatus(taskStatus);
 		GFacUtils.saveAndPublishTaskStatus(taskCtx);
 		return taskCtx.getTaskStatus();
@@ -501,6 +514,7 @@ public class GFacEngineImpl implements GFacEngine {
 				monitorService.stopMonitor(taskContext.getParentProcessContext().getJobModel().getJobId(), true);
 				JobStatus newJobStatus = new JobStatus(JobState.CANCELED);
 				newJobStatus.setReason("Job cancelled");
+                newJobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 				taskContext.getParentProcessContext().getJobModel().setJobStatus(newJobStatus);
 				GFacUtils.saveJobStatus(taskContext.getParentProcessContext(), taskContext.getParentProcessContext()
 						.getJobModel());
@@ -520,7 +534,9 @@ public class GFacEngineImpl implements GFacEngine {
 		taskModel.setParentProcessId(processContext.getProcessId());
 		taskModel.setCreationTime(new Date().getTime());
 		taskModel.setLastUpdateTime(taskModel.getCreationTime());
-		taskModel.setTaskStatus(new TaskStatus(TaskState.CREATED));
+        TaskStatus taskStatus = new TaskStatus(TaskState.CREATED);
+        taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        taskModel.setTaskStatus(taskStatus);
 		taskModel.setTaskType(TaskTypes.JOB_SUBMISSION);
 		taskCtx.setTaskModel(taskModel);
 		return taskCtx;
@@ -535,7 +551,9 @@ public class GFacEngineImpl implements GFacEngine {
 		taskModel.setParentProcessId(processContext.getProcessId());
 		taskModel.setCreationTime(AiravataUtils.getCurrentTimestamp().getTime());
 		taskModel.setLastUpdateTime(taskModel.getCreationTime());
-		taskModel.setTaskStatus(new TaskStatus(TaskState.CREATED));
+        TaskStatus taskStatus = new TaskStatus(TaskState.CREATED);
+        taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        taskModel.setTaskStatus(taskStatus);
 		taskModel.setTaskType(TaskTypes.DATA_STAGING);
 		// create data staging sub task model
 		DataStagingTaskModel submodel = new DataStagingTaskModel();
@@ -556,7 +574,9 @@ public class GFacEngineImpl implements GFacEngine {
 		taskModel.setParentProcessId(processContext.getProcessId());
 		taskModel.setCreationTime(AiravataUtils.getCurrentTimestamp().getTime());
 		taskModel.setLastUpdateTime(taskModel.getCreationTime());
-		taskModel.setTaskStatus(new TaskStatus(TaskState.CREATED));
+        TaskStatus taskStatus = new TaskStatus(TaskState.CREATED);
+        taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        taskModel.setTaskStatus(taskStatus);
 		taskModel.setTaskType(TaskTypes.DATA_STAGING);
 		// create data staging sub task model
 		String remoteOutputDir = processContext.getOutputDir();

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacWorker.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacWorker.java
index 31f8643..946055e 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacWorker.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacWorker.java
@@ -131,6 +131,7 @@ public class GFacWorker implements Runnable {
 			log.error("GFac Worker throws an exception", e);
 			ProcessStatus status = new ProcessStatus(ProcessState.FAILED);
 			status.setReason(e.getMessage());
+            status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 			processContext.setProcessStatus(status);
             StringWriter errors = new StringWriter();
             e.printStackTrace(new PrintWriter(errors));
@@ -151,7 +152,9 @@ public class GFacWorker implements Runnable {
 	}
 
 	private void completeProcess() throws GFacException {
-		processContext.setProcessStatus(new ProcessStatus(ProcessState.COMPLETED));
+        ProcessStatus status = new ProcessStatus(ProcessState.COMPLETED);
+        status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+        processContext.setProcessStatus(status);
 		GFacUtils.saveAndPublishProcessStatus(processContext);
 		sendAck();
 		Factory.getGfacContext().removeProcess(processContext.getProcessId());
@@ -194,7 +197,9 @@ public class GFacWorker implements Runnable {
 			JobMonitor monitorService = Factory.getMonitorService(processContext.getMonitorMode());
 			if (monitorService != null) {
 				monitorService.monitor(processContext.getJobModel().getJobId(), processContext);
-				processContext.setProcessStatus(new ProcessStatus(ProcessState.MONITORING));
+                ProcessStatus status = new ProcessStatus(ProcessState.MONITORING);
+                status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+                processContext.setProcessStatus(status);
 				GFacUtils.saveAndPublishProcessStatus(processContext);
 			} else {
 				// we directly invoke outflow

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHForkJobSubmissionTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHForkJobSubmissionTask.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHForkJobSubmissionTask.java
index ce6a51b..4d121e5 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHForkJobSubmissionTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHForkJobSubmissionTask.java
@@ -86,6 +86,7 @@ public class SSHForkJobSubmissionTask implements JobSubmissionTask {
                     jobStatus.setJobState(JobState.SUBMITTED);
                     jobStatus.setReason("Successfully Submitted to " + taskContext.getParentProcessContext()
                             .getComputeResourceDescription().getHostName());
+                    jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
                     jobModel.setJobStatus(jobStatus);
                     GFacUtils.saveJobStatus(taskContext.getParentProcessContext(), jobModel);
                     taskStatus = new TaskStatus(TaskState.COMPLETED);

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHJobSubmissionTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHJobSubmissionTask.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHJobSubmissionTask.java
index 101a41f..7aba3b4 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHJobSubmissionTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SSHJobSubmissionTask.java
@@ -86,16 +86,19 @@ public class SSHJobSubmissionTask implements JobSubmissionTask {
 				    jobStatus.setJobState(JobState.SUBMITTED);
 				    jobStatus.setReason("Successfully Submitted to " + taskContext.getParentProcessContext()
 						    .getComputeResourceDescription().getHostName());
+                    jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 				    jobModel.setJobStatus(jobStatus);
 				    GFacUtils.saveJobStatus(taskContext.getParentProcessContext(), jobModel);
 				    if (verifyJobSubmissionByJobId(remoteCluster, jobId)) {
 					    jobStatus.setJobState(JobState.QUEUED);
 					    jobStatus.setReason("Verification step succeeded");
+                        jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 					    jobModel.setJobStatus(jobStatus);
 					    GFacUtils.saveJobStatus(taskContext.getParentProcessContext(), jobModel);
 				    }
 				    taskStatus = new TaskStatus(TaskState.COMPLETED);
 				    taskStatus.setReason("Submitted job to compute resource");
+                    taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 			    } else {
 				    int verificationTryCount = 0;
 				    while (verificationTryCount++ < 3) {
@@ -107,10 +110,12 @@ public class SSHJobSubmissionTask implements JobSubmissionTask {
 						    GFacUtils.saveJobModel(processContext,jobModel);
 						    jobStatus.setJobState(JobState.QUEUED);
 						    jobStatus.setReason("Verification step succeeded");
+                            jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 						    jobModel.setJobStatus(jobStatus);
 						    GFacUtils.saveJobStatus(taskContext.getParentProcessContext(), jobModel);
 						    taskStatus.setState(TaskState.COMPLETED);
 						    taskStatus.setReason("Submitted job to compute resource");
+                            taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 						    break;
 					    }
 					    log.info("Verify step return invalid jobId, retry verification step in {} secs", verificationTryCount * 10);
@@ -131,6 +136,7 @@ public class SSHJobSubmissionTask implements JobSubmissionTask {
                     GFacUtils.saveTaskError(taskContext, errorModel);
 				    taskStatus.setState(TaskState.FAILED);
 				    taskStatus.setReason("Couldn't find job id in both submitted and verified steps");
+                    taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 			    }else {
                     GFacUtils.saveJobModel(processContext, jobModel);
                 }
@@ -148,6 +154,7 @@ public class SSHJobSubmissionTask implements JobSubmissionTask {
 		    log.error(msg, e);
 		    taskStatus.setState(TaskState.FAILED);
 		    taskStatus.setReason(msg);
+            taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 		    ErrorModel errorModel = new ErrorModel();
 		    errorModel.setActualErrorMessage(e.getMessage());
 		    errorModel.setUserFriendlyMessage(msg);
@@ -157,6 +164,7 @@ public class SSHJobSubmissionTask implements JobSubmissionTask {
 		    log.error(msg, e);
 		    taskStatus.setState(TaskState.FAILED);
 		    taskStatus.setReason(msg);
+            taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 		    ErrorModel errorModel = new ErrorModel();
 		    errorModel.setActualErrorMessage(e.getMessage());
 		    errorModel.setUserFriendlyMessage(msg);
@@ -166,6 +174,7 @@ public class SSHJobSubmissionTask implements JobSubmissionTask {
 		    log.error(msg, e);
 		    taskStatus.setState(TaskState.FAILED);
 		    taskStatus.setReason(msg);
+            taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 		    ErrorModel errorModel = new ErrorModel();
 		    errorModel.setActualErrorMessage(e.getMessage());
 		    errorModel.setUserFriendlyMessage(msg);
@@ -175,6 +184,7 @@ public class SSHJobSubmissionTask implements JobSubmissionTask {
 		    log.error(msg, e);
 		    taskStatus.setState(TaskState.FAILED);
 		    taskStatus.setReason(msg);
+            taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 		    ErrorModel errorModel = new ErrorModel();
 		    errorModel.setActualErrorMessage(e.getMessage());
 		    errorModel.setUserFriendlyMessage(msg);
@@ -184,6 +194,7 @@ public class SSHJobSubmissionTask implements JobSubmissionTask {
 		    log.error(msg, e);
 		    taskStatus.setState(TaskState.FAILED);
 		    taskStatus.setReason(msg);
+            taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 		    ErrorModel errorModel = new ErrorModel();
 		    errorModel.setActualErrorMessage(e.getMessage());
 		    errorModel.setUserFriendlyMessage(msg);
@@ -193,6 +204,7 @@ public class SSHJobSubmissionTask implements JobSubmissionTask {
 		    log.error(msg, e);
 		    taskStatus.setState(TaskState.FAILED);
 		    taskStatus.setReason(msg);
+            taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 		    ErrorModel errorModel = new ErrorModel();
 		    errorModel.setActualErrorMessage(e.getMessage());
 		    errorModel.setUserFriendlyMessage(msg);

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
index 2ad29f2..359d39c 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.gfac.monitor.email;
 
 import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.core.GFacException;
 import org.apache.airavata.gfac.core.GFacThreadPoolExecutor;
@@ -304,28 +305,33 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
             jobMonitorMap.remove(jobStatusResult.getJobId());
 	        jobStatus.setJobState(JobState.COMPLETE);
 	        jobStatus.setReason("Complete email received");
+            jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 	        runOutflowTasks = true;
             log.info("[EJM]: Job Complete email received , removed job from job monitoring. " + jobDetails);
         }else if (resultState == JobState.QUEUED) {
 	        // nothing special thing to do, update the status change to rabbit mq at the end of this method.
 	        jobStatus.setJobState(JobState.QUEUED);
 	        jobStatus.setReason("Queue email received");
+            jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 	        log.info("[EJM]: Job Queued email received, " + jobDetails);
         }else if (resultState == JobState.ACTIVE) {
             // nothing special thing to do, update the status change to rabbit mq at the end of this method.
 	        jobStatus.setJobState(JobState.ACTIVE);
 	        jobStatus.setReason("Active email received");
+            jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
             log.info("[EJM]: Job Active email received, " + jobDetails);
         }else if (resultState == JobState.FAILED) {
             jobMonitorMap.remove(jobStatusResult.getJobId());
             runOutflowTasks = true;
 	        jobStatus.setJobState(JobState.FAILED);
 	        jobStatus.setReason("Failed email received");
+            jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
             log.info("[EJM]: Job failed email received , removed job from job monitoring. " + jobDetails);
         }else if (resultState == JobState.CANCELED) {
             jobMonitorMap.remove(jobStatusResult.getJobId());
 	        jobStatus.setJobState(JobState.CANCELED);
 	        jobStatus.setReason("Canceled email received");
+            jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 	        log.info("[EJM]: Job canceled mail received, removed job from job monitoring. " + jobDetails);
 	        runOutflowTasks = true; // we run out flow and this will move process to cancel state.
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java
index 075684d..19ad01c 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ExpCatResourceUtils.java
@@ -39,10 +39,10 @@ public class ExpCatResourceUtils {
     private static final String PERSISTENCE_UNIT_NAME = "experiment_data";
     @PersistenceUnit(unitName="experiment_data")
     protected static EntityManagerFactory expCatFactory;
-    @PersistenceContext(unitName="experiment_data")
-    private static EntityManager expCatEntityManager;
+
 
     public static EntityManager getEntityManager() throws ExperimentCatalogException{
+        EntityManager expCatEntityManager;
         if (expCatFactory == null) {
             String connectionProperties = "DriverClassName=" + Utils.getJDBCDriver() + "," + "Url=" +
                     Utils.getJDBCURL() + "?autoReconnect=true," +
@@ -54,18 +54,16 @@ public class ExpCatResourceUtils {
             properties.put("openjpa.ConnectionProperties", connectionProperties);
             properties.put("openjpa.DynamicEnhancementAgent", "true");
             properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
-            properties.put("openjpa.DataCache","" + Utils.isCachingEnabled() + "(CacheSize=" + Utils.getJPACacheSize() + ", SoftReferenceSize=0)");
-            properties.put("openjpa.QueryCache","" + Utils.isCachingEnabled() + "(CacheSize=" + Utils.getJPACacheSize() + ", SoftReferenceSize=0)");
-            properties.put("javax.persistence.sharedCache.mode","ALL");
+//            properties.put("openjpa.DataCache","" + Utils.isCachingEnabled() + "(CacheSize=" + Utils.getJPACacheSize() + ", SoftReferenceSize=0)");
+//            properties.put("openjpa.QueryCache","" + Utils.isCachingEnabled() + "(CacheSize=" + Utils.getJPACacheSize() + ", SoftReferenceSize=0)");
+//            properties.put("javax.persistence.sharedCache.mode","ALL");
             properties.put("openjpa.RemoteCommitProvider","sjvm");
             properties.put("openjpa.Log","DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
             properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
             properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72, PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000,  autoReconnect=true");
-			properties.put("openjpa.jdbc.QuerySQLCache", "false");
-            synchronized (ExpCatResourceUtils.class) {
-                if (expCatFactory == null) {
-                    expCatFactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
-                }
+//			properties.put("openjpa.jdbc.QuerySQLCache", "false");
+            if (expCatFactory == null) {
+                expCatFactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
             }
         }
         expCatEntityManager = expCatFactory.createEntityManager();

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java
index aff04c8..03ff8e2 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Experiment.java
@@ -28,7 +28,6 @@ import java.sql.Timestamp;
 import java.util.Collection;
 
 @Entity
-@Cacheable
 @Table(name = "EXPERIMENT")
 public class Experiment {
     private final static Logger logger = LoggerFactory.getLogger(Experiment.class);
@@ -63,7 +62,6 @@ public class Experiment {
         this.experimentId = experimentId;
     }
 
-    @Basic
     @Column(name = "GATEWAY_ID")
     public String getGatewayId() {
         return gatewayId;
@@ -73,7 +71,6 @@ public class Experiment {
         this.gatewayId = gatewayId;
     }
 
-    @Basic
     @Column(name = "PROJECT_ID")
     public String getProjectId() {
         return projectId;
@@ -83,7 +80,6 @@ public class Experiment {
         this.projectId = projectId;
     }
 
-    @Basic
     @Column(name = "EXPERIMENT_TYPE")
     public String getExperimentType() {
         return experimentType;
@@ -93,7 +89,6 @@ public class Experiment {
         this.experimentType = experimentType;
     }
 
-    @Basic
     @Column(name = "USER_NAME")
     public String getUserName() {
         return userName;
@@ -103,7 +98,6 @@ public class Experiment {
         this.userName = userName;
     }
 
-    @Basic
     @Column(name = "EXPERIMENT_NAME")
     public String getExperimentName() {
         return experimentName;
@@ -113,7 +107,6 @@ public class Experiment {
         this.experimentName = experimentName;
     }
 
-    @Basic
     @Column(name = "CREATION_TIME")
     public Timestamp getCreationTime() {
         return creationTime;
@@ -123,7 +116,6 @@ public class Experiment {
         this.creationTime = creationTime;
     }
 
-    @Basic
     @Column(name = "DESCRIPTION")
     public String getDescription() {
         return description;
@@ -133,7 +125,6 @@ public class Experiment {
         this.description = description;
     }
 
-    @Basic
     @Column(name = "EXECUTION_ID")
     public String getExecutionId() {
         return executionId;
@@ -143,7 +134,6 @@ public class Experiment {
         this.executionId = executionId;
     }
 
-    @Basic
     @Column(name = "GATEWAY_EXECUTION_ID")
     public String getGatewayExecutionId() {
         return gatewayExecutionId;
@@ -153,7 +143,6 @@ public class Experiment {
         this.gatewayExecutionId = gatewayExecutionId;
     }
 
-    @Basic
     @Column(name = "ENABLE_EMAIL_NOTIFICATION")
     public Boolean getEnableEmailNotification() {
         return enableEmailNotification;
@@ -163,7 +152,6 @@ public class Experiment {
         this.enableEmailNotification = enableEmailNotification;
     }
 
-    @Basic
     @Lob
     @Column(name = "EMAIL_ADDRESSES")
     public String getEmailAddresses() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java
index 652249d..072522e 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.sql.Timestamp;
 
 @Entity
-@Cacheable
 @Table(name = "EXPERIMENT_ERROR")
 @IdClass(ExperimentErrorPK.class)
 public class ExperimentError {
@@ -61,7 +60,6 @@ public class ExperimentError {
         this.experimentId = experimentId;
     }
 
-    @Basic
     @Column(name = "CREATION_TIME")
     public Timestamp getCreationTime() {
         return creationTime;
@@ -71,7 +69,6 @@ public class ExperimentError {
         this.creationTime = creationTime;
     }
 
-    @Basic
     @Lob
     @Column(name = "ACTUAL_ERROR_MESSAGE")
     public String getActualErrorMessage() {
@@ -82,7 +79,6 @@ public class ExperimentError {
         this.actualErrorMessage = actualErrorMessage;
     }
 
-    @Basic
     @Lob
     @Column(name = "USER_FRIENDLY_MESSAGE")
     public String getUserFriendlyMessage() {
@@ -93,7 +89,6 @@ public class ExperimentError {
         this.userFriendlyMessage = userFriendlyMessage;
     }
 
-    @Basic
     @Column(name = "TRANSIENT_OR_PERSISTENT")
     public boolean getTransientOrPersistent() {
         return transientOrPersistent;
@@ -103,7 +98,6 @@ public class ExperimentError {
         this.transientOrPersistent = transientOrPersistent;
     }
 
-    @Basic
     @Lob
     @Column(name = "ROOT_CAUSE_ERROR_ID_LIST")
     public String getRootCauseErrorIdList() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java
index f6f233b..defb89d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java
@@ -26,7 +26,6 @@ import org.slf4j.LoggerFactory;
 import javax.persistence.*;
 
 @Entity
-@Cacheable
 @Table(name = "EXPERIMENT_INPUT")
 @IdClass(ExperimentInputPK.class)
 public class ExperimentInput {
@@ -65,7 +64,6 @@ public class ExperimentInput {
         this.inputName = inputName;
     }
 
-    @Basic
     @Lob
     @Column(name = "INPUT_VALUE")
     public String getInputValue() {
@@ -76,7 +74,6 @@ public class ExperimentInput {
         this.inputValue = inputValue;
     }
 
-    @Basic
     @Column(name = "DATA_TYPE")
     public String getDataType() {
         return dataType;
@@ -86,7 +83,6 @@ public class ExperimentInput {
         this.dataType = dataType;
     }
 
-    @Basic
     @Column(name = "APPLICATION_ARGUMENT")
     public String getApplicationArgument() {
         return applicationArgument;
@@ -96,7 +92,6 @@ public class ExperimentInput {
         this.applicationArgument = applicationArgument;
     }
 
-    @Basic
     @Column(name = "STANDARD_INPUT")
     public boolean getStandardInput() {
         return standardInput;
@@ -106,7 +101,6 @@ public class ExperimentInput {
         this.standardInput = standardInput;
     }
 
-    @Basic
     @Column(name = "USER_FRIENDLY_DESCRIPTION")
     public String getUserFriendlyDescription() {
         return userFriendlyDescription;
@@ -116,7 +110,6 @@ public class ExperimentInput {
         this.userFriendlyDescription = userFriendlyDescription;
     }
 
-    @Basic
     @Column(name = "METADATA")
     public String getMetadata() {
         return metadata;
@@ -126,7 +119,6 @@ public class ExperimentInput {
         this.metadata = metadata;
     }
 
-    @Basic
     @Column(name = "INPUT_ORDER")
     public Integer getInputOrder() {
         return inputOrder;
@@ -136,7 +128,6 @@ public class ExperimentInput {
         this.inputOrder = inputOrder;
     }
 
-    @Basic
     @Column(name = "IS_REQUIRED")
     public boolean getIsRequired() {
         return isRequired;
@@ -146,7 +137,6 @@ public class ExperimentInput {
         this.isRequired = isRequired;
     }
 
-    @Basic
     @Column(name = "REQUIRED_TO_ADDED_TO_CMD")
     public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
@@ -156,7 +146,6 @@ public class ExperimentInput {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
-    @Basic
     @Column(name = "DATA_STAGED")
     public boolean getDataStaged() {
         return dataStaged;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java
index 36e28b0..244fb08 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java
@@ -26,7 +26,6 @@ import org.slf4j.LoggerFactory;
 import javax.persistence.*;
 
 @Entity
-@Cacheable
 @Table(name = "EXPERIMENT_OUTPUT")
 @IdClass(ExperimentOutputPK.class)
 public class ExperimentOutput {
@@ -63,7 +62,6 @@ public class ExperimentOutput {
         this.outputName = outputName;
     }
 
-    @Basic
     @Lob
     @Column(name = "OUTPUT_VALUE")
     public String getOutputValue() {
@@ -74,7 +72,6 @@ public class ExperimentOutput {
         this.outputValue = outputValue;
     }
 
-    @Basic
     @Column(name = "DATA_TYPE")
     public String getDataType() {
         return dataType;
@@ -84,7 +81,6 @@ public class ExperimentOutput {
         this.dataType = dataType;
     }
 
-    @Basic
     @Column(name = "APPLICATION_ARGUMENT")
     public String getApplicationArgument() {
         return applicationArgument;
@@ -94,7 +90,6 @@ public class ExperimentOutput {
         this.applicationArgument = applicationArgument;
     }
 
-    @Basic
     @Column(name = "IS_REQUIRED")
     public boolean getIsRequired() {
         return isRequired;
@@ -104,7 +99,6 @@ public class ExperimentOutput {
         this.isRequired = isRequired;
     }
 
-    @Basic
     @Column(name = "REQUIRED_TO_ADDED_TO_CMD")
     public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
@@ -114,7 +108,6 @@ public class ExperimentOutput {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
-    @Basic
     @Column(name = "DATA_MOVEMENT")
     public boolean getDataMovement() {
         return dataMovement;
@@ -124,7 +117,6 @@ public class ExperimentOutput {
         this.dataMovement = dataMovement;
     }
 
-    @Basic
     @Column(name = "LOCATION")
     public String getLocation() {
         return location;
@@ -134,7 +126,6 @@ public class ExperimentOutput {
         this.location = location;
     }
 
-    @Basic
     @Column(name = "SEARCH_QUERY")
     public String getSearchQuery() {
         return searchQuery;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentStatus.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentStatus.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentStatus.java
index c9553f0..86277d6 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentStatus.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentStatus.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.sql.Timestamp;
 
 @Entity
-@Cacheable
 @Table(name = "EXPERIMENT_STATUS")
 @IdClass(ExperimentStatusPK.class)
 public class ExperimentStatus {
@@ -59,7 +58,6 @@ public class ExperimentStatus {
         this.experimentId = experimentId;
     }
 
-    @Basic
     @Column(name = "STATE")
     public String getState() {
         return state;
@@ -69,7 +67,6 @@ public class ExperimentStatus {
         this.state = state;
     }
 
-    @Basic
     @Column(name = "TIME_OF_STATE_CHANGE")
     public Timestamp getTimeOfStateChange() {
         return timeOfStateChange;
@@ -79,7 +76,6 @@ public class ExperimentStatus {
         this.timeOfStateChange = timeOfStateChange;
     }
 
-    @Basic
     @Lob
     @Column(name = "REASON")
     public String getReason() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentSummary.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentSummary.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentSummary.java
index cdfc5fd..d9990b1 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentSummary.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentSummary.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.sql.Timestamp;
 
 @Entity
-@Cacheable
 @Table(name = "EXPERIMENT_SUMMARY")
 public class ExperimentSummary {
     private final static Logger logger = LoggerFactory.getLogger(ExperimentSummary.class);
@@ -53,7 +52,6 @@ public class ExperimentSummary {
         this.experimentId = experimentId;
     }
 
-    @Basic
     @Column(name = "PROJECT_ID")
     public String getProjectId() {
         return projectId;
@@ -63,7 +61,6 @@ public class ExperimentSummary {
         this.projectId = projectId;
     }
 
-    @Basic
     @Column(name = "GATEWAY_ID")
     public String getGatewayId() {
         return gatewayId;
@@ -74,7 +71,6 @@ public class ExperimentSummary {
     }
 
 
-    @Basic
     @Column(name = "USER_NAME")
     public String getUserName() {
         return userName;
@@ -84,7 +80,6 @@ public class ExperimentSummary {
         this.userName = userName;
     }
 
-    @Basic
     @Column(name = "EXECUTION_ID")
     public String getExecutionId() {
         return executionId;
@@ -94,7 +89,6 @@ public class ExperimentSummary {
         this.executionId = executionId;
     }
 
-    @Basic
     @Column(name = "EXPERIMENT_NAME")
     public String getExperimentName() {
         return experimentName;
@@ -104,7 +98,6 @@ public class ExperimentSummary {
         this.experimentName = experimentName;
     }
 
-    @Basic
     @Column(name = "CREATION_TIME")
     public Timestamp getCreationTime() {
         return creationTime;
@@ -114,7 +107,6 @@ public class ExperimentSummary {
         this.creationTime = creationTime;
     }
 
-    @Basic
     @Column(name = "DESCRIPTION")
     public String getDescription() {
         return description;
@@ -124,7 +116,6 @@ public class ExperimentSummary {
         this.description = description;
     }
 
-    @Basic
     @Column(name = "STATE")
     public String getState() {
         return state;
@@ -134,7 +125,6 @@ public class ExperimentSummary {
         this.state = state;
     }
 
-    @Basic
     @Column(name = "RESOURCE_HOST_ID")
     public String getResourceHostId() {
         return resourceHostId;
@@ -144,7 +134,6 @@ public class ExperimentSummary {
         this.resourceHostId = resourceHostId;
     }
 
-    @Basic
     @Column(name = "TIME_OF_STATE_CHANGE")
     public Timestamp getTimeOfStateChange() {
         return timeOfStateChange;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
index b097255..bb045b8 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.util.Collection;
 
 @Entity
-@Cacheable
 @Table(name = "GATEWAY")
 public class Gateway {
     private final static Logger logger = LoggerFactory.getLogger(Gateway.class);
@@ -48,7 +47,6 @@ public class Gateway {
         this.gatewayId = gatewayId;
     }
 
-    @Basic
     @Column(name = "GATEWAY_NAME")
     public String getGatewayName() {
         return gatewayName;
@@ -58,7 +56,6 @@ public class Gateway {
         this.gatewayName = gatewayName;
     }
 
-    @Basic
     @Column(name = "DOMAIN")
     public String getDomain() {
         return domain;
@@ -68,7 +65,6 @@ public class Gateway {
         this.domain = domain;
     }
 
-    @Basic
     @Column(name = "EMAIL_ADDRESS")
     public String getEmailAddress() {
         return emailAddress;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/GatewayWorker.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/GatewayWorker.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/GatewayWorker.java
index 4600284..7097209 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/GatewayWorker.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/GatewayWorker.java
@@ -26,7 +26,6 @@ import org.slf4j.LoggerFactory;
 import javax.persistence.*;
 
 @Entity
-@Cacheable
 @Table(name = "GATEWAY_WORKER")
 @IdClass(GatewayWorkerPK.class)
 public class GatewayWorker {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Job.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Job.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Job.java
index 9133a7e..5827863 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Job.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Job.java
@@ -28,7 +28,6 @@ import java.sql.Timestamp;
 import java.util.Collection;
 
 @Entity
-@Cacheable
 @Table(name = "JOB")
 @IdClass(JobPK.class)
 public class Job {
@@ -67,7 +66,6 @@ public class Job {
 		this.processId = processId;
 	}
 
-    @Basic
     @Column(name = "TASK_ID")
     public String getTaskId() {
         return taskId;
@@ -107,7 +105,6 @@ public class Job {
         this.stdErr = stdErr;
     }
 
-    @Basic
     @Column(name = "EXIT_CODE")
     public int getExitCode() {
         return exitCode;
@@ -117,7 +114,6 @@ public class Job {
         this.exitCode = exitCode;
     }
 
-    @Basic
     @Column(name = "CREATION_TIME")
     public Timestamp getCreationTime() {
         return creationTime;
@@ -127,7 +123,6 @@ public class Job {
         this.creationTime = creationTime;
     }
 
-    @Basic
     @Column(name = "COMPUTE_RESOURCE_CONSUMED")
     public String getComputeResourceConsumed() {
         return computeResourceConsumed;
@@ -137,7 +132,6 @@ public class Job {
         this.computeResourceConsumed = computeResourceConsumed;
     }
 
-    @Basic
     @Column(name = "JOB_NAME")
     public String getJobName() {
         return jobName;
@@ -147,7 +141,6 @@ public class Job {
         this.jobName = jobName;
     }
 
-    @Basic
     @Column(name = "WORKING_DIR")
     public String getWorkingDir() {
         return workingDir;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java
index 152f468..2dd6d35 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.sql.Timestamp;
 
 @Entity
-@Cacheable
 @Table(name = "JOB_STATUS")
 @IdClass(JobStatusPK.class)
 public class JobStatus {
@@ -70,7 +69,6 @@ public class JobStatus {
         this.processId = processId;
     }
 
-    @Basic
     @Column(name = "STATE")
     public String getState() {
         return state;
@@ -80,7 +78,6 @@ public class JobStatus {
         this.state = state;
     }
 
-    @Basic
     @Column(name = "TIME_OF_STATE_CHANGE")
     public Timestamp getTimeOfStateChange() {
         return timeOfStateChange;
@@ -90,7 +87,6 @@ public class JobStatus {
         this.timeOfStateChange = timeOfStateChange;
     }
 
-    @Basic
     @Lob
     @Column(name = "REASON")
     public String getReason() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
index 871be59..b765ced 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
@@ -28,7 +28,6 @@ import java.sql.Timestamp;
 import java.util.Collection;
 
 @Entity
-@Cacheable
 @Table(name = "PROCESS")
 public class Process {
     private final static Logger logger = LoggerFactory.getLogger(Process.class);
@@ -62,7 +61,6 @@ public class Process {
         this.processId = processId;
     }
 
-    @Basic
     @Column(name = "EXPERIMENT_ID")
     public String getExperimentId() {
         return experimentId;
@@ -72,7 +70,6 @@ public class Process {
         this.experimentId = experimentId;
     }
 
-    @Basic
     @Column(name = "CREATION_TIME")
     public Timestamp getCreationTime() {
         return creationTime;
@@ -82,7 +79,6 @@ public class Process {
         this.creationTime = creationTime;
     }
 
-    @Basic
     @Column(name = "LAST_UPDATE_TIME")
     public Timestamp getLastUpdateTime() {
         return lastUpdateTime;
@@ -92,7 +88,6 @@ public class Process {
         this.lastUpdateTime = lastUpdateTime;
     }
 
-    @Basic
     @Lob
     @Column(name = "PROCESS_DETAIL")
     public String getProcessDetail() {
@@ -103,7 +98,6 @@ public class Process {
         this.processDetail = processDetail;
     }
 
-    @Basic
     @Column(name = "APPLICATION_INTERFACE_ID")
     public String getApplicationInterfaceId() {
         return applicationInterfaceId;
@@ -113,7 +107,6 @@ public class Process {
         this.applicationInterfaceId = applicationInterfaceId;
     }
 
-    @Basic
     @Column(name = "TASK_DAG")
     public String getTaskDag() {
         return taskDag;
@@ -123,7 +116,6 @@ public class Process {
         this.taskDag = taskDag;
     }
 
-    @Basic
     @Column(name = "APPLICATION_DEPLOYMENT_ID")
     public String getApplicationDeploymentId() {
         return applicationDeploymentId;
@@ -133,7 +125,6 @@ public class Process {
         this.applicationDeploymentId = applicationDeploymentId;
     }
 
-    @Basic
     @Column(name = "COMPUTE_RESOURCE_ID")
     public String getComputeResourceId() {
         return computeResourceId;
@@ -143,7 +134,6 @@ public class Process {
         this.computeResourceId = computeResourceId;
     }
 
-    @Basic
     @Column(name = "GATEWAY_EXECUTION_ID")
     public String getGatewayExecutionId() {
         return gatewayExecutionId;
@@ -153,8 +143,6 @@ public class Process {
         this.gatewayExecutionId = gatewayExecutionId;
     }
 
-
-    @Basic
     @Column(name = "ENABLE_EMAIL_NOTIFICATION")
     public boolean getEnableEmailNotification() {
         return enableEmailNotification;
@@ -164,7 +152,6 @@ public class Process {
         this.enableEmailNotification = enableEmailNotification;
     }
 
-    @Basic
     @Lob
     @Column(name = "EMAIL_ADDRESSES")
     public String getEmailAddresses() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java
index eeda573..80ab995 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java
@@ -28,7 +28,6 @@ import java.lang.*;
 import java.sql.Timestamp;
 
 @Entity
-@Cacheable
 @Table(name = "PROCESS_ERROR")
 @IdClass(ProcessErrorPK.class)
 public class ProcessError {
@@ -52,7 +51,6 @@ public class ProcessError {
         this.errorId = errorId;
     }
 
-    @Basic
     @Column(name = "PROCESS_ID")
     public String getProcessId() {
         return processId;
@@ -62,7 +60,6 @@ public class ProcessError {
         this.processId = processId;
     }
 
-    @Basic
     @Column(name = "CREATION_TIME")
     public Timestamp getCreationTime() {
         return creationTime;
@@ -72,7 +69,6 @@ public class ProcessError {
         this.creationTime = creationTime;
     }
 
-    @Basic
     @Lob
     @Column(name = "ACTUAL_ERROR_MESSAGE")
     public String getActualErrorMessage() {
@@ -83,7 +79,6 @@ public class ProcessError {
         this.actualErrorMessage = actualErrorMessage;
     }
 
-    @Basic
     @Lob
     @Column(name = "USER_FRIENDLY_MESSAGE")
     public String getUserFriendlyMessage() {
@@ -94,7 +89,6 @@ public class ProcessError {
         this.userFriendlyMessage = userFriendlyMessage;
     }
 
-    @Basic
     @Column(name = "TRANSIENT_OR_PERSISTENT")
     public boolean getTransientOrPersistent() {
         return transientOrPersistent;
@@ -104,7 +98,6 @@ public class ProcessError {
         this.transientOrPersistent = transientOrPersistent;
     }
 
-    @Basic
     @Lob
     @Column(name = "ROOT_CAUSE_ERROR_ID_LIST")
     public String getRootCauseErrorIdList() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java
index 67a97b0..69631d3 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.lang.*;
 
 @Entity
-@Cacheable
 @Table(name = "PROCESS_INPUT")
 @IdClass(ProcessInputPK.class)
 public class ProcessInput {
@@ -66,7 +65,6 @@ public class ProcessInput {
         this.inputName = inputName;
     }
 
-    @Basic
     @Lob
     @Column(name = "INPUT_VALUE")
     public String getInputValue() {
@@ -77,7 +75,6 @@ public class ProcessInput {
         this.inputValue = inputValue;
     }
 
-    @Basic
     @Column(name = "DATA_TYPE")
     public String getDataType() {
         return dataType;
@@ -87,7 +84,6 @@ public class ProcessInput {
         this.dataType = dataType;
     }
 
-    @Basic
     @Column(name = "APPLICATION_ARGUMENT")
     public String getApplicationArgument() {
         return applicationArgument;
@@ -97,7 +93,6 @@ public class ProcessInput {
         this.applicationArgument = applicationArgument;
     }
 
-    @Basic
     @Column(name = "STANDARD_INPUT")
     public boolean getStandardInput() {
         return standardInput;
@@ -107,7 +102,6 @@ public class ProcessInput {
         this.standardInput = standardInput;
     }
 
-    @Basic
     @Column(name = "USER_FRIENDLY_DESCRIPTION")
     public String getUserFriendlyDescription() {
         return userFriendlyDescription;
@@ -117,7 +111,6 @@ public class ProcessInput {
         this.userFriendlyDescription = userFriendlyDescription;
     }
 
-    @Basic
     @Column(name = "METADATA")
     public String getMetadata() {
         return metadata;
@@ -127,7 +120,6 @@ public class ProcessInput {
         this.metadata = metadata;
     }
 
-    @Basic
     @Column(name = "INPUT_ORDER")
     public Integer getInputOrder() {
         return inputOrder;
@@ -137,7 +129,6 @@ public class ProcessInput {
         this.inputOrder = inputOrder;
     }
 
-    @Basic
     @Column(name = "IS_REQUIRED")
     public boolean getIsRequired() {
         return isRequired;
@@ -147,7 +138,6 @@ public class ProcessInput {
         this.isRequired = isRequired;
     }
 
-    @Basic
     @Column(name = "REQUIRED_TO_ADDED_TO_CMD")
     public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
@@ -157,7 +147,6 @@ public class ProcessInput {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
-    @Basic
     @Column(name = "DATA_STAGED")
     public boolean getDataStaged() {
         return dataStaged;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java
index 7c1738c..b66673d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java
@@ -63,7 +63,6 @@ public class ProcessOutput {
         this.outputName = outputName;
     }
 
-    @Basic
     @Lob
     @Column(name = "OUTPUT_VALUE")
     public String getOutputValue() {
@@ -74,7 +73,6 @@ public class ProcessOutput {
         this.outputValue = outputValue;
     }
 
-    @Basic
     @Column(name = "DATA_TYPE")
     public String getDataType() {
         return dataType;
@@ -84,7 +82,6 @@ public class ProcessOutput {
         this.dataType = dataType;
     }
 
-    @Basic
     @Column(name = "APPLICATION_ARGUMENT")
     public String getApplicationArgument() {
         return applicationArgument;
@@ -94,7 +91,6 @@ public class ProcessOutput {
         this.applicationArgument = applicationArgument;
     }
 
-    @Basic
     @Column(name = "IS_REQUIRED")
     public boolean getIsRequired() {
         return isRequired;
@@ -104,7 +100,6 @@ public class ProcessOutput {
         this.isRequired = isRequired;
     }
 
-    @Basic
     @Column(name = "REQUIRED_TO_ADDED_TO_CMD")
     public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
@@ -114,7 +109,6 @@ public class ProcessOutput {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
-    @Basic
     @Column(name = "DATA_MOVEMENT")
     public boolean getDataMovement() {
         return dataMovement;
@@ -124,7 +118,6 @@ public class ProcessOutput {
         this.dataMovement = dataMovement;
     }
 
-    @Basic
     @Column(name = "LOCATION")
     public String getLocation() {
         return location;
@@ -134,7 +127,6 @@ public class ProcessOutput {
         this.location = location;
     }
 
-    @Basic
     @Column(name = "SEARCH_QUERY")
     public String getSearchQuery() {
         return searchQuery;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessResourceSchedule.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessResourceSchedule.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessResourceSchedule.java
index 1c4cefc..445fad5 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessResourceSchedule.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessResourceSchedule.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.lang.*;
 
 @Entity
-@Cacheable
 @Table(name = "PROCESS_RESOURCE_SCHEDULE")
 public class ProcessResourceSchedule {
     private final static Logger logger = LoggerFactory.getLogger(ProcessResourceSchedule.class);
@@ -51,7 +50,6 @@ public class ProcessResourceSchedule {
         this.processId = processId;
     }
 
-    @Basic
     @Column(name = "RESOURCE_HOST_ID")
     public String getResourceHostId() {
         return resourceHostId;
@@ -61,7 +59,6 @@ public class ProcessResourceSchedule {
         this.resourceHostId = resourceHostId;
     }
 
-    @Basic
     @Column(name = "TOTAL_CPU_COUNT")
     public Integer getTotalCpuCount() {
         return totalCpuCount;
@@ -71,7 +68,6 @@ public class ProcessResourceSchedule {
         this.totalCpuCount = totalCpuCount;
     }
 
-    @Basic
     @Column(name = "NODE_COUNT")
     public Integer getNodeCount() {
         return nodeCount;
@@ -81,7 +77,6 @@ public class ProcessResourceSchedule {
         this.nodeCount = nodeCount;
     }
 
-    @Basic
     @Column(name = "NUMBER_OF_THREADS")
     public Integer getNumberOfThreads() {
         return numberOfThreads;
@@ -91,7 +86,6 @@ public class ProcessResourceSchedule {
         this.numberOfThreads = numberOfThreads;
     }
 
-    @Basic
     @Column(name = "QUEUE_NAME")
     public String getQueueName() {
         return queueName;
@@ -101,7 +95,6 @@ public class ProcessResourceSchedule {
         this.queueName = queueName;
     }
 
-    @Basic
     @Column(name = "WALL_TIME_LIMIT")
     public Integer getWallTimeLimit() {
         return wallTimeLimit;
@@ -111,7 +104,6 @@ public class ProcessResourceSchedule {
         this.wallTimeLimit = wallTimeLimit;
     }
 
-    @Basic
     @Column(name = "TOTAL_PHYSICAL_MEMORY")
     public Integer getTotalPhysicalMemory() {
         return totalPhysicalMemory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessStatus.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessStatus.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessStatus.java
index e36d1a4..3334cfe 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessStatus.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessStatus.java
@@ -28,7 +28,6 @@ import java.lang.*;
 import java.sql.Timestamp;
 
 @Entity
-@Cacheable
 @Table(name = "PROCESS_STATUS")
 @IdClass(ProcessStatusPK.class)
 public class ProcessStatus {
@@ -60,7 +59,6 @@ public class ProcessStatus {
         this.processId = processId;
     }
 
-    @Basic
     @Column(name = "STATE")
     public String getState() {
         return state;
@@ -70,7 +68,6 @@ public class ProcessStatus {
         this.state = state;
     }
 
-    @Basic
     @Column(name = "TIME_OF_STATE_CHANGE")
     public Timestamp getTimeOfStateChange() {
         return timeOfStateChange;
@@ -80,7 +77,6 @@ public class ProcessStatus {
         this.timeOfStateChange = timeOfStateChange;
     }
 
-    @Basic
     @Lob
     @Column(name = "REASON")
     public String getReason() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java
index 8a2cb51..98a5d87 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Project.java
@@ -28,7 +28,6 @@ import java.sql.Timestamp;
 import java.util.Collection;
 
 @Entity
-@Cacheable
 @Table(name = "PROJECT")
 public class Project {
     private final static Logger logger = LoggerFactory.getLogger(Project.class);
@@ -43,7 +42,6 @@ public class Project {
     private Gateway gateway;
     private Collection<ProjectUser> projectUsers;
 
-    @Basic
     @Column(name = "GATEWAY_ID")
     public String getGatewayId() {
         return gatewayId;
@@ -53,7 +51,6 @@ public class Project {
         this.gatewayId = gatewayId;
     }
 
-    @Basic
     @Column(name = "USER_NAME")
     public String getUserName() {
         return userName;
@@ -63,7 +60,6 @@ public class Project {
         this.userName = ownerName;
     }
 
-    @Basic
     @Column(name = "PROJECT_NAME")
     public String getProjectName() {
         return projectName;
@@ -83,7 +79,6 @@ public class Project {
         this.projectId = projectId;
     }
 
-    @Basic
     @Column(name = "DESCRIPTION")
     public String getDescription() {
         return description;
@@ -93,7 +88,6 @@ public class Project {
         this.description = description;
     }
 
-    @Basic
     @Column(name = "CREATION_TIME")
     public Timestamp getCreationTime() {
         return creationTime;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProjectUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProjectUser.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProjectUser.java
index a3f5132..72c52b8 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProjectUser.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProjectUser.java
@@ -26,7 +26,6 @@ import org.slf4j.LoggerFactory;
 import javax.persistence.*;
 
 @Entity
-@Cacheable
 @Table(name = "PROJECT_USER")
 @IdClass(ProjectUserPK.class)
 public class ProjectUser {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Task.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Task.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Task.java
index c9da812..3d436d2 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Task.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Task.java
@@ -29,7 +29,6 @@ import java.sql.Timestamp;
 import java.util.Collection;
 
 @Entity
-@Cacheable
 @Table(name = "TASK")
 public class Task {
     private final static Logger logger = LoggerFactory.getLogger(Task.class);
@@ -54,7 +53,6 @@ public class Task {
         this.taskId = taskId;
     }
 
-    @Basic
     @Column(name = "TASK_TYPE")
     public String getTaskType() {
         return taskType;
@@ -64,7 +62,6 @@ public class Task {
         this.taskType = taskType;
     }
 
-    @Basic
     @Column(name = "PARENT_PROCESS_ID")
     public String getParentProcessId() {
         return parentProcessId;
@@ -74,7 +71,6 @@ public class Task {
         this.parentProcessId = parentProcessId;
     }
 
-    @Basic
     @Column(name = "CREATION_TIME")
     public Timestamp getCreationTime() {
         return creationTime;
@@ -84,7 +80,6 @@ public class Task {
         this.creationTime = creationTime;
     }
 
-    @Basic
     @Column(name = "LAST_UPDATE_TIME")
     public Timestamp getLastUpdateTime() {
         return lastUpdateTime;
@@ -94,7 +89,6 @@ public class Task {
         this.lastUpdateTime = lastUpdateTime;
     }
 
-    @Basic
     @Lob
     @Column(name = "TASK_DETAIL")
     public String getTaskDetail() {
@@ -105,7 +99,6 @@ public class Task {
         this.taskDetail = taskDetail;
     }
 
-    @Basic
     @Column(name = "SUB_TASK_MODEL")
     public byte[] getSetSubTaskModel() {
         return setSubTaskModel;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java
index eef036e..7c3cf0d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.sql.Timestamp;
 
 @Entity
-@Cacheable
 @Table(name = "TASK_ERROR")
 @IdClass(TaskErrorPK.class)
 public class TaskError {
@@ -61,7 +60,6 @@ public class TaskError {
         this.taskId = taskId;
     }
 
-    @Basic
     @Column(name = "CREATION_TIME")
     public Timestamp getCreationTime() {
         return creationTime;
@@ -71,7 +69,6 @@ public class TaskError {
         this.creationTime = creationTime;
     }
 
-    @Basic
     @Lob
     @Column(name = "ACTUAL_ERROR_MESSAGE")
     public String getActualErrorMessage() {
@@ -82,7 +79,6 @@ public class TaskError {
         this.actualErrorMessage = actualErrorMessage;
     }
 
-    @Basic
     @Lob
     @Column(name = "USER_FRIENDLY_MESSAGE")
     public String getUserFriendlyMessage() {
@@ -93,7 +89,6 @@ public class TaskError {
         this.userFriendlyMessage = userFriendlyMessage;
     }
 
-    @Basic
     @Column(name = "TRANSIENT_OR_PERSISTENT")
     public boolean getTransientOrPersistent() {
         return transientOrPersistent;
@@ -103,7 +98,6 @@ public class TaskError {
         this.transientOrPersistent = transientOrPersistent;
     }
 
-    @Basic
     @Lob
     @Column(name = "ROOT_CAUSE_ERROR_ID_LIST")
     public String getRootCauseErrorIdList() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskStatus.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskStatus.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskStatus.java
index d777e6b..ef04021 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskStatus.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskStatus.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.sql.Timestamp;
 
 @Entity
-@Cacheable
 @Table(name = "TASK_STATUS")
 @IdClass(TaskStatusPK.class)
 public class TaskStatus {
@@ -59,7 +58,6 @@ public class TaskStatus {
         this.taskId = taskId;
     }
 
-    @Basic
     @Column(name = "STATE")
     public String getState() {
         return state;
@@ -69,7 +67,6 @@ public class TaskStatus {
         this.state = state;
     }
 
-    @Basic
     @Column(name = "TIME_OF_STATE_CHANGE")
     public Timestamp getTimeOfStateChange() {
         return timeOfStateChange;
@@ -79,7 +76,6 @@ public class TaskStatus {
         this.timeOfStateChange = timeOfStateChange;
     }
 
-    @Basic
     @Lob
     @Column(name = "REASON")
     public String getReason() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
index a8bc5f5..e7645a7 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
@@ -26,7 +26,6 @@ import org.slf4j.LoggerFactory;
 import javax.persistence.*;
 
 @Entity
-@Cacheable
 @Table(name = "USER_CONFIGURATION_DATA")
 public class UserConfigurationData {
     private final static Logger logger = LoggerFactory.getLogger(UserConfigurationData.class);
@@ -56,7 +55,6 @@ public class UserConfigurationData {
         this.experimentId = experimentId;
     }
 
-    @Basic
     @Column(name = "AIRAVATA_AUTO_SCHEDULE")
     public boolean getAiravataAutoSchedule() {
         return airavataAutoSchedule;
@@ -66,7 +64,6 @@ public class UserConfigurationData {
         this.airavataAutoSchedule = airavataAutoSchedule;
     }
 
-    @Basic
     @Column(name = "OVERRIDE_MANUAL_SCHEDULED_PARAMS")
     public boolean getOverrideManualScheduledParams() {
         return overrideManualScheduledParams;
@@ -76,7 +73,6 @@ public class UserConfigurationData {
         this.overrideManualScheduledParams = overrideManualScheduledParams;
     }
 
-    @Basic
     @Column(name = "SHARE_EXPERIMENT_PUBLICALLY")
     public boolean getShareExperimentPublically() {
         return shareExperimentPublically;
@@ -86,7 +82,6 @@ public class UserConfigurationData {
         this.shareExperimentPublically = shareExperimentPublically;
     }
 
-    @Basic
     @Column(name = "THROTTLE_RESOURCES")
     public boolean getThrottleResources() {
         return throttleResources;
@@ -96,7 +91,6 @@ public class UserConfigurationData {
         this.throttleResources = throttleResources;
     }
 
-    @Basic
     @Column(name = "USER_DN")
     public String getUserDn() {
         return userDn;
@@ -106,7 +100,6 @@ public class UserConfigurationData {
         this.userDn = userDn;
     }
 
-    @Basic
     @Column(name = "GENERATE_CERT")
     public boolean getGenerateCert() {
         return generateCert;
@@ -116,7 +109,6 @@ public class UserConfigurationData {
         this.generateCert = generateCert;
     }
 
-    @Basic
     @Column(name = "RESOURCE_HOST_ID")
     public String getResourceHostId() {
         return resourceHostId;
@@ -126,7 +118,6 @@ public class UserConfigurationData {
         this.resourceHostId = resourceHostId;
     }
 
-    @Basic
     @Column(name = "TOTAL_CPU_COUNT")
     public Integer getTotalCpuCount() {
         return totalCpuCount;
@@ -136,7 +127,6 @@ public class UserConfigurationData {
         this.totalCpuCount = totalCpuCount;
     }
 
-    @Basic
     @Column(name = "NODE_COUNT")
     public Integer getNodeCount() {
         return nodeCount;
@@ -146,7 +136,6 @@ public class UserConfigurationData {
         this.nodeCount = nodeCount;
     }
 
-    @Basic
     @Column(name = "NUMBER_OF_THREADS")
     public Integer getNumberOfThreads() {
         return numberOfThreads;
@@ -156,7 +145,6 @@ public class UserConfigurationData {
         this.numberOfThreads = numberOfThreads;
     }
 
-    @Basic
     @Column(name = "QUEUE_NAME")
     public String getQueueName() {
         return queueName;
@@ -166,7 +154,6 @@ public class UserConfigurationData {
         this.queueName = queueName;
     }
 
-    @Basic
     @Column(name = "WALL_TIME_LIMIT")
     public Integer getWallTimeLimit() {
         return wallTimeLimit;
@@ -176,7 +163,6 @@ public class UserConfigurationData {
         this.wallTimeLimit = wallTimeLimit;
     }
 
-    @Basic
     @Column(name = "TOTAL_PHYSICAL_MEMORY")
     public Integer getTotalPhysicalMemory() {
         return totalPhysicalMemory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Users.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Users.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Users.java
index f6dc587..e9c205b 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Users.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Users.java
@@ -27,7 +27,6 @@ import javax.persistence.*;
 import java.util.Collection;
 
 @Entity
-@Cacheable
 @Table(name = "USERS")
 public class Users {
     private final static Logger logger = LoggerFactory.getLogger(Users.class);
@@ -48,7 +47,6 @@ public class Users {
         this.userName = userName;
     }
 
-    @Basic
     @Column(name = "PASSWORD")
     public String getPassword() {
         return password;

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java
index 86b2e34..5a69783 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java
@@ -136,7 +136,12 @@ public class ExperimentErrorResource extends AbstractExpCatResource {
             experimentErrorPK.setExperimentId(experimentId);
             experimentErrorPK.setErrorId(errorId);
             ExperimentError existingExpError = em.find(ExperimentError.class, experimentErrorPK);
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 
             if (existingExpError == null){
                 experimentError = new ExperimentError();
@@ -158,7 +163,12 @@ public class ExperimentErrorResource extends AbstractExpCatResource {
                 em.merge(experimentError);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/bb43bfdd/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java
index 855735c..eea0a8d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java
@@ -180,7 +180,12 @@ public class ExperimentInputResource extends AbstractExpCatResource {
             experimentInputPK.setExperimentId(experimentId);
             experimentInputPK.setInputName(inputName);
             ExperimentInput existingExpInput = em.find(ExperimentInput.class, experimentInputPK);
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 
             em = ExpCatResourceUtils.getEntityManager();
             em.getTransaction().begin();
@@ -207,7 +212,12 @@ public class ExperimentInputResource extends AbstractExpCatResource {
                 em.merge(experimentInput);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new RegistryException(e);


Mime
View raw message