airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [03/28] airavata git commit: adding email monitor property to app catalog
Date Wed, 15 Apr 2015 20:48:39 GMT
adding email monitor property to app catalog


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

Branch: refs/heads/emailMonitoring
Commit: f1d300eed52fc8bef586cde568e875ed1b7a5ddb
Parents: 3cdea29
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Mon Apr 13 14:09:52 2015 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Mon Apr 13 14:09:52 2015 -0400

----------------------------------------------------------------------
 .../tools/RegisterSampleApplications.java       |   4 +-
 .../catalog/data/impl/ComputeResourceImpl.java  |  23 +-
 .../catalog/data/model/SshJobSubmission.java    |  22 +-
 .../data/resources/AbstractResource.java        |   5 +
 .../data/resources/EmailPropertyResource.java   | 308 +++++++++++++++++++
 .../resources/SshJobSubmissionResource.java     |  21 --
 .../catalog/data/util/AppCatalogJPAUtils.java   |  22 +-
 .../data/util/AppCatalogResourceType.java       |   3 +-
 .../data/util/AppCatalogThriftConversion.java   |  34 +-
 .../src/main/resources/META-INF/persistence.xml |   1 +
 .../src/main/resources/appcatalog-derby.sql     |  31 +-
 .../src/main/resources/appcatalog-mysql.sql     |  29 +-
 .../app/catalog/test/ComputeResourceTest.java   |  11 +
 .../src/test/resources/appcatalog-derby.sql     |  15 +
 14 files changed, 448 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 19999e0..f90f633 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -536,10 +536,10 @@ public class RegisterSampleApplications {
 //            applicationInputs.add(input2); applicationInputs.add(input3);
 
             OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("Echoed_Output",
-                    "", DataType.STDOUT, false, false);
+                    "", DataType.STDOUT, true, false);
 
             OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("Echoed_Error",
-                    "", DataType.STDERR, false, false);
+                    "", DataType.STDERR, true, false);
 
             List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
             applicationOutputs.add(output1);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/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 75b0987..2c21811 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
