Package com.cloud.utils.db

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


        TransactionLegacy txn = null;
        try {
            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
            remove(new Long(uploadId));
            txn.commit();
        } finally {
            txn.close();
        }
    }
View Full Code Here


        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
        try {
            txn.start();
            return listAll().size();
        } finally {
            txn.commit();
            txn.close();
        }

    }
View Full Code Here

            txn.start();
            SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
            sc.setParameters("AmazonEC2Offering", amazonEC2Offering);
            return findOneBy(sc).getCloudstackOffering();
        } finally {
            txn.commit();
            txn.close();
        }
    }

    @Override
View Full Code Here

            txn.start();
            SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
            sc.setParameters("CloudStackOffering", cloudStackOffering);
            return findOneBy(sc).getAmazonOffering();
        } finally {
            txn.commit();
            txn.close();
        }
    }

    @Override
View Full Code Here

            offering.setCloudstackOffering(cloudStackOffering);
            if (null == offering)
                offering = persist(offering);
            else
                update(offering.getID(), offering);
            txn.commit();
        } finally {
            txn.close();
        }

    }
View Full Code Here

        try {
            txn.start();
            SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
            sc.setParameters("AmazonEC2Offering", amazonEC2Offering);
            remove(sc);
            txn.commit();
        } finally {
            txn.close();
        }
    }
View Full Code Here

            txn.start();
            SearchCriteria<SHostVO> sc = HostSearch.create();
            sc.setParameters("Host", host);
            return findOneBy(sc);
        } finally {
            txn.commit();
            txn.close();
        }

    }
View Full Code Here

            SearchCriteria<SHostVO> sc = LocalStorageHostSearch.create();
            sc.setParameters("MHostID", mhostId);
            sc.setParameters("ExportRoot", storageRoot);
            return findOneBy(sc);
        } finally {
            txn.commit();
            txn.close();
        }
    }
}
View Full Code Here

            if (entries != null) {
                for (S3MetaDataEntry entry : entries)
                    save(target, targetId, entry);
            }
            txn.commit();
        } finally {
            txn.close();
        }
    }
}
View Full Code Here

                stmt.setString(1, String.valueOf(i));
                stmt.setLong(2, podId);
                stmt.addBatch();
            }
            stmt.executeBatch();
            txn.commit();
        } catch (SQLException e) {
            throw new CloudRuntimeException("Exception caught adding vnet ", e);
        }
    }
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.