@Override
public void save() throws AppCatalogException {
EntityManager em = null;
try {
em = AppCatalogJPAUtils.getEntityManager();
ComputeResourcePreference existingPreference = em.find(ComputeResourcePreference.class, new ComputeResourcePreferencePK(gatewayId, resourceId));
em.close();
em = AppCatalogJPAUtils.getEntityManager();
em.getTransaction().begin();
ComputeResource computeResource = em.find(ComputeResource.class, resourceId);