airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject git commit: adding test class to compute resource - AIRAVATA-1305
Date Tue, 01 Jul 2014 18:09:24 GMT
Repository: airavata
Updated Branches:
  refs/heads/master a2a27146a -> 8456e5bff


adding test class to compute resource - AIRAVATA-1305


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

Branch: refs/heads/master
Commit: 8456e5bffd6604b398d3c0f825d6bda1fded0ef9
Parents: a2a2714
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Tue Jul 1 14:09:19 2014 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Tue Jul 1 14:09:19 2014 -0400

----------------------------------------------------------------------
 .../appcatalog/cpi/ComputeResource.java         |  10 +-
 .../catalog/data/impl/ComputeResourceImpl.java  |  75 +++--------
 .../catalog/data/model/GSISSHSubmission.java    |  21 ---
 .../catalog/data/model/GlobusJobSubmission.java |  21 ---
 .../catalog/data/model/GridFTPDataMovement.java |  22 ----
 .../catalog/data/model/SCPDataMovement.java     |  21 ---
 .../catalog/data/model/SSHSubmission.java       |  21 ---
 .../data/resources/AbstractResource.java        |   5 -
 .../resources/GSISSHSubmissionResource.java     |  48 +------
 .../resources/GlobusJobSubmissionResource.java  |  52 +-------
 .../resources/GridFTPDataMovementResource.java  |  40 +-----
 .../data/resources/SCPDataMovementResource.java |  59 +--------
 .../data/resources/SSHSubmissionResource.java   |  68 +---------
 .../catalog/data/util/AppCatalogJPAUtils.java   |  10 --
 .../data/util/AppCatalogThriftConversion.java   |  12 +-
 .../src/main/resources/appcatalog-derby.sql     |  19 +--
 .../src/main/resources/appcatalog-mysql.sql     |  20 +--
 .../app/catalog/test/ComputeResourceTest.java   | 128 ++++++++++++++++++-
 .../src/test/resources/appcatalog-derby.sql     |  19 +--
 19 files changed, 169 insertions(+), 502 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
