airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [1/3] airavata git commit: fixing concurrent access issue at registry level
Date Tue, 19 Jan 2016 17:32:24 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 0c51c7aa1 -> f1e16793b


http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ModuleLoadCmdResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ModuleLoadCmdResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ModuleLoadCmdResource.java
index 5e42bba..1234c17 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ModuleLoadCmdResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ModuleLoadCmdResource.java
@@ -64,7 +64,12 @@ public class ModuleLoadCmdResource extends AppCatAbstractResource {
             Query q = generator.deleteQuery(em);
             q.executeUpdate();
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -98,7 +103,12 @@ public class ModuleLoadCmdResource extends AppCatAbstractResource {
             ModuleLoadCmd moduleLoadCmd = (ModuleLoadCmd) q.getSingleResult();
             ModuleLoadCmdResource moduleLoadCmdResource = (ModuleLoadCmdResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.MODULE_LOAD_CMD, moduleLoadCmd);
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return moduleLoadCmdResource;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
@@ -135,12 +145,22 @@ public class ModuleLoadCmdResource extends AppCatAbstractResource {
                         (o1, o2) -> ((ModuleLoadCmdResource)o1).getOrder()- ((ModuleLoadCmdResource)o2).getOrder());
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for Module Load Cmd Resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for Module Load Cmd Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -185,12 +205,22 @@ public class ModuleLoadCmdResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for Module Load Cmd Resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for Module Load Cmd Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -211,7 +241,13 @@ public class ModuleLoadCmdResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             ModuleLoadCmd existingModuleLoadCmd = em.find(ModuleLoadCmd.class, new ModuleLoadCmd_PK(cmd, appDeploymentId));
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+
             ModuleLoadCmd moduleLoadCmd;
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
@@ -231,7 +267,12 @@ public class ModuleLoadCmdResource extends AppCatAbstractResource {
                 em.merge(moduleLoadCmd);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -258,7 +299,12 @@ public class ModuleLoadCmdResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             ModuleLoadCmd moduleLoadCmd = em.find(ModuleLoadCmd.class, new ModuleLoadCmd_PK(ids.get(ModuleLoadCmdConstants.CMD), ids.get(ModuleLoadCmdConstants.APP_DEPLOYMENT_ID)));
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return moduleLoadCmd != null;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PostJobCommandResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PostJobCommandResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PostJobCommandResource.java
index 24c3bbc..b62b24d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PostJobCommandResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PostJobCommandResource.java
@@ -66,7 +66,12 @@ public class PostJobCommandResource extends AppCatAbstractResource {
             Query q = generator.deleteQuery(em);
             q.executeUpdate();
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -103,7 +108,12 @@ public class PostJobCommandResource extends AppCatAbstractResource {
                     (PostJobCommandResource) AppCatalogJPAUtils.getResource(
                             AppCatalogResourceType.POST_JOBCOMMAND, postJobCommand);
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return postJobCommandResource;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
@@ -144,12 +154,22 @@ public class PostJobCommandResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for Post Job Command Resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for Post Job Command Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -205,12 +225,22 @@ public class PostJobCommandResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for GSISSH Post Job resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for GSISSH Post JOb Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -231,7 +261,12 @@ public class PostJobCommandResource extends AppCatAbstractResource {
             em = AppCatalogJPAUtils.getEntityManager();
             PostJobCommand existingPostJobCommand = em.find(PostJobCommand.class,
                     new PostJobCommandPK(appDeploymentId, command));
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
@@ -251,7 +286,12 @@ public class PostJobCommandResource extends AppCatAbstractResource {
                 em.persist(postJobCommand);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -281,7 +321,12 @@ public class PostJobCommandResource extends AppCatAbstractResource {
                     ids.get(PostJobCommandConstants.DEPLOYMENT_ID),
                     ids.get(PostJobCommandConstants.COMMAND)));
 
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return postJobCommand != null;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PreJobCommandResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PreJobCommandResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PreJobCommandResource.java
index 2f7facd..f16900d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PreJobCommandResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/PreJobCommandResource.java
@@ -66,7 +66,12 @@ public class PreJobCommandResource extends AppCatAbstractResource {
             Query q = generator.deleteQuery(em);
             q.executeUpdate();
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -103,7 +108,12 @@ public class PreJobCommandResource extends AppCatAbstractResource {
                     (PreJobCommandResource) AppCatalogJPAUtils.getResource(
                             AppCatalogResourceType.PRE_JOBCOMMAND, preJobCommand);
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return preJobCommandResource;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
@@ -144,12 +154,22 @@ public class PreJobCommandResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for Pre Job Command Resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for Pre Job Command Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -205,12 +225,22 @@ public class PreJobCommandResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for GSISSH Pre Job resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for GSISSH Pre JOb Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -231,7 +261,12 @@ public class PreJobCommandResource extends AppCatAbstractResource {
             em = AppCatalogJPAUtils.getEntityManager();
             PreJobCommand existingPreJobCommand = em.find(PreJobCommand.class,
                     new PreJobCommandPK(appDeploymentId, command));
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
@@ -251,7 +286,12 @@ public class PreJobCommandResource extends AppCatAbstractResource {
                 em.persist(preJobCommand);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -281,7 +321,12 @@ public class PreJobCommandResource extends AppCatAbstractResource {
                     ids.get(PreJobCommandConstants.DEPLOYMENT_ID),
                     ids.get(PreJobCommandConstants.COMMAND)));
 
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return preJobCommand != null;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ResourceJobManagerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ResourceJobManagerResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ResourceJobManagerResource.java
index e84506c..3406b83 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ResourceJobManagerResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ResourceJobManagerResource.java
@@ -74,7 +74,12 @@ public class ResourceJobManagerResource extends AppCatAbstractResource {
 			Query q = generator.deleteQuery(em);
 			q.executeUpdate();
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -100,7 +105,12 @@ public class ResourceJobManagerResource extends AppCatAbstractResource {
 			ResourceJobManager resourceJobManager = (ResourceJobManager) q.getSingleResult();
 			ResourceJobManagerResource resourceJobManagerResource = (ResourceJobManagerResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.RESOURCE_JOB_MANAGER, resourceJobManager);
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return resourceJobManagerResource;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
@@ -135,12 +145,22 @@ public class ResourceJobManagerResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 				logger.error("Unsupported field name for Resource Job Manager Resource.", new IllegalArgumentException());
 				throw new IllegalArgumentException("Unsupported field name for Resource Job Manager Resource.");
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -185,12 +205,22 @@ public class ResourceJobManagerResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 				logger.error("Unsupported field name for Resource Job Manager Resource.", new IllegalArgumentException());
 				throw new IllegalArgumentException("Unsupported field name for Resource Job Manager Resource.");
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -211,7 +241,13 @@ public class ResourceJobManagerResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			ResourceJobManager existingResourceJobManager = em.find(ResourceJobManager.class, resourceJobManagerId);
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+
 			ResourceJobManager resourceJobManager;
 			em = AppCatalogJPAUtils.getEntityManager();
 			em.getTransaction().begin();
@@ -232,7 +268,12 @@ public class ResourceJobManagerResource extends AppCatAbstractResource {
 				em.merge(resourceJobManager);
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (Exception e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -252,7 +293,12 @@ public class ResourceJobManagerResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			ResourceJobManager resourceJobManager = em.find(ResourceJobManager.class, identifier);
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return resourceJobManager != null;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ScpDataMovementResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ScpDataMovementResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ScpDataMovementResource.java
index 3b4c63d..2d6b8f7 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ScpDataMovementResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ScpDataMovementResource.java
@@ -72,7 +72,12 @@ public class ScpDataMovementResource extends AppCatAbstractResource {
 			Query q = generator.deleteQuery(em);
 			q.executeUpdate();
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -98,7 +103,12 @@ public class ScpDataMovementResource extends AppCatAbstractResource {
 			ScpDataMovement scpDataMovement = (ScpDataMovement) q.getSingleResult();
 			ScpDataMovementResource scpDataMovementResource = (ScpDataMovementResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.SCP_DATA_MOVEMENT, scpDataMovement);
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return scpDataMovementResource;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
@@ -133,12 +143,22 @@ public class ScpDataMovementResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 				logger.error("Unsupported field name for Scp Data Movement Resource.", new IllegalArgumentException());
 				throw new IllegalArgumentException("Unsupported field name for Scp Data Movement Resource.");
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -183,12 +203,22 @@ public class ScpDataMovementResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 				logger.error("Unsupported field name for Scp Data Movement Resource.", new IllegalArgumentException());
 				throw new IllegalArgumentException("Unsupported field name for Scp Data Movement Resource.");
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -209,7 +239,12 @@ public class ScpDataMovementResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			ScpDataMovement existingScpDataMovement = em.find(ScpDataMovement.class, dataMovementInterfaceId);
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			ScpDataMovement scpDataMovement;
 			em = AppCatalogJPAUtils.getEntityManager();
 			em.getTransaction().begin();
@@ -231,7 +266,12 @@ public class ScpDataMovementResource extends AppCatAbstractResource {
 				em.merge(scpDataMovement);
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (Exception e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -251,7 +291,12 @@ public class ScpDataMovementResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			ScpDataMovement scpDataMovement = em.find(ScpDataMovement.class, identifier);
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return scpDataMovement != null;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/SshJobSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/SshJobSubmissionResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/SshJobSubmissionResource.java
index 2390f68..4a06dee 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/SshJobSubmissionResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/SshJobSubmissionResource.java
@@ -76,7 +76,12 @@ public class SshJobSubmissionResource extends AppCatAbstractResource {
 			Query q = generator.deleteQuery(em);
 			q.executeUpdate();
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -102,7 +107,12 @@ public class SshJobSubmissionResource extends AppCatAbstractResource {
 			SshJobSubmission sshJobSubmission = (SshJobSubmission) q.getSingleResult();
 			SshJobSubmissionResource sshJobSubmissionResource = (SshJobSubmissionResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.SSH_JOB_SUBMISSION, sshJobSubmission);
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return sshJobSubmissionResource;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
@@ -137,12 +147,22 @@ public class SshJobSubmissionResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    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();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -187,12 +207,22 @@ public class SshJobSubmissionResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    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();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -213,7 +243,12 @@ public class SshJobSubmissionResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			SshJobSubmission existingSshJobSubmission = em.find(SshJobSubmission.class, jobSubmissionInterfaceId);
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			SshJobSubmission sshJobSubmission;
 			em = AppCatalogJPAUtils.getEntityManager();
 			em.getTransaction().begin();
@@ -238,7 +273,12 @@ public class SshJobSubmissionResource extends AppCatAbstractResource {
 				em.merge(sshJobSubmission);
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (Exception e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -258,7 +298,12 @@ public class SshJobSubmissionResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			SshJobSubmission sshJobSubmission = em.find(SshJobSubmission.class, identifier);
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return sshJobSubmission != null;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageInterfaceResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageInterfaceResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageInterfaceResource.java
index 7e99c46..ef150ad 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageInterfaceResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageInterfaceResource.java
@@ -92,7 +92,12 @@ public class StorageInterfaceResource extends AppCatAbstractResource {
 			Query q = generator.deleteQuery(em);
 			q.executeUpdate();
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -126,7 +131,12 @@ public class StorageInterfaceResource extends AppCatAbstractResource {
 			StorageInterface storageInterface = (StorageInterface) q.getSingleResult();
 			StorageInterfaceResource storageInterfaceResource = (StorageInterfaceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.STORAGE_INTERFACE, storageInterface);
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return storageInterfaceResource;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
@@ -161,12 +171,22 @@ public class StorageInterfaceResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 				logger.error("Unsupported field name for Data Movement Interface Resource.", new IllegalArgumentException());
 				throw new IllegalArgumentException("Unsupported field name for Data Movement Interface Resource.");
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -211,12 +231,22 @@ public class StorageInterfaceResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 				logger.error("Unsupported field name for Storage Interface Resource.", new IllegalArgumentException());
 				throw new IllegalArgumentException("Unsupported field name for Storage Interface Resource.");
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -237,7 +267,12 @@ public class StorageInterfaceResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			StorageInterface existingStorageInterface = em.find(StorageInterface.class, new StorageInterface_PK(storageResourceId, dataMovementInterfaceId));
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			StorageInterface storageInterface;
 			em = AppCatalogJPAUtils.getEntityManager();
 			em.getTransaction().begin();
@@ -260,7 +295,12 @@ public class StorageInterfaceResource extends AppCatAbstractResource {
 				em.merge(storageInterface);
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (Exception e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -287,7 +327,12 @@ public class StorageInterfaceResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			StorageInterface storageInterface = em.find(StorageInterface.class, new StorageInterface_PK(ids.get(StorageInterfaceConstants.STORAGE_RESOURCE_ID), ids.get(StorageInterfaceConstants.DATA_MOVEMENT_ID)));
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return storageInterface != null;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StoragePreferenceResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StoragePreferenceResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StoragePreferenceResource.java
index ae32eca..a2c3f51 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StoragePreferenceResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StoragePreferenceResource.java
@@ -116,7 +116,12 @@ public class StoragePreferenceResource extends AppCatAbstractResource {
             Query q = generator.deleteQuery(em);
             q.executeUpdate();
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -152,7 +157,12 @@ public class StoragePreferenceResource extends AppCatAbstractResource {
             StoragePreferenceResource preferenceResource =
                     (StoragePreferenceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.STORAGE_PREFERENCE, preference);
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return preferenceResource;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
@@ -209,12 +219,22 @@ public class StoragePreferenceResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for data storage preference Resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for data storage preference Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -251,7 +271,12 @@ public class StoragePreferenceResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             StoragePreference existingPreference = em.find(StoragePreference.class, new StoragePreferencePK(gatewayId, storageResourceId));
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
@@ -275,7 +300,12 @@ public class StoragePreferenceResource extends AppCatAbstractResource {
                 em.persist(resourcePreference);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -305,7 +335,12 @@ public class StoragePreferenceResource extends AppCatAbstractResource {
             StoragePreference existingPreference = em.find(StoragePreference.class,
                     new StoragePreferencePK(ids.get(StoragePreferenceConstants.GATEWAY_ID),
                             ids.get(StoragePreferenceConstants.STORAGE_ID)));
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return existingPreference != null;
         }catch (Exception e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageResourceResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageResourceResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageResourceResource.java
index 1d7039a..e7162ea 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageResourceResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/StorageResourceResource.java
@@ -80,7 +80,12 @@ public class StorageResourceResource extends AppCatAbstractResource {
 			Query q = generator.deleteQuery(em);
 			q.executeUpdate();
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -106,7 +111,12 @@ public class StorageResourceResource extends AppCatAbstractResource {
 			StorageResource storageResource = (StorageResource) q.getSingleResult();
 			StorageResourceResource storageResourceResource = (StorageResourceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.STORAGE_RESOURCE, storageResource);
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return storageResourceResource;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
@@ -141,12 +151,22 @@ public class StorageResourceResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 				logger.error("Unsupported field name for Storage Resource Resource.", new IllegalArgumentException());
 				throw new IllegalArgumentException("Unsupported field name for Storage Resource Resource.");
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -177,7 +197,12 @@ public class StorageResourceResource extends AppCatAbstractResource {
                 storageResourceResources.add(storageResourceResource);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -207,7 +232,12 @@ public class StorageResourceResource extends AppCatAbstractResource {
 				storageResourceResources.add(storageResource.getStorageResourceId());
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -242,12 +272,22 @@ public class StorageResourceResource extends AppCatAbstractResource {
 				}
 			} else {
 				em.getTransaction().commit();
-					em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 				logger.error("Unsupported field name for Storage Resource Resource.", new IllegalArgumentException());
 				throw new IllegalArgumentException("Unsupported field name for Storage Resource Resource.");
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -268,7 +308,12 @@ public class StorageResourceResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			StorageResource existingStorageResource = em.find(StorageResource.class, storageResourceId);
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			StorageResource storageResource;
 			em = AppCatalogJPAUtils.getEntityManager();
 			em.getTransaction().begin();
@@ -289,7 +334,12 @@ public class StorageResourceResource extends AppCatAbstractResource {
 				em.merge(storageResource);
 			}
 			em.getTransaction().commit();
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 		} catch (Exception e) {
 			logger.error(e.getMessage(), e);
 			throw new AppCatalogException(e);
@@ -309,7 +359,12 @@ public class StorageResourceResource extends AppCatAbstractResource {
 		try {
 			em = AppCatalogJPAUtils.getEntityManager();
 			StorageResource storageResource = em.find(StorageResource.class, identifier);
-			em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 			return storageResource != null;
 		} catch (ApplicationSettingsException e) {
 			logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreDataMovementResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreDataMovementResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreDataMovementResource.java
index db5ccde..782f9b9 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreDataMovementResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreDataMovementResource.java
@@ -53,7 +53,12 @@ public class UnicoreDataMovementResource extends AppCatAbstractResource {
 	            Query q = generator.deleteQuery(em);
 	            q.executeUpdate();
 	            em.getTransaction().commit();
-	            em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 	        } catch (ApplicationSettingsException e) {
 	            logger.error(e.getMessage(), e);
 	            throw new AppCatalogException(e);
@@ -81,7 +86,12 @@ public class UnicoreDataMovementResource extends AppCatAbstractResource {
 	            			.getResource(AppCatalogResourceType.UNICORE_DATA_MOVEMENT,
 							unicoreDataMovement);
 	            em.getTransaction().commit();
-	            em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 	            return dataMovementResource;
 	        } catch (ApplicationSettingsException e) {
 	            logger.error(e.getMessage(), e);
@@ -134,7 +144,12 @@ public class UnicoreDataMovementResource extends AppCatAbstractResource {
 	                }
 	            } else {
 	                em.getTransaction().commit();
-	                em.close();
+                    if (em.isOpen()) {
+                        if (em.getTransaction().isActive()){
+                            em.getTransaction().rollback();
+                        }
+                        em.close();
+                    }
 	                logger.error("Unsupported field name for Unicore data movement resource.", new IllegalArgumentException());
 	                throw new IllegalArgumentException("Unsupported field name for Unicore data movement resource.");
 	            }
@@ -175,7 +190,12 @@ public class UnicoreDataMovementResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             UnicoreDataMovement existingDataMovement = em.find(UnicoreDataMovement.class, dataMovementId);
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
@@ -192,7 +212,12 @@ public class UnicoreDataMovementResource extends AppCatAbstractResource {
                 em.persist(unicoreJobSubmission);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -211,7 +236,12 @@ public class UnicoreDataMovementResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             UnicoreDataMovement dataMovement = em.find(UnicoreDataMovement.class, identifier);
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return dataMovement != null;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreJobSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreJobSubmissionResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreJobSubmissionResource.java
index f5b9760..995a7a1 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreJobSubmissionResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UnicoreJobSubmissionResource.java
@@ -56,7 +56,12 @@ public class UnicoreJobSubmissionResource extends AppCatAbstractResource {
 	            Query q = generator.deleteQuery(em);
 	            q.executeUpdate();
 	            em.getTransaction().commit();
-	            em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 	        } catch (ApplicationSettingsException e) {
 	            logger.error(e.getMessage(), e);
 	            throw new AppCatalogException(e);
@@ -85,7 +90,12 @@ public class UnicoreJobSubmissionResource extends AppCatAbstractResource {
 	            			.getResource(AppCatalogResourceType.UNICORE_JOB_SUBMISSION,
 							unicoreJobSubmission);
 	            em.getTransaction().commit();
-	            em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 	            return unicoreSubmissionResource;
 	        } catch (ApplicationSettingsException e) {
 	            logger.error(e.getMessage(), e);
@@ -139,12 +149,22 @@ public class UnicoreJobSubmissionResource extends AppCatAbstractResource {
 	            }        
 	            else {
 	                em.getTransaction().commit();
-	                em.close();
+                    if (em.isOpen()) {
+                        if (em.getTransaction().isActive()){
+                            em.getTransaction().rollback();
+                        }
+                        em.close();
+                    }
 	                logger.error("Unsupported field name for Unicore submission resource.", new IllegalArgumentException());
 	                throw new IllegalArgumentException("Unsupported field name for Unicore Submission resource.");
 	            }
 	            em.getTransaction().commit();
-	            em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
 	        } catch (Exception e) {
 	            logger.error(e.getMessage(), e);
 	            throw new AppCatalogException(e);
@@ -223,12 +243,22 @@ public class UnicoreJobSubmissionResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for Globus Submission resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for Globus Submission resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -248,7 +278,12 @@ public class UnicoreJobSubmissionResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             UnicoreJobSubmission existingUnicoreSubmission = em.find(UnicoreJobSubmission.class, jobSubmissionInterfaceId);
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
@@ -266,7 +301,12 @@ public class UnicoreJobSubmissionResource extends AppCatAbstractResource {
                 em.persist(unicoreJobSubmission);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -285,7 +325,12 @@ public class UnicoreJobSubmissionResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             UnicoreJobSubmission unicoreJobSubmission = em.find(UnicoreJobSubmission.class, identifier);
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return unicoreJobSubmission != null;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowInputResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowInputResource.java
index 913d996..94eb02b 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowInputResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowInputResource.java
@@ -75,7 +75,12 @@ public class WorkflowInputResource extends AppCatAbstractResource {
             Query q = generator.deleteQuery(em);
             q.executeUpdate();
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -111,7 +116,12 @@ public class WorkflowInputResource extends AppCatAbstractResource {
                     (WorkflowInputResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.WORKFLOW_INPUT
                             , workflowInput);
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return workflowInputResource;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
@@ -176,12 +186,22 @@ public class WorkflowInputResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for WFInput Resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for WFInput Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -245,12 +265,22 @@ public class WorkflowInputResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for WFInput resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for WFInput Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -270,7 +300,12 @@ public class WorkflowInputResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             WorkflowInput existingWFInput = em.find(WorkflowInput.class, new WorkflowInput_PK(wfTemplateId, inputKey));
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             WorkflowInput workflowInput;
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
@@ -300,7 +335,12 @@ public class WorkflowInputResource extends AppCatAbstractResource {
                 em.merge(workflowInput);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -330,7 +370,12 @@ public class WorkflowInputResource extends AppCatAbstractResource {
                     ids.get(WFInputConstants.WF_TEMPLATE_ID),
                     ids.get(WFInputConstants.INPUT_KEY)));
 
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return workflowInput != null;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowOutputResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowOutputResource.java
index e4d7b5c..f216731 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowOutputResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowOutputResource.java
@@ -69,7 +69,12 @@ public class WorkflowOutputResource extends AppCatAbstractResource {
             Query q = generator.deleteQuery(em);
             q.executeUpdate();
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -105,7 +110,12 @@ public class WorkflowOutputResource extends AppCatAbstractResource {
                     (WorkflowOutputResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.WORKFLOW_OUTPUT
                             , wfOutput);
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return workflowOutputResource;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
@@ -170,12 +180,22 @@ public class WorkflowOutputResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for WF Output Resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for WF Output Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -240,12 +260,22 @@ public class WorkflowOutputResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for WF Output resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for WF Output Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -266,7 +296,12 @@ public class WorkflowOutputResource extends AppCatAbstractResource {
             em = AppCatalogJPAUtils.getEntityManager();
             WorkflowOutput existingWorkflowOutput = em.find(WorkflowOutput.class,
                     new WorkflowOutput_PK(wfTemplateId, outputKey));
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
 
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
@@ -299,7 +334,12 @@ public class WorkflowOutputResource extends AppCatAbstractResource {
                 em.persist(workflowOutput);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -329,7 +369,12 @@ public class WorkflowOutputResource extends AppCatAbstractResource {
                     ids.get(WFOutputConstants.WF_TEMPLATE_ID),
                     ids.get(WFOutputConstants.OUTPUT_KEY)));
 
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return workflowOutput != null;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f1e16793/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowResource.java
index 4c79ed1..8c03213 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/WorkflowResource.java
@@ -91,7 +91,12 @@ public class WorkflowResource extends AppCatAbstractResource {
             Query q = generator.deleteQuery(em);
             q.executeUpdate();
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -117,7 +122,12 @@ public class WorkflowResource extends AppCatAbstractResource {
             Workflow workflow = (Workflow) q.getSingleResult();
             WorkflowResource workflowResource = (WorkflowResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.WORKFLOW, workflow);
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return workflowResource;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
@@ -152,12 +162,22 @@ public class WorkflowResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for Workflow Resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for Workflow Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -192,7 +212,12 @@ public class WorkflowResource extends AppCatAbstractResource {
                 }
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -225,7 +250,12 @@ public class WorkflowResource extends AppCatAbstractResource {
                 }
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -260,12 +290,22 @@ public class WorkflowResource extends AppCatAbstractResource {
                 }
             } else {
                 em.getTransaction().commit();
-                em.close();
+                if (em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
                 logger.error("Unsupported field name for Workflow Resource.", new IllegalArgumentException());
                 throw new IllegalArgumentException("Unsupported field name for Workflow Resource.");
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -286,7 +326,12 @@ public class WorkflowResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             Workflow existingWorkflow = em.find(Workflow.class, wfTemplateId);
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             Workflow workflow;
             em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
@@ -313,7 +358,12 @@ public class WorkflowResource extends AppCatAbstractResource {
                 em.merge(workflow);
             }
             em.getTransaction().commit();
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
             throw new AppCatalogException(e);
@@ -333,7 +383,12 @@ public class WorkflowResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             Workflow workflow = em.find(Workflow.class, identifier);
-            em.close();
+            if (em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
             return workflow != null;
         } catch (ApplicationSettingsException e) {
             logger.error(e.getMessage(), e);


Mime
View raw message