Package org.airavata.appcatalog.cpi

Examples of org.airavata.appcatalog.cpi.AppCatalogException


      }
      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();
        }
View Full Code Here


      }
      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();
        }
View Full Code Here

      }
      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();
        }
View Full Code Here

    HashMap<String, String> ids;
    if (identifier instanceof Map) {
      ids = (HashMap<String, String>) identifier;
    } else {
      logger.error("Identifier should be a map with the field name and it's value");
      throw new AppCatalogException("Identifier should be a map with the field name and it's value");
    }
    EntityManager em = null;
    try {
      em = AppCatalogJPAUtils.getEntityManager();
      ComputeResourceFileSystem computeResourceFileSystem = em.find(ComputeResourceFileSystem.class, new ComputeResourceFileSystem_PK(ids.get(ComputeResourceFileSystemConstants.COMPUTE_RESOURCE_ID), ids.get(ComputeResourceFileSystemConstants.FILE_SYSTEM)));
      em.close();
      return computeResourceFileSystem != 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();
        }
View Full Code Here

    public boolean addGatewayComputeResourcePreference(String gatewayID, String computeResourceId, ComputeResourcePreference computeResourcePreference) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
      try {
            appCatalog = AppCatalogFactory.getAppCatalog();
            GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
            if (!gatewayProfile.isGatewayResourceProfileExists(gatewayID)){
              throw new AppCatalogException("Gateway resource profile '"+gatewayID+"' does not exist!!!");
            }
            GatewayResourceProfile profile = gatewayProfile.getGatewayProfile(gatewayID);
//            gatewayProfile.removeGatewayResourceProfile(gatewayID);
            profile.addToComputeResourcePreferences(computeResourcePreference);
            gatewayProfile.updateGatewayResourceProfile(gatewayID, profile);
View Full Code Here

            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();
                }
View Full Code Here

            em.getTransaction().commit();
            em.close();
            return resource;
        } 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();
                }
View Full Code Here

            }
            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();
                }
View Full Code Here

                }
            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();
                }
View Full Code Here

            }
            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();
                }
View Full Code Here

TOP

Related Classes of org.airavata.appcatalog.cpi.AppCatalogException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.