TransactionLegacy txn = TransactionLegacy.open("cloud", TransactionLegacy.CLOUD_DB, true);
try {
txn.start();
SearchCriteria<CloudStackConfigurationVO> sc = NameSearch.create();
sc.setParameters("name", name);
CloudStackConfigurationVO configItem = findOneBy(sc);
if (configItem == null) {
s_logger.warn("No configuration item found with name " + name);
return null;
}
return configItem.getValue();
} finally {
txn.commit();
txn.close();
}
}