@@ -176,13 +176,30 @@ public class ComputeResourceImpl implements ComputeResource {
     @Override
     public String addSSHJobSubmission(SSHJobSubmission sshJobSubmission) throws AppCatalogException
{
         try {
-        	sshJobSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("SSH"));
+            String submissionId = AppCatalogUtils.getID("SSH");
+            sshJobSubmission.setJobSubmissionInterfaceId(submissionId);
     		String resourceJobManagerId = addResourceJobManager(sshJobSubmission.getResourceJobManager());
     		SshJobSubmissionResource resource = AppCatalogThriftConversion.getSSHJobSubmission(sshJobSubmission);
     		resource.setResourceJobManagerId(resourceJobManagerId);
     		resource.getResourceJobManagerResource().setResourceJobManagerId(resourceJobManagerId);
-    		resource.save();
-        	return resource.getJobSubmissionInterfaceId();
+            if (sshJobSubmission.getMonitorMode() != null){
+                resource.setMonitorMode(sshJobSubmission.getMonitorMode().toString());
+            }
+            resource.save();
+            EmailMonitorProperty emailMonitorProperty = sshJobSubmission.getEmailMonitorProperty();
+            if (emailMonitorProperty != null){
+                EmailPropertyResource emailPropertyResource = new EmailPropertyResource();
+                emailPropertyResource.setJobSubmissionInterfaceId(submissionId);
+                emailPropertyResource.setHost(emailMonitorProperty.getHost());
+                emailPropertyResource.setPassword(emailMonitorProperty.getPassword());
+                emailPropertyResource.setEmailAddress(emailMonitorProperty.getEmailAddress());
+                emailPropertyResource.setFolderName(emailMonitorProperty.getFolderName());
+                if (emailMonitorProperty.getStoreProtocol() != null){
+                    emailPropertyResource.setProtocol(emailMonitorProperty.getStoreProtocol().toString());
+                }
+                emailPropertyResource.save();
+            }
+        	return submissionId;
         }catch (Exception e) {
             logger.error("Error while saving SSH Job Submission...", e);
             throw new AppCatalogException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SshJobSubmission.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SshJobSubmission.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SshJobSubmission.java
index 8e812c4..a5a1a8e 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SshJobSubmission.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/SshJobSubmission.java
@@ -32,6 +32,7 @@ import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
 import javax.persistence.Table;
 
+import org.apache.airavata.model.appcatalog.computeresource.EmailMonitorProperty;
 import org.apache.openjpa.persistence.DataCache;
 
 @DataCache
@@ -62,12 +63,6 @@ public class SshJobSubmission implements Serializable {
     @Column(name = "MONITOR_MODE")
     private String monitorMode;
 
-    @Column(name = "EMAIL_MONITOR_PROPERTY_ID")
-    private String emailMonitorPropertyId;
-
-    @JoinColumn(name = "EMAIL_MONITOR_PROPERTY_ID")
-    private EmailMonitorProperty emailMonitorProperty;
-
     @Column(name = "CREATION_TIME")
     private Timestamp creationTime;
 
@@ -147,19 +142,4 @@ public class SshJobSubmission implements Serializable {
         this.monitorMode = monitorMode;
     }
 
-    public EmailMonitorProperty getEmailMonitorProperty() {
-        return emailMonitorProperty;
-    }
-
-    public void setEmailMonitorProperty(EmailMonitorProperty emailMonitorProperty) {
-        this.emailMonitorProperty = emailMonitorProperty;
-    }
-
-    public String getEmailMonitorPropertyId() {
-        return emailMonitorPropertyId;
-    }
-
-    public void setEmailMonitorPropertyId(String emailMonitorPropertyId) {
-        this.emailMonitorPropertyId = emailMonitorPropertyId;
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/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 6887f8a..e1b042d 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
@@ -62,10 +62,15 @@ public abstract class AbstractResource implements Resource {
 	public static final String LOCAL_SUBMISSION = "LocalSubmission";
 	public static final String LOCAL_DATA_MOVEMENT = "LocalDataMovement";
 	public static final String SSH_JOB_SUBMISSION = "SshJobSubmission";
+	public static final String EMAIL_PROPERTY = "EmailMonitorProperty";
     public static final String CLOUD_JOB_SUBMISSION = "CloudJobSubmission";
     public static final String MODULE_LOAD_CMD = "ModuleLoadCmd";
     public static final String WORKFLOW = "Workflow";
 
+    public final class EmailMonitorPropertyConstants {
+        public static final String JOB_SUBMISSION_INTERFACE_ID = "jobSubmissionId";
+    }
+
 	// Compute Resource Table
 	public final class ComputeResourceConstants {
 		public static final String RESOURCE_DESCRIPTION = "resourceDescription";

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/EmailPropertyResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/EmailPropertyResource.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/EmailPropertyResource.java
new file mode 100644
index 0000000..820e0e8
--- /dev/null
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/EmailPropertyResource.java
@@ -0,0 +1,308 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.aiaravata.application.catalog.data.resources;
+
+import org.airavata.appcatalog.cpi.AppCatalogException;
+import org.apache.aiaravata.application.catalog.data.model.EmailMonitorProperty;
+import org.apache.aiaravata.application.catalog.data.model.ResourceJobManager;
+import org.apache.aiaravata.application.catalog.data.model.SshJobSubmission;
+import org.apache.aiaravata.application.catalog.data.util.AppCatalogJPAUtils;
+import org.apache.aiaravata.application.catalog.data.util.AppCatalogQueryGenerator;
+import org.apache.aiaravata.application.catalog.data.util.AppCatalogResourceType;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+public class EmailPropertyResource extends AbstractResource {
+	private final static Logger logger = LoggerFactory.getLogger(EmailPropertyResource.class);
+	private String jobSubmissionInterfaceId;
+	private String host;
+	private String emailAddress;
+	private String password;
+    private String folderName;
+    private String protocol;
+    private SshJobSubmissionResource sshJobSubmissionResource;
+
+	@Override
+	public void remove(Object identifier) throws AppCatalogException {
+		EntityManager em = null;
+		try {
+			em = AppCatalogJPAUtils.getEntityManager();
+			em.getTransaction().begin();
+			AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(EMAIL_PROPERTY);
+			generator.setParameter(EmailMonitorPropertyConstants.JOB_SUBMISSION_INTERFACE_ID, identifier);
+			Query q = generator.deleteQuery(em);
+			q.executeUpdate();
+			em.getTransaction().commit();
+			em.close();
+		} catch (ApplicationSettingsException e) {
+			logger.error(e.getMessage(), e);
+			throw new AppCatalogException(e);
+		} finally {
+			if (em != null && em.isOpen()) {
+				if (em.getTransaction().isActive()) {
+					em.getTransaction().rollback();
+				}
+				em.close();
+			}
+		}
+	}
+	
+	@Override
+	public Resource get(Object identifier) throws AppCatalogException {
+		EntityManager em = null;
+		try {
+			em = AppCatalogJPAUtils.getEntityManager();
+			em.getTransaction().begin();
+			AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(EMAIL_PROPERTY);
+			generator.setParameter(EmailMonitorPropertyConstants.JOB_SUBMISSION_INTERFACE_ID, identifier);
+			Query q = generator.selectQuery(em);
+			EmailMonitorProperty emailProperty = (EmailMonitorProperty) q.getSingleResult();
+			EmailPropertyResource emailPropertyResource = (EmailPropertyResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.EMAIL_MONITOR_PROPERTY,
emailProperty);
+			em.getTransaction().commit();
+			em.close();
+			return emailPropertyResource;
+		} catch (ApplicationSettingsException e) {
+			logger.error(e.getMessage(), e);
+			throw new AppCatalogException(e);
+		} finally {
+			if (em != null && em.isOpen()) {
+				if (em.getTransaction().isActive()) {
+					em.getTransaction().rollback();
+				}
+				em.close();
+			}
+		}
+	}
+	
+	@Override
+	public List<Resource> get(String fieldName, Object value) throws AppCatalogException
{
+		List<Resource> sshJobSubmissionResources = new ArrayList<Resource>();
+		EntityManager em = null;
+		try {
+			em = AppCatalogJPAUtils.getEntityManager();
+			em.getTransaction().begin();
+			AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(EMAIL_PROPERTY);
+			Query q;
+			if (fieldName.equals(EmailMonitorPropertyConstants.JOB_SUBMISSION_INTERFACE_ID)){
+				generator.setParameter(fieldName, value);
+				q = generator.selectQuery(em);
+				List<?> results = q.getResultList();
+				for (Object result : results) {
+					EmailMonitorProperty emailMonitorProperty = (EmailMonitorProperty) result;
+					EmailPropertyResource emailPropertyResource = (EmailPropertyResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.EMAIL_MONITOR_PROPERTY,
emailMonitorProperty);
+					sshJobSubmissionResources.add(emailPropertyResource);
+				}
+			} else {
+				em.getTransaction().commit();
+					em.close();
+				logger.error("Unsupported field name for Ssh Job Submission Resource.", new IllegalArgumentException());
+				throw new IllegalArgumentException("Unsupported field name for Ssh Job Submission Resource.");
+			}
+			em.getTransaction().commit();
+			em.close();
+		} catch (ApplicationSettingsException e) {
+			logger.error(e.getMessage(), e);
+			throw new AppCatalogException(e);
+		} finally {
+			if (em != null && em.isOpen()) {
+				if (em.getTransaction().isActive()) {
+					em.getTransaction().rollback();
+				}
+				em.close();
+			}
+		}
+		return sshJobSubmissionResources;
+	}
+
+    @Override
+    public List<Resource> getAll() throws AppCatalogException {
+        return null;
+    }
+
+    @Override
+    public List<String> getAllIds() throws AppCatalogException {
+        return null;
+    }
+
+    @Override
+	public List<String> getIds(String fieldName, Object value) throws AppCatalogException
{
+		List<String> sshJobSubmissionResourceIDs = new ArrayList<String>();
+		EntityManager em = null;
+		try {
+			em = AppCatalogJPAUtils.getEntityManager();
+			em.getTransaction().begin();
+			AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(EMAIL_PROPERTY);
+			Query q;
+			if (fieldName.equals(EmailMonitorPropertyConstants.JOB_SUBMISSION_INTERFACE_ID)) {
+				generator.setParameter(fieldName, value);
+				q = generator.selectQuery(em);
+				List<?> results = q.getResultList();
+				for (Object result : results) {
+					EmailMonitorProperty monitorProperty = (EmailMonitorProperty) result;
+					EmailPropertyResource emailPropertyResource = (EmailPropertyResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.EMAIL_MONITOR_PROPERTY,
monitorProperty);
+					sshJobSubmissionResourceIDs.add(emailPropertyResource.getJobSubmissionInterfaceId());
+				}
+			} else {
+				em.getTransaction().commit();
+					em.close();
+				logger.error("Unsupported field name for Ssh Job Submission Resource.", new IllegalArgumentException());
+				throw new IllegalArgumentException("Unsupported field name for Ssh Job Submission Resource.");
+			}
+			em.getTransaction().commit();
+			em.close();
+		} catch (ApplicationSettingsException e) {
+			logger.error(e.getMessage(), e);
+			throw new AppCatalogException(e);
+		} finally {
+			if (em != null && em.isOpen()) {
+				if (em.getTransaction().isActive()) {
+					em.getTransaction().rollback();
+				}
+				em.close();
+			}
+		}
+		return sshJobSubmissionResourceIDs;
+	}
+	
+	@Override
+	public void save() throws AppCatalogException {
+		EntityManager em = null;
+		try {
+			em = AppCatalogJPAUtils.getEntityManager();
+			EmailMonitorProperty monitorProperty = em.find(EmailMonitorProperty.class, jobSubmissionInterfaceId);
+			em.close();
+			EmailMonitorProperty emailMonitorProperty;
+			em = AppCatalogJPAUtils.getEntityManager();
+			em.getTransaction().begin();
+			if (monitorProperty == null) {
+				emailMonitorProperty = new EmailMonitorProperty();
+			} else {
+				emailMonitorProperty = monitorProperty;
+			}
+			emailMonitorProperty.setJobSubmissionId(jobSubmissionInterfaceId);
+			emailMonitorProperty.setEmailAddress(emailAddress);
+			emailMonitorProperty.setEmailProtocol(protocol);
+			emailMonitorProperty.setFolderName(folderName);
+			emailMonitorProperty.setHost(host);
+            if (monitorProperty == null) {
+				em.persist(emailMonitorProperty);
+			} else {
+				em.merge(emailMonitorProperty);
+			}
+			em.getTransaction().commit();
+			em.close();
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+			throw new AppCatalogException(e);
+		} finally {
+			if (em != null && em.isOpen()) {
+				if (em.getTransaction().isActive()) {
+					em.getTransaction().rollback();
+				}
+				em.close();
+			}
+		}
+	}
+	
+	@Override
+	public boolean isExists(Object identifier) throws AppCatalogException {
+		EntityManager em = null;
+		try {
+			em = AppCatalogJPAUtils.getEntityManager();
+			EmailMonitorProperty emailMonitorProperty = em.find(EmailMonitorProperty.class, identifier);
+			em.close();
+			return emailMonitorProperty != null;
+		} catch (ApplicationSettingsException e) {
+			logger.error(e.getMessage(), e);
+			throw new AppCatalogException(e);
+		} finally {
+			if (em != null && em.isOpen()) {
+				if (em.getTransaction().isActive()) {
+					em.getTransaction().rollback();
+				}
+				em.close();
+			}
+		}
+	}
+
+    public String getJobSubmissionInterfaceId() {
+        return jobSubmissionInterfaceId;
+    }
+
+    public void setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
+        this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public String getEmailAddress() {
+        return emailAddress;
+    }
+
+    public void setEmailAddress(String emailAddress) {
+        this.emailAddress = emailAddress;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getFolderName() {
+        return folderName;
+    }
+
+    public void setFolderName(String folderName) {
+        this.folderName = folderName;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public void setProtocol(String protocol) {
+        this.protocol = protocol;
+    }
+
+    public SshJobSubmissionResource getSshJobSubmissionResource() {
+        return sshJobSubmissionResource;
+    }
+
+    public void setSshJobSubmissionResource(SshJobSubmissionResource sshJobSubmissionResource)
{
+        this.sshJobSubmissionResource = sshJobSubmissionResource;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
index 2d87c60..ee14d76 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
@@ -27,7 +27,6 @@ import javax.persistence.EntityManager;
 import javax.persistence.Query;
 
 import org.airavata.appcatalog.cpi.AppCatalogException;
-import org.apache.aiaravata.application.catalog.data.model.EmailMonitorProperty;
 import org.apache.aiaravata.application.catalog.data.model.ResourceJobManager;
 import org.apache.aiaravata.application.catalog.data.model.SshJobSubmission;
 import org.apache.aiaravata.application.catalog.data.util.AppCatalogJPAUtils;
@@ -47,8 +46,6 @@ public class SshJobSubmissionResource extends AbstractResource {
 	private String securityProtocol;
 	private int sshPort;
     private String monitorMode;
-    private String emailMonitorPropertyId;
-    private EmailMonitorProperty emailMonitorProperty;
     private Timestamp createdTime;
     private Timestamp updatedTime;
 
@@ -235,9 +232,6 @@ public class SshJobSubmissionResource extends AbstractResource {
 			sshJobSubmission.setSecurityProtocol(getSecurityProtocol());
 			sshJobSubmission.setSshPort(getSshPort());
             sshJobSubmission.setMonitorMode(getMonitorMode());
-            sshJobSubmission.setEmailMonitorPropertyId(getEmailMonitorPropertyId());
-            EmailMonitorProperty emailMonitorProperty = em.find(EmailMonitorProperty.class,
getEmailMonitorPropertyId());
-            sshJobSubmission.setEmailMonitorProperty(emailMonitorProperty);
             if (existingSshJobSubmission == null) {
 				em.persist(sshJobSubmission);
 			} else {
@@ -335,19 +329,4 @@ public class SshJobSubmissionResource extends AbstractResource {
         this.monitorMode = monitorMode;
     }
 
-    public EmailMonitorProperty getEmailMonitorProperty() {
-        return emailMonitorProperty;
-    }
-
-    public void setEmailMonitorProperty(EmailMonitorProperty emailMonitorProperty) {
-        this.emailMonitorProperty = emailMonitorProperty;
-    }
-
-    public String getEmailMonitorPropertyId() {
-        return emailMonitorPropertyId;
-    }
-
-    public void setEmailMonitorPropertyId(String emailMonitorPropertyId) {
-        this.emailMonitorPropertyId = emailMonitorPropertyId;
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/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 95eb20b..f8f3b1e 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
@@ -172,6 +172,13 @@ public class AppCatalogJPAUtils {
 					logger.error("Object should be a Ssh Job Submission.", new IllegalArgumentException());
 					throw new IllegalArgumentException("Object should be a Ssh Job Submission.");
 				}
+            case EMAIL_MONITOR_PROPERTY:
+                if (o instanceof EmailMonitorProperty){
+                    return createEmailPropertyResource((EmailMonitorProperty) o);
+                }else{
+                    logger.error("Object should be a Ssh Job Submission.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Ssh Job Submission.");
+                }
             case SCP_DATA_MOVEMENT:
 				if (o instanceof ScpDataMovement){
 					return createScpDataMovement((ScpDataMovement) o);
@@ -608,7 +615,6 @@ public class AppCatalogJPAUtils {
             sshJobSubmissionResource.setSecurityProtocol(o.getSecurityProtocol());
             sshJobSubmissionResource.setSshPort(o.getSshPort());
             sshJobSubmissionResource.setMonitorMode(o.getMonitorMode());
-            sshJobSubmissionResource.setEmailMonitorProperty(o.getEmailMonitorProperty());
             sshJobSubmissionResource.setCreatedTime(o.getCreationTime());
             if (o.getUpdateTime() != null){
                 sshJobSubmissionResource.setUpdatedTime(o.getUpdateTime());
@@ -617,6 +623,20 @@ public class AppCatalogJPAUtils {
         return sshJobSubmissionResource;
     }
 
+    private static Resource createEmailPropertyResource(EmailMonitorProperty o) {
+        EmailPropertyResource emailPropertyResource = new EmailPropertyResource();
+        if (o != null) {
+            emailPropertyResource.setJobSubmissionInterfaceId(o.getJobSubmissionId());
+            emailPropertyResource.setSshJobSubmissionResource((SshJobSubmissionResource)
createSshJobSubmission(o.getSubmissionInterface()));
+            emailPropertyResource.setEmailAddress(o.getEmailAddress());
+            emailPropertyResource.setFolderName(o.getFolderName());
+            emailPropertyResource.setPassword(o.getPassword());
+            emailPropertyResource.setHost(o.getHost());
+            emailPropertyResource.setProtocol(o.getEmailProtocol());
+        }
+        return emailPropertyResource;
+    }
+
     private static Resource createScpDataMovement(ScpDataMovement o) {
 		ScpDataMovementResource scpDataMovementResource = new ScpDataMovementResource();
         if (o != null){

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java
index 196d3a1..111f811 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java
@@ -62,5 +62,6 @@ public enum AppCatalogResourceType {
     ClOUD_SUBMISSION,
     WORKFLOW,
     WORKFLOW_INPUT,
-    WORKFLOW_OUTPUT
+    WORKFLOW_OUTPUT,
+    EMAIL_MONITOR_PROPERTY
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/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 cad9c95..f8768f0 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
@@ -30,6 +30,15 @@ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationParallelism
 import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
 import org.apache.airavata.model.appcatalog.appinterface.*;
 import org.apache.airavata.model.appcatalog.computeresource.*;
+import org.apache.airavata.model.appcatalog.computeresource.BatchQueue;
+import org.apache.airavata.model.appcatalog.computeresource.CloudJobSubmission;
+import org.apache.airavata.model.appcatalog.computeresource.DataMovementInterface;
+import org.apache.airavata.model.appcatalog.computeresource.EmailMonitorProperty;
+import org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
+import org.apache.airavata.model.appcatalog.computeresource.UnicoreDataMovement;
+import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
 
@@ -221,6 +230,9 @@ public class AppCatalogThriftConversion {
         ResourceJobManagerResource resourceJobManager = getResourceJobManager(submission.getResourceJobManager());
 //        resourceJobManager.setResourceJobManagerId(submission.getJobSubmissionInterfaceId());
         resource.setResourceJobManagerId(resourceJobManager.getResourceJobManagerId());
+        if (submission.getMonitorMode() != null){
+            resource.setMonitorMode(submission.getMonitorMode().toString());
+        }
         resource.setResourceJobManagerResource(resourceJobManager);
         if (submission.getSecurityProtocol() != null){
             resource.setSecurityProtocol(submission.getSecurityProtocol().toString());
@@ -330,9 +342,29 @@ public class AppCatalogThriftConversion {
     	sshJobSubmission.setResourceJobManager(getResourceJobManager(submission.getResourceJobManagerResource()));
     	sshJobSubmission.setSecurityProtocol(SecurityProtocol.valueOf(submission.getSecurityProtocol()));
     	sshJobSubmission.setSshPort(submission.getSshPort());
+        if (submission.getMonitorMode() != null){
+            sshJobSubmission.setMonitorMode(MonitorMode.valueOf(submission.getMonitorMode()));
+            EmailPropertyResource emailPropertyResource = new EmailPropertyResource();
+            if (emailPropertyResource.isExists(sshJobSubmission.getJobSubmissionInterfaceId())){
+                EmailPropertyResource emailResource = (EmailPropertyResource)emailPropertyResource.get(submission.getJobSubmissionInterfaceId());
+                sshJobSubmission.setEmailMonitorProperty(getEmailMonitorProperty(emailResource));
+            }
+        }
         return sshJobSubmission;
     }
-    
+
+    public static EmailMonitorProperty getEmailMonitorProperty (EmailPropertyResource resource)
throws AppCatalogException {
+        EmailMonitorProperty monitorProperty = new EmailMonitorProperty();
+        monitorProperty.setFolderName(resource.getFolderName());
+        monitorProperty.setHost(resource.getHost());
+        monitorProperty.setEmailAddress(resource.getEmailAddress());
+        monitorProperty.setPassword(resource.getPassword());
+        if (resource.getProtocol() != null){
+            monitorProperty.setStoreProtocol(EmailProtocol.valueOf(resource.getProtocol()));
+        }
+        return monitorProperty;
+    }
+
     public static UnicoreJobSubmission getUnicoreJobSubmissionDescription (UnicoreJobSubmissionResource
submission) throws AppCatalogException {
     	UnicoreJobSubmission unicoreJobSubmission = new UnicoreJobSubmission();
     	unicoreJobSubmission.setUnicoreEndPointURL(submission.getUnicoreEndpointUrl());

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
index 5fa184d..cd2445f 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
@@ -38,6 +38,7 @@
         <class>org.apache.aiaravata.application.catalog.data.model.GridftpDataMovement</class>
         <class>org.apache.aiaravata.application.catalog.data.model.GridftpEndpoint</class>
         <class>org.apache.aiaravata.application.catalog.data.model.SshJobSubmission</class>
+        <class>org.apache.aiaravata.application.catalog.data.model.EmailMonitorProperty</class>
         <class>org.apache.aiaravata.application.catalog.data.model.ApplicationModule</class>
         <class>org.apache.aiaravata.application.catalog.data.model.ApplicationDeployment</class>
         <class>org.apache.aiaravata.application.catalog.data.model.ModuleLoadCmd</class>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/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 5d56086..86851be 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
@@ -110,6 +110,8 @@ CREATE TABLE RESOURCE_JOB_MANAGER
         PRIMARY KEY (RESOURCE_JOB_MANAGER_ID)
 );
 
+
+
 CREATE TABLE SSH_JOB_SUBMISSION
 (
         RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
@@ -118,12 +120,22 @@ CREATE TABLE SSH_JOB_SUBMISSION
         SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
         SSH_PORT INTEGER,
         MONITOR_MODE VARCHAR (255),
-        EMAIL_MONITOR_PROPERTY_ID VARCHAR (255),
         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
         PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
-        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID),
-        FOREIGN KEY (EMAIL_MONITOR_PROPERTY_ID) REFERENCES  EMAIL_MONITOR_PROPERTY(EMAIL_MONITOR_PROPERTY_ID)
+        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
+);
+
+CREATE TABLE EMAIL_MONITOR_PROPERTY
+(
+         JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+         HOST VARCHAR(255),
+         EMAIL_ADDRESS VARCHAR(255),
+         PASSWORD VARCHAR(255),,
+         FOLDER_NAME VARCHAR(255),
+         EMAIL_PROTOCOL VARCHAR(255),
+         PRIMARY KEY(JOB_SUBMISSION_INTERFACE_ID),
+         FOREIGN KEY (JOB_SUBMISSION_INTERFACE_ID) REFERENCES SSH_JOB_SUBMISSION(JOB_SUBMISSION_INTERFACE_ID)
 );
 
 CREATE TABLE SCP_DATA_MOVEMENT
@@ -445,18 +457,7 @@ CREATE TABLE WORKFLOW_OUTPUT
          FOREIGN KEY (WF_TEMPLATE_ID) REFERENCES WORKFLOW(WF_TEMPLATE_ID) ON DELETE CASCADE
 );
 
-CREATE TABLE EMAIL_MONITOR_PROPERTY
-(
-         JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
-         EMAIL_MONITOR_PROPERTY_ID VARCHAR (255) NOT NULL,
-         HOST VARCHAR(255),
-         EMAIL_ADDRESS VARCHAR(255),
-         PASSWORD CLOB,
-         FOLDER_NAME VARCHAR(255) DEFAULT "INBOX",
-         EMAIL_PROTOCOL VARCHAR(255),
-         PRIMARY KEY(JOB_SUBMISSION_INTERFACE_ID,EMAIL_MONITOR_PROPERTY_ID),
-         FOREIGN KEY (JOB_SUBMISSION_INTERFACE_ID)  REFERENCES SSH_JOB_SUBMISSION(JOB_SUBMISSION_INTERFACE_ID)
ON DELETE CASCADE
-);
+
 
 CREATE TABLE CONFIGURATION
 (

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/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 aecf044..95ed864 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
@@ -129,12 +129,22 @@ CREATE TABLE SSH_JOB_SUBMISSION
         SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
         SSH_PORT INTEGER,
         MONITOR_MODE VARCHAR (255),
-        EMAIL_MONITOR_PROPERTY_ID VARCHAR (255),
         CREATION_TIME TIMESTAMP DEFAULT NOW(),
         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ,
         PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
-        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID),
-        FOREIGN KEY (EMAIL_MONITOR_PROPERTY_ID) REFERENCES  EMAIL_MONITOR_PROPERTY(EMAIL_MONITOR_PROPERTY_ID)
+        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
+);
+
+CREATE TABLE EMAIL_MONITOR_PROPERTY
+(
+         JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+         HOST VARCHAR(255),
+         EMAIL_ADDRESS VARCHAR(255),
+         PASSWORD VARCHAR(255),,
+         FOLDER_NAME VARCHAR(255),
+         EMAIL_PROTOCOL VARCHAR(255),
+         PRIMARY KEY(JOB_SUBMISSION_INTERFACE_ID),
+         FOREIGN KEY (JOB_SUBMISSION_INTERFACE_ID) REFERENCES SSH_JOB_SUBMISSION(JOB_SUBMISSION_INTERFACE_ID)
 );
 
 CREATE TABLE SCP_DATA_MOVEMENT
@@ -443,19 +453,6 @@ CREATE TABLE WORKFLOW_OUTPUT
          FOREIGN KEY (WF_TEMPLATE_ID) REFERENCES WORKFLOW(WF_TEMPLATE_ID) ON DELETE CASCADE
 );
 
-CREATE TABLE EMAIL_MONITOR_PROPERTY
-(
-         JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
-         EMAIL_MONITOR_PROPERTY_ID VARCHAR (255) NOT NULL,
-         HOST VARCHAR(255),
-         EMAIL_ADDRESS VARCHAR(255),
-         PASSWORD CLOB,
-         FOLDER_NAME VARCHAR(255) DEFAULT "INBOX",
-         EMAIL_PROTOCOL VARCHAR(255),
-         PRIMARY KEY(JOB_SUBMISSION_INTERFACE_ID,EMAIL_MONITOR_PROPERTY_ID),
-         FOREIGN KEY (JOB_SUBMISSION_INTERFACE_ID)  REFERENCES SSH_JOB_SUBMISSION(JOB_SUBMISSION_INTERFACE_ID)
ON DELETE CASCADE
-);
-
 CREATE TABLE CONFIGURATION
 (
           CONFIG_KEY VARCHAR(255),

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/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 28b2983..9fa1882 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
@@ -167,6 +167,11 @@ public class ComputeResourceTest {
 
             SSHJobSubmission sshJobSubmission = computeResource.getSSHJobSubmission(sshsubmissionId);
             System.out.println("**********SSH Submission resource job manager *************
: " +  sshJobSubmission.getResourceJobManager().toString());
+            System.out.println("**********Monitor mode ************* : " +  sshJobSubmission.getMonitorMode().toString());
+
+            EmailMonitorProperty emailMonitorProperty = sshJobSubmission.getEmailMonitorProperty();
+            System.out.println("**********email address ************* : " + emailMonitorProperty.getEmailAddress());
+
 
 //            GlobusJobSubmission globusJobSubmission = computeResource.get(globusSubmissionId);
 //            System.out.println("**********Globus Submission resource job manager *************
: " + globusJobSubmission.getResourceJobManager().toString());
@@ -239,6 +244,12 @@ public class ComputeResourceTest {
             commands.put(JobManagerCommand.SUBMISSION, "Sub command");
             commands.put(JobManagerCommand.SHOW_QUEUE, "show q command");
             jobManager.setJobManagerCommands(commands);
+            jobSubmission.setMonitorMode(MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR);
+            EmailMonitorProperty emailMonitorProperty = new EmailMonitorProperty();
+            emailMonitorProperty.setEmailAddress("test");
+            emailMonitorProperty.setPassword("aaa");
+            emailMonitorProperty.setHost("testHost");
+            jobSubmission.setEmailMonitorProperty(emailMonitorProperty);
 //            String jobManagerID = appcatalog.getComputeResource().addResourceJobManager(jobManager);
 //            jobManager.setResourceJobManagerId(jobManagerID);
             jobSubmission.setResourceJobManager(jobManager);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1d300ee/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 4e28e04..8171968 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
@@ -110,6 +110,8 @@ CREATE TABLE RESOURCE_JOB_MANAGER
         PRIMARY KEY (RESOURCE_JOB_MANAGER_ID)
 );
 
+
+
 CREATE TABLE SSH_JOB_SUBMISSION
 (
         RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
@@ -117,12 +119,25 @@ CREATE TABLE SSH_JOB_SUBMISSION
         ALTERNATIVE_SSH_HOSTNAME VARCHAR (255),
         SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
         SSH_PORT INTEGER,
+        MONITOR_MODE VARCHAR (255),
         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
         PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
         FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
 );
 
+CREATE TABLE EMAIL_MONITOR_PROPERTY
+(
+         JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+         HOST VARCHAR(255),
+         EMAIL_ADDRESS VARCHAR(255),
+         PASSWORD VARCHAR(255),
+         FOLDER_NAME VARCHAR(255),
+         EMAIL_PROTOCOL VARCHAR(255),
+         PRIMARY KEY(JOB_SUBMISSION_INTERFACE_ID),
+         FOREIGN KEY (JOB_SUBMISSION_INTERFACE_ID) REFERENCES SSH_JOB_SUBMISSION(JOB_SUBMISSION_INTERFACE_ID)
+);
+
 CREATE TABLE SCP_DATA_MOVEMENT
 (
         QUEUE_DESCRIPTION VARCHAR (255),


Mime
View raw message