index 179e89a..e0766d5 100644
--- a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
+++ b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java
@@ -24,7 +24,7 @@ public interface ComputeResource {
      * @param sshJobSubmission sshJobSubmission object
      * @return unique submission ID generated by airavata
      */
-    String addSSHJobSubmission (String computeResourceId, SSHJobSubmission sshJobSubmission) throws AppCatalogException;
+    String addSSHJobSubmission (SSHJobSubmission sshJobSubmission) throws AppCatalogException;
 
     /**
      * This will add a SSHJobSubmission protocol to the database
@@ -38,7 +38,7 @@ public interface ComputeResource {
      * @param gsisshJobSubmission GSISSHJobSubmission object
      * @return uniquely generated submission id
      */
-    String addGSISSHJobSubmission (String computeResourceId, GSISSHJobSubmission gsisshJobSubmission) throws AppCatalogException;
+    String addGSISSHJobSubmission (GSISSHJobSubmission gsisshJobSubmission) throws AppCatalogException;
 
     /**
      * This will add a GSISSHJobSubmission protocol to the database
@@ -52,7 +52,7 @@ public interface ComputeResource {
      * @param globusJobSubmission GSISSHJobSubmission object
      * @return uniquely generated submission id
      */
-    String addGlobusJobSubmission (String computeResourceId, GlobusJobSubmission globusJobSubmission) throws AppCatalogException;
+    String addGlobusJobSubmission (GlobusJobSubmission globusJobSubmission) throws AppCatalogException;
 
     /**
      * This will add a GlobusJobSubmission protocol to the database
@@ -66,7 +66,7 @@ public interface ComputeResource {
      * @param scpDataMovement SCPData movement object
      * @return uniquely generated data move id
      */
-    String addScpDataMovement (String computeResourceId, SCPDataMovement scpDataMovement) throws AppCatalogException;
+    String addScpDataMovement (SCPDataMovement scpDataMovement) throws AppCatalogException;
 
     /**
      * This will add a SCPDataMovement protocol to the database
@@ -80,7 +80,7 @@ public interface ComputeResource {
      * @param gridFTPDataMovement GridFTP Data movement object
      * @return uniquely generated data move id
      */
-    String addGridFTPDataMovement (String computeResourceId, GridFTPDataMovement gridFTPDataMovement) throws AppCatalogException;
+    String addGridFTPDataMovement (GridFTPDataMovement gridFTPDataMovement) throws AppCatalogException;
 
     /**
      * This will add a GridFTPDataMovement protocol to the database

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index a16028b..ffe2857 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -182,17 +182,13 @@ public class ComputeResourceImpl implements ComputeResource {
     }
 
     @Override
-    public String addSSHJobSubmission(String computeResourceId, SSHJobSubmission sshJobSubmission) throws AppCatalogException {
+    public String addSSHJobSubmission(SSHJobSubmission sshJobSubmission) throws AppCatalogException {
         try {
             SSHSubmissionResource resource = new SSHSubmissionResource();
-            resource.setResourceID(computeResourceId);
-            ComputeResourceDescription computeResource = getComputeResource(computeResourceId);
-            String hostName = computeResource.getHostName();
-            hostName = "SSH_" + hostName;
+            String hostName = "SSH";
             resource.setSubmissionID(AppCatalogUtils.getID(hostName));
             resource.setSshPort(resource.getSshPort());
             resource.setResourceJobManager(sshJobSubmission.getResourceJobManager().toString());
-            resource.setComputeHostResource(AppCatalogThriftConversion.getComputeHostResource(computeResource));
             resource.save();
             sshJobSubmission.setJobSubmissionDataID(resource.getSubmissionID());
             return resource.getSubmissionID();
@@ -219,17 +215,13 @@ public class ComputeResourceImpl implements ComputeResource {
     }
 
     @Override
-    public String addGSISSHJobSubmission(String computeResourceId, GSISSHJobSubmission gsisshJobSubmission) throws AppCatalogException {
+    public String addGSISSHJobSubmission(GSISSHJobSubmission gsisshJobSubmission) throws AppCatalogException {
         try {
             GSISSHSubmissionResource resource = new GSISSHSubmissionResource();
-            resource.setResourceID(computeResourceId);
-            ComputeResourceDescription computeResource = getComputeResource(computeResourceId);
-            String hostName = computeResource.getHostName();
-            hostName = "GSISSH" + hostName;
+            String hostName = "GSISSH";
             resource.setSubmissionID(AppCatalogUtils.getID(hostName));
             resource.setSshPort(resource.getSshPort());
             resource.setResourceJobManager(gsisshJobSubmission.getResourceJobManager().toString());
-            resource.setComputeHostResource(AppCatalogThriftConversion.getComputeHostResource(computeResource));
             resource.setInstalledPath(gsisshJobSubmission.getInstalledPath());
             resource.setMonitorMode(gsisshJobSubmission.getMonitorMode());
             resource.save();
@@ -291,17 +283,13 @@ public class ComputeResourceImpl implements ComputeResource {
     }
 
     @Override
-    public String addGlobusJobSubmission(String computeResourceId, GlobusJobSubmission globusJobSubmission) throws AppCatalogException {
+    public String addGlobusJobSubmission(GlobusJobSubmission globusJobSubmission) throws AppCatalogException {
         try {
             GlobusJobSubmissionResource resource = new GlobusJobSubmissionResource();
-            resource.setResourceID(computeResourceId);
-            ComputeResourceDescription computeResource = getComputeResource(computeResourceId);
-            String hostName = computeResource.getHostName();
-            hostName = "GLOBUS" + hostName;
+            String hostName = "GLOBUS";
             resource.setSubmissionID(AppCatalogUtils.getID(hostName));
             resource.setSecurityProtocol(globusJobSubmission.getSecurityProtocol().toString());
             resource.setResourceJobManager(globusJobSubmission.getResourceJobManager().toString());
-            resource.setComputeHostResource(AppCatalogThriftConversion.getComputeHostResource(computeResource));
             resource.save();
             globusJobSubmission.setJobSubmissionDataID(resource.getSubmissionID());
             List<String> globusGateKeeperEndPoint = globusJobSubmission.getGlobusGateKeeperEndPoint();
@@ -339,17 +327,13 @@ public class ComputeResourceImpl implements ComputeResource {
     }
 
     @Override
-    public String addScpDataMovement(String computeResourceId, SCPDataMovement scpDataMovement) throws AppCatalogException {
+    public String addScpDataMovement(SCPDataMovement scpDataMovement) throws AppCatalogException {
         try {
             SCPDataMovementResource resource = new SCPDataMovementResource();
-            resource.setResourceID(computeResourceId);
-            ComputeResourceDescription computeResource = getComputeResource(computeResourceId);
-            String hostName = computeResource.getHostName();
-            hostName = "SCP" + hostName;
+            String hostName = "SCP";
             resource.setDataMoveID(AppCatalogUtils.getID(hostName));
             resource.setSecurityProtocol(scpDataMovement.getSecurityProtocol().toString());
             resource.setSshPort(scpDataMovement.getSshPort());
-            resource.setComputeHostResource(AppCatalogThriftConversion.getComputeHostResource(computeResource));
             resource.save();
             scpDataMovement.setDataMovementDataID(resource.getDataMoveID());
             return resource.getDataMoveID();
@@ -376,16 +360,12 @@ public class ComputeResourceImpl implements ComputeResource {
     }
 
     @Override
-    public String addGridFTPDataMovement(String computeResourceId, GridFTPDataMovement gridFTPDataMovement) throws AppCatalogException {
+    public String addGridFTPDataMovement(GridFTPDataMovement gridFTPDataMovement) throws AppCatalogException {
         try {
             GridFTPDataMovementResource resource = new GridFTPDataMovementResource();
-            resource.setResourceID(computeResourceId);
-            ComputeResourceDescription computeResource = getComputeResource(computeResourceId);
-            String hostName = computeResource.getHostName();
-            hostName = "SCP" + hostName;
+            String hostName = "GRID_FTP";
             resource.setDataMoveID(AppCatalogUtils.getID(hostName));
             resource.setSecurityProtocol(gridFTPDataMovement.getSecurityProtocol().toString());
-            resource.setComputeHostResource(AppCatalogThriftConversion.getComputeHostResource(computeResource));
             resource.save();
             gridFTPDataMovement.setDataMovementDataID(resource.getDataMoveID());
 
@@ -478,12 +458,7 @@ public class ComputeResourceImpl implements ComputeResource {
         try {
             GSISSHSubmissionResource resource = new GSISSHSubmissionResource();
             for (String fieldName : filters.keySet() ){
-                if (fieldName.equals(AbstractResource.GSISSHSubmissionConstants.RESOURCE_ID)){
-                    List<Resource> resources = resource.get(AbstractResource.GSISSHSubmissionConstants.RESOURCE_ID, filters.get(fieldName));
-                    if (resources != null && !resources.isEmpty()){
-                        return AppCatalogThriftConversion.getGSISSHSubmissionList(resources);
-                    }
-                }else if (fieldName.equals(AbstractResource.GSISSHSubmissionConstants.RESOURCE_JOB_MANAGER)){
+                if (fieldName.equals(AbstractResource.GSISSHSubmissionConstants.RESOURCE_JOB_MANAGER)){
                     List<Resource> resources = resource.get(AbstractResource.GSISSHSubmissionConstants.RESOURCE_JOB_MANAGER, filters.get(fieldName));
                     if (resources != null && !resources.isEmpty()){
                         return AppCatalogThriftConversion.getGSISSHSubmissionList(resources);
@@ -517,12 +492,7 @@ public class ComputeResourceImpl implements ComputeResource {
         try {
             GlobusJobSubmissionResource resource = new GlobusJobSubmissionResource();
             for (String fieldName : filters.keySet() ){
-                if (fieldName.equals(AbstractResource.GlobusJobSubmissionConstants.RESOURCE_ID)){
-                    List<Resource> resources = resource.get(AbstractResource.GlobusJobSubmissionConstants.RESOURCE_ID, filters.get(fieldName));
-                    if (resources != null && !resources.isEmpty()){
-                        return AppCatalogThriftConversion.getGlobusSubmissionList(resources);
-                    }
-                }else if (fieldName.equals(AbstractResource.GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER)){
+                if (fieldName.equals(AbstractResource.GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER)){
                     List<Resource> resources = resource.get(AbstractResource.GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER, filters.get(fieldName));
                     if (resources != null && !resources.isEmpty()){
                         return AppCatalogThriftConversion.getGlobusSubmissionList(resources);
@@ -561,12 +531,7 @@ public class ComputeResourceImpl implements ComputeResource {
         try {
             SSHSubmissionResource resource = new SSHSubmissionResource();
             for (String fieldName : filters.keySet() ){
-                if (fieldName.equals(AbstractResource.SSHSubmissionConstants.RESOURCE_ID)){
-                    List<Resource> resources = resource.get(AbstractResource.SSHSubmissionConstants.RESOURCE_ID, filters.get(fieldName));
-                    if (resources != null && !resources.isEmpty()){
-                        return AppCatalogThriftConversion.getSSHSubmissionList(resources);
-                    }
-                }else if (fieldName.equals(AbstractResource.SSHSubmissionConstants.RESOURCE_JOB_MANAGER)){
+               if (fieldName.equals(AbstractResource.SSHSubmissionConstants.RESOURCE_JOB_MANAGER)){
                     List<Resource> resources = resource.get(AbstractResource.SSHSubmissionConstants.RESOURCE_JOB_MANAGER, filters.get(fieldName));
                     if (resources != null && !resources.isEmpty()){
                         return AppCatalogThriftConversion.getSSHSubmissionList(resources);
@@ -600,12 +565,7 @@ public class ComputeResourceImpl implements ComputeResource {
         try {
             SCPDataMovementResource resource = new SCPDataMovementResource();
             for (String fieldName : filters.keySet() ){
-                if (fieldName.equals(AbstractResource.SCPDataMovementConstants.RESOURCE_ID)){
-                    List<Resource> resources = resource.get(AbstractResource.SCPDataMovementConstants.RESOURCE_ID, filters.get(fieldName));
-                    if (resources != null && !resources.isEmpty()){
-                        return AppCatalogThriftConversion.getSCPDataMovementList(resources);
-                    }
-                }else if (fieldName.equals(AbstractResource.SCPDataMovementConstants.SECURITY_PROTOCOL)){
+                if (fieldName.equals(AbstractResource.SCPDataMovementConstants.SECURITY_PROTOCOL)){
                     List<Resource> resources = resource.get(AbstractResource.SCPDataMovementConstants.SECURITY_PROTOCOL, filters.get(fieldName));
                     if (resources != null && !resources.isEmpty()){
                         return AppCatalogThriftConversion.getSCPDataMovementList(resources);
@@ -639,12 +599,7 @@ public class ComputeResourceImpl implements ComputeResource {
         try {
             GridFTPDataMovementResource resource = new GridFTPDataMovementResource();
             for (String fieldName : filters.keySet() ){
-                if (fieldName.equals(AbstractResource.GridFTPDataMovementConstants.RESOURCE_ID)){
-                    List<Resource> resources = resource.get(AbstractResource.GridFTPDataMovementConstants.RESOURCE_ID, filters.get(fieldName));
-                    if (resources != null && !resources.isEmpty()){
-                        return AppCatalogThriftConversion.getGridFTPDataMovementList(resources);
-                    }
-                }else if (fieldName.equals(AbstractResource.GridFTPDataMovementConstants.SECURITY_PROTOCOL)){
+                if (fieldName.equals(AbstractResource.GridFTPDataMovementConstants.SECURITY_PROTOCOL)){
                     List<Resource> resources = resource.get(AbstractResource.GridFTPDataMovementConstants.SECURITY_PROTOCOL, filters.get(fieldName));
                     if (resources != null && !resources.isEmpty()){
                         return AppCatalogThriftConversion.getGridFTPDataMovementList(resources);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHSubmission.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHSubmission.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHSubmission.java
index 5db2dd4..6793fcf 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHSubmission.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GSISSHSubmission.java
@@ -27,8 +27,6 @@ import java.io.Serializable;
 @Entity
 @Table(name = "GSISSH_SUBMISSION")
 public class GSISSHSubmission implements Serializable {
-    @Column(name = "RESOURCE_ID")
-    private String resourceID;
     @Id
     @Column(name = "SUBMISSION_ID")
     private String submissionID;
@@ -41,18 +39,6 @@ public class GSISSHSubmission implements Serializable {
     @Column(name = "MONITOR_MODE")
     private String monitorMode;
 
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "RESOURCE_ID")
-    private ComputeResource computeResource;
-
-    public String getResourceID() {
-        return resourceID;
-    }
-
-    public void setResourceID(String resourceID) {
-        this.resourceID = resourceID;
-    }
-
     public String getSubmissionID() {
         return submissionID;
     }
@@ -93,11 +79,4 @@ public class GSISSHSubmission implements Serializable {
         this.monitorMode = monitorMode;
     }
 
-    public ComputeResource getComputeResource() {
-        return computeResource;
-    }
-
-    public void setComputeResource(ComputeResource computeResource) {
-        this.computeResource = computeResource;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GlobusJobSubmission.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GlobusJobSubmission.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GlobusJobSubmission.java
index 5775fd8..19f80b1 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GlobusJobSubmission.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GlobusJobSubmission.java
@@ -27,8 +27,6 @@ import java.io.Serializable;
 @Entity
 @Table(name = "GLOBUS_SUBMISSION")
 public class GlobusJobSubmission implements Serializable {
-    @Column(name = "RESOURCE_ID")
-    private String resourceID;
     @Id
     @Column(name = "SUBMISSION_ID")
     private String submissionID;
@@ -37,18 +35,6 @@ public class GlobusJobSubmission implements Serializable {
     @Column(name = "SECURITY_PROTOCAL")
     private String securityProtocol;
 
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "RESOURCE_ID")
-    private ComputeResource computeResource;
-
-    public String getResourceID() {
-        return resourceID;
-    }
-
-    public void setResourceID(String resourceID) {
-        this.resourceID = resourceID;
-    }
-
     public String getSubmissionID() {
         return submissionID;
     }
@@ -73,11 +59,4 @@ public class GlobusJobSubmission implements Serializable {
         this.securityProtocol = securityProtocol;
     }
 
-    public ComputeResource getComputeResource() {
-        return computeResource;
-    }
-
-    public void setComputeResource(ComputeResource computeResource) {
-        this.computeResource = computeResource;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GridFTPDataMovement.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GridFTPDataMovement.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GridFTPDataMovement.java
index dc2920d..3b9639b 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GridFTPDataMovement.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/GridFTPDataMovement.java
@@ -30,17 +30,11 @@ public class GridFTPDataMovement implements Serializable {
     @Id
     @Column(name = "DATA_MOVE_ID")
     private String dataMoveID;
-    @Column(name = "RESOURCE_ID")
-    private String resourceID;
     @Column(name = "SECURITY_PROTOCOL")
     private String securityProtocol;
     @Column(name = "GRID_FTP_EP")
     private String gridFTPEP;
 
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "RESOURCE_ID")
-    private ComputeResource computeResource;
-
     public String getDataMoveID() {
         return dataMoveID;
     }
@@ -49,14 +43,6 @@ public class GridFTPDataMovement implements Serializable {
         this.dataMoveID = dataMoveID;
     }
 
-    public String getResourceID() {
-        return resourceID;
-    }
-
-    public void setResourceID(String resourceID) {
-        this.resourceID = resourceID;
-    }
-
     public String getSecurityProtocol() {
         return securityProtocol;
     }
@@ -72,12 +58,4 @@ public class GridFTPDataMovement implements Serializable {
     public void setGridFTPEP(String gridFTPEP) {
         this.gridFTPEP = gridFTPEP;
     }
-
-    public ComputeResource getComputeResource() {
-        return computeResource;
-    }
-
-    public void setComputeResource(ComputeResource computeResource) {
-        this.computeResource = computeResource;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SCPDataMovement.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SCPDataMovement.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SCPDataMovement.java
index 5ce460c..fd0209f 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SCPDataMovement.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SCPDataMovement.java
@@ -27,8 +27,6 @@ import java.io.Serializable;
 @Entity
 @Table(name = "SCP_DATAMOVEMENT")
 public class SCPDataMovement implements Serializable {
-    @Column(name = "RESOURCE_ID")
-    private String resourceID;
     @Id
     @Column(name = "DATA_MOVE_ID")
     private String dataMoveID;
@@ -37,18 +35,6 @@ public class SCPDataMovement implements Serializable {
     @Column(name = "SSH_PORT")
     private int sshPort;
 
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "RESOURCE_ID")
-    private ComputeResource computeResource;
-
-    public String getResourceID() {
-        return resourceID;
-    }
-
-    public void setResourceID(String resourceID) {
-        this.resourceID = resourceID;
-    }
-
     public String getDataMoveID() {
         return dataMoveID;
     }
@@ -73,11 +59,4 @@ public class SCPDataMovement implements Serializable {
         this.sshPort = sshPort;
     }
 
-    public ComputeResource getComputeResource() {
-        return computeResource;
-    }
-
-    public void setComputeResource(ComputeResource computeResource) {
-        this.computeResource = computeResource;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SSHSubmission.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SSHSubmission.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SSHSubmission.java
index d0b1293..507578a 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SSHSubmission.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SSHSubmission.java
@@ -27,8 +27,6 @@ import java.io.Serializable;
 @Entity
 @Table(name = "SSH_SUBMISSION")
 public class SSHSubmission implements Serializable {
-    @Column(name = "RESOURCE_ID")
-    private String resourceID;
     @Id
     @Column(name = "SUBMISSION_ID")
     private String submissionID;
@@ -37,18 +35,6 @@ public class SSHSubmission implements Serializable {
     @Column(name = "SSH_PORT")
     private int sshPort;
 
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "RESOURCE_ID")
-    private ComputeResource computeResource;
-
-    public String getResourceID() {
-        return resourceID;
-    }
-
-    public void setResourceID(String resourceID) {
-        this.resourceID = resourceID;
-    }
-
     public String getSubmissionID() {
         return submissionID;
     }
@@ -73,11 +59,4 @@ public class SSHSubmission implements Serializable {
         this.sshPort = sshPort;
     }
 
-    public ComputeResource getComputeResource() {
-        return computeResource;
-    }
-
-    public void setComputeResource(ComputeResource computeResource) {
-        this.computeResource = computeResource;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
index 6f0af6a..be5fecc 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
@@ -72,7 +72,6 @@ public abstract class AbstractResource implements Resource {
 
     // GSSISSH Submission Table
     public final class GSISSHSubmissionConstants {
-        public static final String RESOURCE_ID = "resourceID";
         public static final String SUBMISSION_ID = "submissionID";
         public static final String RESOURCE_JOB_MANAGER = "resourceJobManager";
         public static final String SSH_PORT = "sshPort";
@@ -100,7 +99,6 @@ public abstract class AbstractResource implements Resource {
 
     // GSSISSH Post Job Command Table
     public final class GlobusJobSubmissionConstants {
-        public static final String RESOURCE_ID = "resourceID";
         public static final String SUBMISSION_ID = "submissionID";
         public static final String RESOURCE_JOB_MANAGER = "resourceJobManager";
         public static final String SECURITY_PROTOCAL = "securityProtocol";
@@ -114,21 +112,18 @@ public abstract class AbstractResource implements Resource {
 
     // GSSISSH Post Job Command Table
     public final class SSHSubmissionConstants {
-        public static final String RESOURCE_ID = "resourceID";
         public static final String SUBMISSION_ID = "submissionID";
         public static final String RESOURCE_JOB_MANAGER = "resourceJobManager";
         public static final String SSH_PORT = "sshPort";
     }
 
     public final class SCPDataMovementConstants {
-        public static final String RESOURCE_ID = "resourceID";
         public static final String DATA_MOVE_ID = "dataMoveID";
         public static final String SECURITY_PROTOCOL = "securityProtocol";
         public static final String SSH_PORT = "sshPort";
     }
 
     public final class GridFTPDataMovementConstants {
-        public static final String RESOURCE_ID = "resourceID";
         public static final String DATA_MOVE_ID = "dataMoveID";
         public static final String SECURITY_PROTOCOL = "securityProtocol";
         public static final String GRID_FTP_EP = "gridFTPEP";

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GSISSHSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GSISSHSubmissionResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GSISSHSubmissionResource.java
index 4408761..56de205 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GSISSHSubmissionResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GSISSHSubmissionResource.java
@@ -19,15 +19,12 @@ public class GSISSHSubmissionResource extends AbstractResource {
 
     private final static Logger logger = LoggerFactory.getLogger(GSISSHSubmissionResource.class);
 
-    private String resourceID;
     private String submissionID;
     private String resourceJobManager;
     private int sshPort;
     private String installedPath;
     private String monitorMode;
 
-    private ComputeHostResource computeHostResource;
-
     public void remove(Object identifier) throws AppCatalogException {
         EntityManager em = null;
         try {
@@ -89,20 +86,7 @@ public class GSISSHSubmissionResource extends AbstractResource {
             Query q;
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GSISSH_SUBMISSION);
             List results;
-            if (fieldName.equals(GSISSHSubmissionConstants.RESOURCE_ID)) {
-                generator.setParameter(GSISSHSubmissionConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
-                        GSISSHSubmissionResource gsisshSubmissionResource =
-                                (GSISSHSubmissionResource) AppCatalogJPAUtils.getResource(
-                                        AppCatalogResourceType.GSISSH_SUBMISSION, gsisshSubmission);
-                        gsiSSHSubmissionResourceList.add(gsisshSubmissionResource);
-                    }
-                }
-            } else if (fieldName.equals(GSISSHSubmissionConstants.MONITOR_MODE)) {
+            if (fieldName.equals(GSISSHSubmissionConstants.MONITOR_MODE)) {
                 generator.setParameter(GSISSHSubmissionConstants.MONITOR_MODE, value);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
@@ -235,16 +219,6 @@ public class GSISSHSubmissionResource extends AbstractResource {
                         gsiSSHSubmissionResourceIDs.add(gsisshSubmission.getSubmissionID());
                     }
                 }
-            } else if (fieldName.equals(GSISSHSubmissionConstants.RESOURCE_ID)) {
-                generator.setParameter(GSISSHSubmissionConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
-                        gsiSSHSubmissionResourceIDs.add(gsisshSubmission.getSubmissionID());
-                    }
-                }
             } else {
                 em.getTransaction().commit();
                 em.close();
@@ -276,25 +250,20 @@ public class GSISSHSubmissionResource extends AbstractResource {
 
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
-            ComputeResource computeResource = em.find(ComputeResource.class, resourceID);
             if (existingGSISSHSubmission != null) {
                 existingGSISSHSubmission.setSubmissionID(submissionID);
-                existingGSISSHSubmission.setResourceID(resourceID);
                 existingGSISSHSubmission.setSshPort(sshPort);
                 existingGSISSHSubmission.setResourceJobManager(resourceJobManager);
                 existingGSISSHSubmission.setInstalledPath(installedPath);
                 existingGSISSHSubmission.setMonitorMode(monitorMode);
-                existingGSISSHSubmission.setComputeResource(computeResource);
                 em.merge(existingGSISSHSubmission);
             } else {
                 GSISSHSubmission gsisshSubmission = new GSISSHSubmission();
-                gsisshSubmission.setResourceID(resourceID);
                 gsisshSubmission.setSubmissionID(submissionID);
                 gsisshSubmission.setSshPort(sshPort);
                 gsisshSubmission.setResourceJobManager(resourceJobManager);
                 gsisshSubmission.setInstalledPath(installedPath);
                 gsisshSubmission.setMonitorMode(monitorMode);
-                gsisshSubmission.setComputeResource(computeResource);
                 em.persist(gsisshSubmission);
             }
             em.getTransaction().commit();
@@ -333,14 +302,6 @@ public class GSISSHSubmissionResource extends AbstractResource {
         }
     }
 
-    public String getResourceID() {
-        return resourceID;
-    }
-
-    public void setResourceID(String resourceID) {
-        this.resourceID = resourceID;
-    }
-
     public String getSubmissionID() {
         return submissionID;
     }
@@ -381,11 +342,4 @@ public class GSISSHSubmissionResource extends AbstractResource {
         this.monitorMode = monitorMode;
     }
 
-    public ComputeHostResource getComputeHostResource() {
-        return computeHostResource;
-    }
-
-    public void setComputeHostResource(ComputeHostResource computeHostResource) {
-        this.computeHostResource = computeHostResource;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GlobusJobSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GlobusJobSubmissionResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GlobusJobSubmissionResource.java
index 3ac0d5f..ed547cb 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GlobusJobSubmissionResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GlobusJobSubmissionResource.java
@@ -19,13 +19,10 @@ public class GlobusJobSubmissionResource extends AbstractResource {
 
     private final static Logger logger = LoggerFactory.getLogger(GlobusJobSubmissionResource.class);
 
-    private String resourceID;
     private String submissionID;
     private String resourceJobManager;
     private String securityProtocol;
 
-    private ComputeHostResource computeHostResource;
-
     public void remove(Object identifier) throws AppCatalogException {
         EntityManager em = null;
         try {
@@ -87,20 +84,7 @@ public class GlobusJobSubmissionResource extends AbstractResource {
             Query q;
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GLOBUS_SUBMISSION);
             List results;
-            if (fieldName.equals(GlobusJobSubmissionConstants.RESOURCE_ID)) {
-                generator.setParameter(GlobusJobSubmissionConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        GlobusJobSubmission globusJobSubmission = (GlobusJobSubmission) result;
-                        GlobusJobSubmissionResource globusJobSubmissionResource =
-                                (GlobusJobSubmissionResource) AppCatalogJPAUtils.getResource(
-                                        AppCatalogResourceType.GLOBUS_SUBMISSION, globusJobSubmission);
-                        globusSubmissionResourceList.add(globusJobSubmissionResource);
-                    }
-                }
-            }  else if (fieldName.equals(GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER)) {
+            if (fieldName.equals(GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER)) {
                 generator.setParameter(GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER, value);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
@@ -167,18 +151,7 @@ public class GlobusJobSubmissionResource extends AbstractResource {
                         globusSubmissionResourceIDs.add(globusJobSubmission.getSubmissionID());
                     }
                 }
-            } else if (fieldName.equals(GlobusJobSubmissionConstants.RESOURCE_ID)) {
-                generator.setParameter(GlobusJobSubmissionConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        GlobusJobSubmission globusJobSubmission = (GlobusJobSubmission) result;
-                        globusSubmissionResourceIDs.add(globusJobSubmission.getSubmissionID());
-                    }
-                }
-            }
-            else if (fieldName.equals(GlobusJobSubmissionConstants.GLOBUS_GATEKEEPER_EP)) {
+            } else if (fieldName.equals(GlobusJobSubmissionConstants.GLOBUS_GATEKEEPER_EP)) {
                 generator.setParameter(GlobusJobSubmissionConstants.GLOBUS_GATEKEEPER_EP, value);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
@@ -242,20 +215,14 @@ public class GlobusJobSubmissionResource extends AbstractResource {
             em.getTransaction().begin();
             if (existingGlobusSubmission != null) {
                 existingGlobusSubmission.setSubmissionID(submissionID);
-                existingGlobusSubmission.setResourceID(resourceID);
                 existingGlobusSubmission.setResourceJobManager(resourceJobManager);
                 existingGlobusSubmission.setSecurityProtocol(securityProtocol);
-                ComputeResource computeResource = em.find(ComputeResource.class, resourceID);
-                existingGlobusSubmission.setComputeResource(computeResource);
                 em.merge(existingGlobusSubmission);
             } else {
                 GlobusJobSubmission globusJobSubmission = new GlobusJobSubmission();
-                globusJobSubmission.setResourceID(resourceID);
                 globusJobSubmission.setSubmissionID(submissionID);
                 globusJobSubmission.setSecurityProtocol(securityProtocol);
                 globusJobSubmission.setResourceJobManager(resourceJobManager);
-                ComputeResource computeResource = em.find(ComputeResource.class, resourceID);
-                globusJobSubmission.setComputeResource(computeResource);
                 em.persist(globusJobSubmission);
             }
             em.getTransaction().commit();
@@ -293,14 +260,6 @@ public class GlobusJobSubmissionResource extends AbstractResource {
         }
     }
 
-    public String getResourceID() {
-        return resourceID;
-    }
-
-    public void setResourceID(String resourceID) {
-        this.resourceID = resourceID;
-    }
-
     public String getSubmissionID() {
         return submissionID;
     }
@@ -325,11 +284,4 @@ public class GlobusJobSubmissionResource extends AbstractResource {
         this.securityProtocol = securityProtocol;
     }
 
-    public ComputeHostResource getComputeHostResource() {
-        return computeHostResource;
-    }
-
-    public void setComputeHostResource(ComputeHostResource computeHostResource) {
-        this.computeHostResource = computeHostResource;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GridFTPDataMovementResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GridFTPDataMovementResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GridFTPDataMovementResource.java
index 98e717e..16fc8de 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GridFTPDataMovementResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/GridFTPDataMovementResource.java
@@ -86,19 +86,7 @@ public class GridFTPDataMovementResource extends AbstractResource {
             Query q;
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GRID_FTP_DATAMOVEMENT);
             List results;
-            if (fieldName.equals(GridFTPDataMovementConstants.RESOURCE_ID)) {
-                generator.setParameter(GridFTPDataMovementConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        GridFTPDataMovement gridFTPDataMovement = (GridFTPDataMovement) result;
-                        GridFTPDataMovementResource gridFTPDataMovementResource =
-                                (GridFTPDataMovementResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.GRID_FTP_DATAMOVEMENT, gridFTPDataMovement);
-                        gridFTPDataMoveResources.add(gridFTPDataMovementResource);
-                    }
-                }
-            } else if (fieldName.equals(GridFTPDataMovementConstants.SECURITY_PROTOCOL)) {
+            if (fieldName.equals(GridFTPDataMovementConstants.SECURITY_PROTOCOL)) {
                 generator.setParameter(GridFTPDataMovementConstants.SECURITY_PROTOCOL, value);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
@@ -151,26 +139,6 @@ public class GridFTPDataMovementResource extends AbstractResource {
                         gridFTPDataMoveIDs.add(gridFTPDataMovement.getDataMoveID());
                     }
                 }
-            } else if (fieldName.equals(GridFTPDataMovementConstants.RESOURCE_ID)) {
-                generator.setParameter(GridFTPDataMovementConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        GridFTPDataMovement gridFTPDataMovement = (GridFTPDataMovement) result;
-                        gridFTPDataMoveIDs.add(gridFTPDataMovement.getDataMoveID());
-                    }
-                }
-            } else if (fieldName.equals(GridFTPDataMovementConstants.SECURITY_PROTOCOL)) {
-                generator.setParameter(GridFTPDataMovementConstants.SECURITY_PROTOCOL, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        GridFTPDataMovement gridFTPDataMovement = (GridFTPDataMovement) result;
-                        gridFTPDataMoveIDs.add(gridFTPDataMovement.getDataMoveID());
-                    }
-                }
             } else if (fieldName.equals(GridFTPDataMovementConstants.GRID_FTP_EP)) {
                 generator.setParameter(GridFTPDataMovementConstants.GRID_FTP_EP, value);
                 q = generator.selectQuery(em);
@@ -214,20 +182,14 @@ public class GridFTPDataMovementResource extends AbstractResource {
             em.getTransaction().begin();
             if (existingGridFTPDataMovement != null) {
                 existingGridFTPDataMovement.setDataMoveID(dataMoveID);
-                existingGridFTPDataMovement.setResourceID(resourceID);
                 existingGridFTPDataMovement.setGridFTPEP(gridFTPEP);
                 existingGridFTPDataMovement.setSecurityProtocol(securityProtocol);
-                ComputeResource computeResource = em.find(ComputeResource.class, resourceID);
-                existingGridFTPDataMovement.setComputeResource(computeResource);
                 em.merge(existingGridFTPDataMovement);
             } else {
                 GridFTPDataMovement gridFTPDataMovement = new GridFTPDataMovement();
-                gridFTPDataMovement.setResourceID(resourceID);
                 gridFTPDataMovement.setDataMoveID(dataMoveID);
                 gridFTPDataMovement.setGridFTPEP(gridFTPEP);
                 gridFTPDataMovement.setSecurityProtocol(securityProtocol);
-                ComputeResource computeResource = em.find(ComputeResource.class, resourceID);
-                gridFTPDataMovement.setComputeResource(computeResource);
                 em.persist(gridFTPDataMovement);
             }
             em.getTransaction().commit();

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SCPDataMovementResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SCPDataMovementResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SCPDataMovementResource.java
index 8abb80f..c2c13c8 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SCPDataMovementResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SCPDataMovementResource.java
@@ -18,13 +18,10 @@ import java.util.List;
 public class SCPDataMovementResource extends AbstractResource {
     private final static Logger logger = LoggerFactory.getLogger(SCPDataMovementResource.class);
 
-    private String resourceID;
     private String dataMoveID;
     private String securityProtocol;
     private int sshPort;
 
-    private ComputeHostResource computeHostResource;
-
     public void remove(Object identifier) throws AppCatalogException {
         EntityManager em = null;
         try {
@@ -86,19 +83,7 @@ public class SCPDataMovementResource extends AbstractResource {
             Query q;
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(SCP_DATAMOVEMENT);
             List results;
-            if (fieldName.equals(SCPDataMovementConstants.RESOURCE_ID)) {
-                generator.setParameter(SCPDataMovementConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        SCPDataMovement scpDataMovement = (SCPDataMovement) result;
-                        SCPDataMovementResource scpDataMovementResource =
-                                (SCPDataMovementResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.SCP_DATAMOVEMENT, scpDataMovement);
-                        scpDataMoveResources.add(scpDataMovementResource);
-                    }
-                }
-            } else if (fieldName.equals(SCPDataMovementConstants.SSH_PORT)) {
+            if (fieldName.equals(SCPDataMovementConstants.SSH_PORT)) {
                 generator.setParameter(SCPDataMovementConstants.SSH_PORT, value);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
@@ -153,17 +138,7 @@ public class SCPDataMovementResource extends AbstractResource {
             Query q;
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(SCP_DATAMOVEMENT);
             List results;
-            if (fieldName.equals(SCPDataMovementConstants.DATA_MOVE_ID)) {
-                generator.setParameter(SCPDataMovementConstants.DATA_MOVE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        SCPDataMovement scpDataMovement = (SCPDataMovement) result;
-                        scpDataMoveIDs.add(scpDataMovement.getDataMoveID());
-                    }
-                }
-            }else if (fieldName.equals(SCPDataMovementConstants.SSH_PORT)) {
+            if (fieldName.equals(SCPDataMovementConstants.SSH_PORT)) {
                 generator.setParameter(SCPDataMovementConstants.SSH_PORT, value);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
@@ -173,16 +148,6 @@ public class SCPDataMovementResource extends AbstractResource {
                         scpDataMoveIDs.add(scpDataMovement.getDataMoveID());
                     }
                 }
-            }else if (fieldName.equals(SCPDataMovementConstants.RESOURCE_ID)) {
-                generator.setParameter(SCPDataMovementConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        SCPDataMovement scpDataMovement = (SCPDataMovement) result;
-                        scpDataMoveIDs.add(scpDataMovement.getDataMoveID());
-                    }
-                }
             }else if (fieldName.equals(SCPDataMovementConstants.SECURITY_PROTOCOL)) {
                 generator.setParameter(SCPDataMovementConstants.SECURITY_PROTOCOL, value);
                 q = generator.selectQuery(em);
@@ -224,21 +189,16 @@ public class SCPDataMovementResource extends AbstractResource {
 
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
-            ComputeResource computeResource = em.find(ComputeResource.class, resourceID);
             if (existingSCPDataMovement !=  null){
                 existingSCPDataMovement.setDataMoveID(dataMoveID);
-                existingSCPDataMovement.setResourceID(resourceID);
                 existingSCPDataMovement.setSshPort(sshPort);
                 existingSCPDataMovement.setSecurityProtocol(securityProtocol);
-                existingSCPDataMovement.setComputeResource(computeResource);
                 em.merge(existingSCPDataMovement);
             }else {
                 SCPDataMovement scpDataMovement = new SCPDataMovement();
-                scpDataMovement.setResourceID(resourceID);
                 scpDataMovement.setDataMoveID(dataMoveID);
                 scpDataMovement.setSshPort(sshPort);
                 scpDataMovement.setSecurityProtocol(securityProtocol);
-                scpDataMovement.setComputeResource(computeResource);
                 em.persist(scpDataMovement);
             }
             em.getTransaction().commit();
@@ -277,14 +237,6 @@ public class SCPDataMovementResource extends AbstractResource {
         }
     }
 
-    public String getResourceID() {
-        return resourceID;
-    }
-
-    public void setResourceID(String resourceID) {
-        this.resourceID = resourceID;
-    }
-
     public String getDataMoveID() {
         return dataMoveID;
     }
@@ -309,11 +261,4 @@ public class SCPDataMovementResource extends AbstractResource {
         this.sshPort = sshPort;
     }
 
-    public ComputeHostResource getComputeHostResource() {
-        return computeHostResource;
-    }
-
-    public void setComputeHostResource(ComputeHostResource computeHostResource) {
-        this.computeHostResource = computeHostResource;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SSHSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SSHSubmissionResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SSHSubmissionResource.java
index 3426760..405f199 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SSHSubmissionResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SSHSubmissionResource.java
@@ -18,11 +18,9 @@ import java.util.List;
 public class SSHSubmissionResource extends AbstractResource {
     private final static Logger logger = LoggerFactory.getLogger(SSHSubmissionResource.class);
 
-    private String resourceID;
     private String submissionID;
     private String resourceJobManager;
     private int sshPort;
-    private ComputeHostResource computeHostResource;
 
 
     public void remove(Object identifier) throws AppCatalogException {
@@ -85,19 +83,7 @@ public class SSHSubmissionResource extends AbstractResource {
             Query q;
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(SSH_SUBMISSION);
             List results;
-            if (fieldName.equals(SSHSubmissionConstants.RESOURCE_ID)) {
-                generator.setParameter(SSHSubmissionConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        SSHSubmission sshSubmission = (SSHSubmission) result;
-                        SSHSubmissionResource sshSubmissionResource =
-                                (SSHSubmissionResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.SSH_SUBMISSION, sshSubmission);
-                        sshSubmissionResourceList.add(sshSubmissionResource);
-                    }
-                }
-            } else if (fieldName.equals(SSHSubmissionConstants.RESOURCE_JOB_MANAGER)) {
+            if (fieldName.equals(SSHSubmissionConstants.RESOURCE_JOB_MANAGER)) {
                 generator.setParameter(SSHSubmissionConstants.RESOURCE_JOB_MANAGER, value);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
@@ -140,27 +126,7 @@ public class SSHSubmissionResource extends AbstractResource {
             Query q;
             AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(SSH_SUBMISSION);
             List results;
-            if (fieldName.equals(SSHSubmissionConstants.SUBMISSION_ID)) {
-                generator.setParameter(SSHSubmissionConstants.SUBMISSION_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        SSHSubmission sshSubmission = (SSHSubmission) result;
-                        sshSubmissionResourceIDs.add(sshSubmission.getSubmissionID());
-                    }
-                }
-            } else if (fieldName.equals(SSHSubmissionConstants.RESOURCE_ID)) {
-                generator.setParameter(SSHSubmissionConstants.RESOURCE_ID, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        SSHSubmission sshSubmission = (SSHSubmission) result;
-                        sshSubmissionResourceIDs.add(sshSubmission.getSubmissionID());
-                    }
-                }
-            } else if (fieldName.equals(SSHSubmissionConstants.RESOURCE_JOB_MANAGER)) {
+            if (fieldName.equals(SSHSubmissionConstants.RESOURCE_JOB_MANAGER)) {
                 generator.setParameter(SSHSubmissionConstants.RESOURCE_JOB_MANAGER, value);
                 q = generator.selectQuery(em);
                 results = q.getResultList();
@@ -170,16 +136,6 @@ public class SSHSubmissionResource extends AbstractResource {
                         sshSubmissionResourceIDs.add(sshSubmission.getSubmissionID());
                     }
                 }
-            } else if (fieldName.equals(SSHSubmissionConstants.SSH_PORT)) {
-                generator.setParameter(SSHSubmissionConstants.SSH_PORT, value);
-                q = generator.selectQuery(em);
-                results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        SSHSubmission sshSubmission = (SSHSubmission) result;
-                        sshSubmissionResourceIDs.add(sshSubmission.getSubmissionID());
-                    }
-                }
             } else {
                 em.getTransaction().commit();
                 em.close();
@@ -211,21 +167,16 @@ public class SSHSubmissionResource extends AbstractResource {
 
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
-            ComputeResource computeResource = em.find(ComputeResource.class, resourceID);
             if (existingSSHSubmission != null) {
                 existingSSHSubmission.setSubmissionID(submissionID);
-                existingSSHSubmission.setResourceID(resourceID);
                 existingSSHSubmission.setSshPort(sshPort);
                 existingSSHSubmission.setResourceJobManager(resourceJobManager);
-                existingSSHSubmission.setComputeResource(computeResource);
                 em.merge(existingSSHSubmission);
             } else {
                 SSHSubmission sshSubmission = new SSHSubmission();
-                sshSubmission.setResourceID(resourceID);
                 sshSubmission.setSubmissionID(submissionID);
                 sshSubmission.setSshPort(sshPort);
                 sshSubmission.setResourceJobManager(resourceJobManager);
-                sshSubmission.setComputeResource(computeResource);
                 em.persist(sshSubmission);
             }
             em.getTransaction().commit();
@@ -263,14 +214,6 @@ public class SSHSubmissionResource extends AbstractResource {
         }
     }
 
-    public String getResourceID() {
-        return resourceID;
-    }
-
-    public void setResourceID(String resourceID) {
-        this.resourceID = resourceID;
-    }
-
     public String getSubmissionID() {
         return submissionID;
     }
@@ -295,11 +238,4 @@ public class SSHSubmissionResource extends AbstractResource {
         this.sshPort = sshPort;
     }
 
-    public ComputeHostResource getComputeHostResource() {
-        return computeHostResource;
-    }
-
-    public void setComputeHostResource(ComputeHostResource computeHostResource) {
-        this.computeHostResource = computeHostResource;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
index 4da2882..1306d3a 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
@@ -286,13 +286,11 @@ public class AppCatalogJPAUtils {
 
     private static Resource createGSSISSHSubmission(GSISSHSubmission o) {
         GSISSHSubmissionResource submissionResource = new GSISSHSubmissionResource();
-        submissionResource.setResourceID(o.getResourceID());
         submissionResource.setSubmissionID(o.getSubmissionID());
         submissionResource.setResourceJobManager(o.getResourceJobManager());
         submissionResource.setSshPort(o.getSshPort());
         submissionResource.setInstalledPath(o.getInstalledPath());
         submissionResource.setMonitorMode(o.getMonitorMode());
-        submissionResource.setComputeHostResource((ComputeHostResource)createComputeResource(o.getComputeResource()));
         return submissionResource;
     }
 
@@ -322,11 +320,9 @@ public class AppCatalogJPAUtils {
 
     private static Resource createGlobusJobSubmission(GlobusJobSubmission o) {
         GlobusJobSubmissionResource resource = new GlobusJobSubmissionResource();
-        resource.setResourceID(o.getResourceID());
         resource.setSubmissionID(o.getSubmissionID());
         resource.setResourceJobManager(o.getResourceJobManager());
         resource.setSecurityProtocol(o.getSecurityProtocol());
-        resource.setComputeHostResource((ComputeHostResource)createComputeResource(o.getComputeResource()));
         return resource;
     }
 
@@ -340,31 +336,25 @@ public class AppCatalogJPAUtils {
 
     private static Resource createSSHSubmission(SSHSubmission o) {
         SSHSubmissionResource resource = new SSHSubmissionResource();
-        resource.setResourceID(o.getResourceID());
         resource.setSubmissionID(o.getSubmissionID());
         resource.setResourceJobManager(o.getResourceJobManager());
         resource.setSshPort(o.getSshPort());
-        resource.setComputeHostResource((ComputeHostResource)createComputeResource(o.getComputeResource()));
         return resource;
     }
 
     private static Resource createSCPDataMovement(SCPDataMovement o) {
         SCPDataMovementResource resource = new SCPDataMovementResource();
-        resource.setResourceID(o.getResourceID());
         resource.setDataMoveID(o.getDataMoveID());
         resource.setSecurityProtocol(o.getSecurityProtocol());
         resource.setSshPort(o.getSshPort());
-        resource.setComputeHostResource((ComputeHostResource)createComputeResource(o.getComputeResource()));
         return resource;
     }
 
     private static Resource createGridFTPDataMovement(GridFTPDataMovement o) {
         GridFTPDataMovementResource resource = new GridFTPDataMovementResource();
-        resource.setResourceID(o.getResourceID());
         resource.setDataMoveID(o.getDataMoveID());
         resource.setSecurityProtocol(o.getSecurityProtocol());
         resource.setGridFTPEP(o.getGridFTPEP());
-        resource.setComputeHostResource((ComputeHostResource)createComputeResource(o.getComputeResource()));
         return resource;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
index 1771639..77ef37a 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
@@ -120,13 +120,11 @@ public class AppCatalogThriftConversion {
     }
 
 
-    public static GSISSHSubmissionResource getGSISSHSubmission (ComputeHostResource hostResource, GSISSHJobSubmission submission){
+    public static GSISSHSubmissionResource getGSISSHSubmission (GSISSHJobSubmission submission){
         GSISSHSubmissionResource resource = new GSISSHSubmissionResource();
-        resource.setComputeHostResource(hostResource);
         resource.setSubmissionID(submission.getJobSubmissionDataID());
         resource.setMonitorMode(submission.getMonitorMode());
         resource.setInstalledPath(submission.getInstalledPath());
-        resource.setResourceID(hostResource.getResoureId());
         resource.setResourceJobManager(submission.getResourceJobManager().toString());
         resource.setSshPort(submission.getSshPort());
         return resource;
@@ -284,20 +282,16 @@ public class AppCatalogThriftConversion {
         return list;
     }
 
-    public static GlobusJobSubmissionResource getGlobusJobSubmission (ComputeHostResource hostResource, GlobusJobSubmission submission){
+    public static GlobusJobSubmissionResource getGlobusJobSubmission (GlobusJobSubmission submission){
         GlobusJobSubmissionResource resource = new GlobusJobSubmissionResource();
-        resource.setComputeHostResource(hostResource);
-        resource.setResourceID(hostResource.getResoureId());
         resource.setSubmissionID(submission.getJobSubmissionDataID());
         resource.setSecurityProtocol(submission.getSecurityProtocol().toString());
         resource.setResourceJobManager(submission.getResourceJobManager().toString());
         return resource;
     }
 
-    public static SSHSubmissionResource getSSHJobSubmission (ComputeHostResource hostResource, SSHJobSubmission submission){
+    public static SSHSubmissionResource getSSHJobSubmission (SSHJobSubmission submission){
         SSHSubmissionResource resource = new SSHSubmissionResource();
-        resource.setComputeHostResource(hostResource);
-        resource.setResourceID(hostResource.getResoureId());
         resource.setSubmissionID(submission.getJobSubmissionDataID());
         resource.setResourceJobManager(submission.getResourceJobManager().toString());
         return resource;

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
index 535c372..dc7495b 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
@@ -47,13 +47,11 @@ CREATE TABLE HOST_IPADDRESS
 CREATE TABLE GSISSH_SUBMISSION
 (
          SUBMISSION_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          RESOURCE_JOB_MANAGER VARCHAR(255),
          SSH_PORT INTEGER,
          INSTALLED_PATH VARCHAR(255),
          MONITOR_MODE VARCHAR(255),
-         PRIMARY KEY(SUBMISSION_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(SUBMISSION_ID)
 );
 
 CREATE TABLE GSISSH_EXPORT
@@ -83,11 +81,9 @@ CREATE TABLE GSISSH_POSTJOBCOMMAND
 CREATE TABLE GLOBUS_SUBMISSION
 (
          SUBMISSION_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          RESOURCE_JOB_MANAGER VARCHAR(255),
          SECURITY_PROTOCAL VARCHAR(255),
-         PRIMARY KEY(SUBMISSION_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(SUBMISSION_ID)
 );
 
 CREATE TABLE GLOBUS_GK_ENDPOINT
@@ -101,30 +97,25 @@ CREATE TABLE GLOBUS_GK_ENDPOINT
 CREATE TABLE SSH_SUBMISSION
 (
          SUBMISSION_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          RESOURCE_JOB_MANAGER VARCHAR(255),
          SSH_PORT INTEGER,
-         PRIMARY KEY(SUBMISSION_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(SUBMISSION_ID)
 );
 
 CREATE TABLE SCP_DATAMOVEMENT
 (
          DATA_MOVE_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          SECURITY_PROTOCOL VARCHAR(255),
          SSH_PORT INTEGER,
-         PRIMARY KEY(DATA_MOVE_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(DATA_MOVE_ID)
 );
 
 CREATE TABLE GRID_FTP_DATAMOVEMENT
 (
          DATA_MOVE_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
+         RESOURCE_ID VARCHAR(255)
          SECURITY_PROTOCOL VARCHAR(255),
          PRIMARY KEY(DATA_MOVE_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );
 
 CREATE TABLE GRIDFTP_DM_ENDPOINT

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
index c0b6c5e..6877ca4 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
@@ -47,13 +47,11 @@ CREATE TABLE HOST_IPADDRESS
 CREATE TABLE GSISSH_SUBMISSION
 (
          SUBMISSION_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          RESOURCE_JOB_MANAGER VARCHAR(255),
          SSH_PORT INTEGER,
          INSTALLED_PATH VARCHAR(255),
          MONITOR_MODE VARCHAR(255),
-         PRIMARY KEY(SUBMISSION_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(SUBMISSION_ID)
 );
 
 CREATE TABLE GSISSH_EXPORT
@@ -83,11 +81,9 @@ CREATE TABLE GSISSH_POSTJOBCOMMAND
 CREATE TABLE GLOBUS_SUBMISSION
 (
          SUBMISSION_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          RESOURCE_JOB_MANAGER VARCHAR(255),
          SECURITY_PROTOCAL VARCHAR(255),
-         PRIMARY KEY(SUBMISSION_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(SUBMISSION_ID)
 );
 
 CREATE TABLE GLOBUS_GK_ENDPOINT
@@ -101,30 +97,24 @@ CREATE TABLE GLOBUS_GK_ENDPOINT
 CREATE TABLE SSH_SUBMISSION
 (
          SUBMISSION_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          RESOURCE_JOB_MANAGER VARCHAR(255),
          SSH_PORT INTEGER,
-         PRIMARY KEY(SUBMISSION_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(SUBMISSION_ID)
 );
 
 CREATE TABLE SCP_DATAMOVEMENT
 (
          DATA_MOVE_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          SECURITY_PROTOCOL VARCHAR(255),
          SSH_PORT INTEGER,
-         PRIMARY KEY(DATA_MOVE_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(DATA_MOVE_ID)
 );
 
 CREATE TABLE GRID_FTP_DATAMOVEMENT
 (
          DATA_MOVE_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          SECURITY_PROTOCOL VARCHAR(255),
-         PRIMARY KEY(DATA_MOVE_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(DATA_MOVE_ID)
 );
 
 CREATE TABLE GRIDFTP_DM_ENDPOINT

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java b/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java
index 5d82787..1a465df 100644
--- a/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java
+++ b/modules/app-catalog/app-catalog-data/src/test/java/org/apache/airavata/app/catalog/test/ComputeResourceTest.java
@@ -25,14 +25,17 @@ package org.apache.airavata.app.catalog.test;
 import org.airavata.appcatalog.cpi.AppCatalog;
 import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.airavata.appcatalog.cpi.ComputeResource;
+import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
 import org.apache.aiaravata.application.catalog.data.impl.AppCatalogImpl;
 import org.apache.airavata.app.catalog.test.util.Initialize;
 import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.model.computehost.ComputeResourceDescription;
+import org.apache.airavata.model.computehost.*;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.util.*;
+
 import static org.junit.Assert.assertTrue;
 
 public class ComputeResourceTest {
@@ -41,10 +44,14 @@ public class ComputeResourceTest {
 
     @Before
     public void setUp() {
-        AiravataUtils.setExecutionAsServer();
-        initialize = new Initialize("appcatalog-derby.sql");
-        initialize.initializeDB();
-        appcatalog = new AppCatalogImpl();
+        try {
+            AiravataUtils.setExecutionAsServer();
+            initialize = new Initialize("appcatalog-derby.sql");
+            initialize.initializeDB();
+            appcatalog = AppCatalogFactory.getAppCatalog();
+        } catch (AppCatalogException e) {
+            e.printStackTrace();
+        }
     }
 
     @AfterClass
@@ -57,9 +64,39 @@ public class ComputeResourceTest {
         try {
             ComputeResource computeResource = appcatalog.getComputeResource();
             ComputeResourceDescription description = new ComputeResourceDescription();
+
             description.setHostName("localhost");
             description.setPreferredJobSubmissionProtocol("SSH");
             description.setResourceDescription("test compute resource");
+            Set<String> ipdaresses = new HashSet<String>();
+            ipdaresses.add("222.33.43.444");
+            ipdaresses.add("23.344.44.454");
+            description.setIpAddresses(ipdaresses);
+            Set<String> aliases = new HashSet<String>();
+            aliases.add("test.alias1");
+            aliases.add("test.alias2");
+            description.setHostAliases(aliases);
+            String sshsubmissionId = addSSHJobSubmission();
+            System.out.println("**** SSH Submission id ****** :" + sshsubmissionId);
+            String gsiSSHsubmissionId = addGSISSHJobSubmission();
+            System.out.println("**** GSISSH Submission id ****** :" + gsiSSHsubmissionId);
+            String globusSubmissionId = addGlobusJobSubmission();
+            System.out.println("**** Globus Submission id ****** :" + globusSubmissionId);
+            Map<String, JobSubmissionProtocol> jobProtools = new HashMap<String, JobSubmissionProtocol>();
+            jobProtools.put(sshsubmissionId, JobSubmissionProtocol.SSH);
+            jobProtools.put(gsiSSHsubmissionId, JobSubmissionProtocol.GSISSH);
+            jobProtools.put(globusSubmissionId, JobSubmissionProtocol.GRAM);
+            description.setJobSubmissionProtocols(jobProtools);
+
+            String scpDataMoveId = addSCPDataMovement();
+            System.out.println("**** SCP DataMoveId****** :" + scpDataMoveId);
+            String gridFTPDataMoveId = addGridFTPDataMovement();
+            System.out.println("**** grid FTP DataMoveId****** :" + gridFTPDataMoveId);
+            Map<String, DataMovementProtocol> dataProtools = new HashMap<String, DataMovementProtocol>();
+            dataProtools.put(scpDataMoveId, DataMovementProtocol.SCP);
+            dataProtools.put(gridFTPDataMoveId, DataMovementProtocol.GridFTP);
+            description.setDataMovementProtocols(dataProtools);
+
             String resourceId = computeResource.addComputeResource(description);
             System.out.println("**********Resource id ************* : " +  resourceId);
             ComputeResourceDescription host = computeResource.getComputeResource(resourceId);
@@ -68,8 +105,89 @@ public class ComputeResourceTest {
         } catch (AppCatalogException e) {
             e.printStackTrace();
         }
+    }
+
+    public String addSSHJobSubmission (){
+        try {
+            SSHJobSubmission jobSubmission = new SSHJobSubmission();
+            jobSubmission.setSshPort(22);
+            jobSubmission.setResourceJobManager(ResourceJobManager.PBS);
+            return appcatalog.getComputeResource().addSSHJobSubmission(jobSubmission);
+        } catch (AppCatalogException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public String addGSISSHJobSubmission (){
+        try {
+            GSISSHJobSubmission jobSubmission = new GSISSHJobSubmission();
+            jobSubmission.setSshPort(22);
+            jobSubmission.setResourceJobManager(ResourceJobManager.PBS);
+            Set<String> exports = new HashSet<String>();
+            exports.add("export1");
+            exports.add("export2");
+            jobSubmission.setExports(exports);
+            jobSubmission.setMonitorMode("testMonitormode");
+            List<String> preJobCommands = new ArrayList<String>();
+            preJobCommands.add("prejobcommand1");
+            preJobCommands.add("prejobcommand2");
+            jobSubmission.setPreJobCommands(preJobCommands);
+            List<String> postJobCommands = new ArrayList<String>();
+            postJobCommands.add("postjobcommand1");
+            postJobCommands.add("postjobcommand2");
+            jobSubmission.setPostJobCommands(postJobCommands);
+            jobSubmission.setInstalledPath("installedPath");
+            return appcatalog.getComputeResource().addGSISSHJobSubmission(jobSubmission);
+        } catch (AppCatalogException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public String addGlobusJobSubmission (){
+        try {
+            GlobusJobSubmission jobSubmission = new GlobusJobSubmission();
+            jobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
+            jobSubmission.setResourceJobManager(ResourceJobManager.PBS);
+            List<String> endPoints = new ArrayList<String>();
+            endPoints.add("222.33.43.444");
+            endPoints.add("23.344.44.454");
+            jobSubmission.setGlobusGateKeeperEndPoint(endPoints);
+            return appcatalog.getComputeResource().addGlobusJobSubmission(jobSubmission);
+        } catch (AppCatalogException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public String addSCPDataMovement (){
+        try {
+            SCPDataMovement dataMovement = new SCPDataMovement();
+            dataMovement.setSshPort(22);
+            dataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+            return appcatalog.getComputeResource().addScpDataMovement(dataMovement);
+        }catch (AppCatalogException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
 
+    public String addGridFTPDataMovement (){
+        try {
+            GridFTPDataMovement dataMovement = new GridFTPDataMovement();
+            dataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
+            List<String> endPoints = new ArrayList<String>();
+            endPoints.add("222.33.43.444");
+            endPoints.add("23.344.44.454");
+            dataMovement.setGridFTPEndPoint(endPoints);
+            return appcatalog.getComputeResource().addGridFTPDataMovement(dataMovement);
+        }catch (AppCatalogException e) {
+            e.printStackTrace();
+        }
+        return null;
     }
 
+
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8456e5bf/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql b/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
index 535c372..dc7495b 100644
--- a/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
@@ -47,13 +47,11 @@ CREATE TABLE HOST_IPADDRESS
 CREATE TABLE GSISSH_SUBMISSION
 (
          SUBMISSION_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          RESOURCE_JOB_MANAGER VARCHAR(255),
          SSH_PORT INTEGER,
          INSTALLED_PATH VARCHAR(255),
          MONITOR_MODE VARCHAR(255),
-         PRIMARY KEY(SUBMISSION_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(SUBMISSION_ID)
 );
 
 CREATE TABLE GSISSH_EXPORT
@@ -83,11 +81,9 @@ CREATE TABLE GSISSH_POSTJOBCOMMAND
 CREATE TABLE GLOBUS_SUBMISSION
 (
          SUBMISSION_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          RESOURCE_JOB_MANAGER VARCHAR(255),
          SECURITY_PROTOCAL VARCHAR(255),
-         PRIMARY KEY(SUBMISSION_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(SUBMISSION_ID)
 );
 
 CREATE TABLE GLOBUS_GK_ENDPOINT
@@ -101,30 +97,25 @@ CREATE TABLE GLOBUS_GK_ENDPOINT
 CREATE TABLE SSH_SUBMISSION
 (
          SUBMISSION_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          RESOURCE_JOB_MANAGER VARCHAR(255),
          SSH_PORT INTEGER,
-         PRIMARY KEY(SUBMISSION_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(SUBMISSION_ID)
 );
 
 CREATE TABLE SCP_DATAMOVEMENT
 (
          DATA_MOVE_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
          SECURITY_PROTOCOL VARCHAR(255),
          SSH_PORT INTEGER,
-         PRIMARY KEY(DATA_MOVE_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+         PRIMARY KEY(DATA_MOVE_ID)
 );
 
 CREATE TABLE GRID_FTP_DATAMOVEMENT
 (
          DATA_MOVE_ID VARCHAR(255),
-         RESOURCE_ID VARCHAR(255),
+         RESOURCE_ID VARCHAR(255)
          SECURITY_PROTOCOL VARCHAR(255),
          PRIMARY KEY(DATA_MOVE_ID),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );
 
 CREATE TABLE GRIDFTP_DM_ENDPOINT


Mime
View raw message