Package com.cloud.utils.db

Examples of com.cloud.utils.db.TransactionLegacy.commit()


            return false;
        }

        _tagsDao.removeByIdAndType(projectId, ResourceObjectType.Project);
        result = super.remove(projectId);
        txn.commit();

        return result;

    }
View Full Code Here


            pstmt.setString(5, certificate);
            pstmt.setString(6, key);
            pstmt.setString(7, domainSuffix);

            pstmt.executeUpdate();
            txn.commit();
        } catch (Exception e) {
            txn.rollback();
            throw new CloudRuntimeException("Unable to save certificate under name " + name + " due to exception", e);
        }
    }
View Full Code Here

                    for (S3Grant grant : grants) {
                        save(target, targetId, grant, grantOrder++);
                    }
                }
            }
            txn.commit();
        } finally {
            txn.close();
        }

    }
View Full Code Here

            SearchCriteria<CloudStackServiceOfferingVO> sc = searchByName.create();
            sc.setParameters("name", name);
            return findOneBy(sc);

        } finally {
            txn.commit();
            txn.close();
        }

    }
View Full Code Here

            SearchCriteria<CloudStackServiceOfferingVO> sc = searchByID.create();
            sc.setParameters("uuid", id);
            return findOneBy(sc);

        } finally {
            txn.commit();
            txn.close();
        }

    }
View Full Code Here

            txn.start();
            SearchCriteria<MHostVO> sc = NameSearch.create();
            sc.setParameters("MHostKey", hostKey);
            return findOneBy(sc);
        } finally {
            txn.commit();
            txn.close();
        }
    }

    @Override
View Full Code Here

    public void updateHeartBeat(MHostVO mhost) {
        TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
        try {
            txn.start();
            update(mhost.getId(), mhost);
            txn.commit();
        } finally {
            txn.close();
        }
    }
}
View Full Code Here

            txn.start();
            SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();
            sc.setParameters("UploadID", new Long(uploadId));
            sc.setParameters("partNumber", partNumber);
            update(partVO, sc);
            txn.commit();

        } finally {
            txn.close();
        }
    }
View Full Code Here

                s_logger.warn("No configuration item found with name " + name);
                return null;
            }
            return configItem.getValue();
        } finally {
            txn.commit();
            txn.close();
        }
    }

}
View Full Code Here

            if (null != account)
                if (null != account.getDefaultZoneId())
                    return Long.toString(account.getDefaultZoneId());
            return null;
        } finally {
            txn.commit();
            txn.close();
        }

    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.