cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dar...@apache.org
Subject [31/47] New Transaction API
Date Wed, 23 Oct 2013 19:43:48 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
index 2b79664..59e61e9 100755
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -48,7 +48,7 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.UpdateBuilder;
 import com.cloud.utils.exception.CloudRuntimeException;
 
@@ -237,7 +237,7 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
     @DB
     public HypervisorType getHypervisorType(long volumeId) {
         /* lookup from cluster of pool */
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = null;
         try {
@@ -458,7 +458,7 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
 
     @Override
     public List<Long> listPoolIdsByVolumeCount(long dcId, Long podId, Long clusterId, long accountId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
         try {
@@ -484,7 +484,7 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
     @Override
     public List<Long> listZoneWidePoolIdsByVolumeCount(long dcId, long accountId) {
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
         try {
@@ -519,7 +519,7 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
     @Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         VolumeVO entry = findById(id);
         if (entry != null) {
@@ -533,7 +533,7 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
     @Override
     public ScopeType getVolumeStoragePoolScope(long volumeId) {
         // finding the storage scope where the volume is present
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/VolumeDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDetailsDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VolumeDetailsDaoImpl.java
index 40af999..54158f5 100644
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDetailsDaoImpl.java
@@ -27,7 +27,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value=VolumeDetailsDao.class)
@@ -98,7 +98,7 @@ public class VolumeDetailsDaoImpl extends GenericDaoBase<VolumeDetailVO, Long> i
 
     @Override
     public void persist(long volumeId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<VolumeDetailVO> sc = VolumeSearch.create();
         sc.setParameters("volumeId", volumeId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java b/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java
index c97085b..8260aa1 100755
--- a/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java
+++ b/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java
@@ -30,11 +30,11 @@ import java.util.Properties;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 import com.cloud.utils.PropertiesUtil;
-
 import com.cloud.utils.component.ComponentContext;
 import com.cloud.utils.component.SystemIntegrityChecker;
 import com.cloud.utils.db.ScriptRunner;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 // Creates the CloudStack Database by using the 4.0 schema and apply
 // upgrade steps to it.
@@ -172,7 +172,7 @@ public class DatabaseCreator {
         }
 
         try {
-            Transaction.initDataSource(dbPropsFile);
+            TransactionLegacy.initDataSource(dbPropsFile);
         } catch (NullPointerException e) {
         }
         initDB(dbPropsFile, rootPassword, databases, dryRun);
@@ -187,7 +187,7 @@ public class DatabaseCreator {
             }
 
             System.out.println("========> Processing SQL file at " + sqlScript.getAbsolutePath());
-            Connection conn = Transaction.getStandaloneConnection();
+            Connection conn = TransactionLegacy.getStandaloneConnection();
             try {
                 FileReader reader = null;
                 try {
@@ -207,7 +207,7 @@ public class DatabaseCreator {
             }
         }
 
-        Transaction txn = Transaction.open(Transaction.CLOUD_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
         try {
         // Process db upgrade classes
         for (String upgradeClass: upgradeClasses) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java b/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
index 50eb47b..b6e45ec 100755
--- a/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
+++ b/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
@@ -29,12 +29,11 @@ import org.springframework.stereotype.Component;
 
 import com.cloud.maint.Version;
 import com.cloud.upgrade.dao.VersionDao;
-
 import com.cloud.utils.component.AdapterBase;
 import com.cloud.utils.component.ComponentLifecycle;
 import com.cloud.utils.component.SystemIntegrityChecker;
 import com.cloud.utils.db.GlobalLock;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -72,7 +71,7 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
 	}
 	
 	private Boolean checkDuplicateHostWithTheSameLocalStorage() {
-		Transaction txn = Transaction.open("Integrity");
+	    TransactionLegacy txn = TransactionLegacy.open("Integrity");
 		txn.start();
 		try {
 			Connection conn;
@@ -167,7 +166,7 @@ public class DatabaseIntegrityChecker extends AdapterBase implements SystemInteg
 	}
 	
 	private boolean checkMissedPremiumUpgradeFor228() {
-		Transaction txn = Transaction.open("Integrity");
+	    TransactionLegacy txn = TransactionLegacy.open("Integrity");
 		txn.start();
 		try {
 		    String dbVersion = _dao.getCurrentVersion();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
index 85e36a5..2eec648 100755
--- a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
+++ b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
@@ -73,7 +73,7 @@ import com.cloud.upgrade.dao.VersionVO.Step;
 import com.cloud.utils.component.SystemIntegrityChecker;
 import com.cloud.utils.db.GlobalLock;
 import com.cloud.utils.db.ScriptRunner;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Local(value = {SystemIntegrityChecker.class})
@@ -269,7 +269,7 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
             s_logger.debug("Running upgrade " + upgrade.getClass().getSimpleName() + " to upgrade from " + upgrade.getUpgradableVersionRange()[0] + "-"
                     + upgrade.getUpgradableVersionRange()[1]
                     + " to " + upgrade.getUpgradedVersion());
-            Transaction txn = Transaction.open("Upgrade");
+            TransactionLegacy txn = TransactionLegacy.open("Upgrade");
             txn.start();
             try {
                 Connection conn;
@@ -339,7 +339,7 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
                 VersionVO version = _dao.findByVersion(upgradedVersion, Step.Upgrade);
                 s_logger.debug("Upgrading to version " + upgradedVersion + "...");
 
-                Transaction txn = Transaction.open("Cleanup");
+                TransactionLegacy txn = TransactionLegacy.open("Cleanup");
                 try {
                     if (version != null) {
                         for (DbUpgrade upgrade : versionUpgrades) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/upgrade/dao/Upgrade307to410.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade307to410.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade307to410.java
index 6631050..d5cd489 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade307to410.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade307to410.java
@@ -29,7 +29,7 @@ import com.cloud.utils.PropertiesUtil;
 import com.cloud.utils.crypt.EncryptionSecretKeyChecker;
 import org.apache.log4j.Logger;
 
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.script.Script;
 import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
index 8c92765..12c99b2 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
@@ -35,7 +35,7 @@ import com.cloud.utils.db.GenericSearchBuilder;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -79,7 +79,7 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
         try {
             s_logger.debug("Checking to see if the database is at a version before it was the version table is created");
 
-            conn = Transaction.getStandaloneConnection();
+            conn = TransactionLegacy.getStandaloneConnection();
 
             PreparedStatement pstmt = conn.prepareStatement("SHOW TABLES LIKE 'version'");
             ResultSet rs = pstmt.executeQuery();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
index ce6d9e4..e1e843e 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
@@ -38,7 +38,7 @@ import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.Filter;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -74,7 +74,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 	@Override
     public void deleteRecordsForAccount(Long accountId) {
 	    String sql = ((accountId == null) ? DELETE_ALL : DELETE_ALL_BY_ACCOUNTID);
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
         try {
             txn.start();
@@ -99,7 +99,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
 	@Override
     public void saveAccounts(List<AccountVO> accounts) {
-	    Transaction txn = Transaction.currentTxn();
+	    TransactionLegacy txn = TransactionLegacy.currentTxn();
 	    try {
 	        txn.start();
 	        String sql = INSERT_ACCOUNT;
@@ -133,7 +133,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
     @Override
     public void updateAccounts(List<AccountVO> accounts) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             String sql = UPDATE_ACCOUNT;
@@ -163,7 +163,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
 	@Override
     public void saveUserStats(List<UserStatisticsVO> userStats) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             String sql = INSERT_USER_STATS;
@@ -204,7 +204,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
     @Override
     public void updateUserStats(List<UserStatisticsVO> userStats) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             String sql = UPDATE_USER_STATS;
@@ -231,7 +231,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
 	@Override
     public Long getLastAccountId() {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = GET_LAST_ACCOUNT;
         try {
@@ -248,7 +248,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
     @Override
     public Long getLastUserStatsId() {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = GET_LAST_USER_STATS;
         try {
@@ -265,7 +265,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
     @Override
     public List<Long> listPublicTemplatesByAccount(long accountId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = GET_PUBLIC_TEMPLATES_BY_ACCOUNTID;
         List<Long> templateList = new ArrayList<Long>();
@@ -284,7 +284,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
        @Override
        public Long getLastVmDiskStatsId() {
-               Transaction txn = Transaction.currentTxn();
+               TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = GET_LAST_VM_DISK_STATS;
         try {
@@ -301,7 +301,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
        @Override
        public void updateVmDiskStats(List<VmDiskStatisticsVO> vmDiskStats) {
-               Transaction txn = Transaction.currentTxn();
+               TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             String sql = UPDATE_VM_DISK_STATS;
@@ -335,7 +335,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
        @Override
        public void saveVmDiskStats(List<VmDiskStatisticsVO> vmDiskStats) {
-               Transaction txn = Transaction.currentTxn();
+               TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             String sql = INSERT_VM_DISK_STATS;
@@ -381,7 +381,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
 
     @Override
     public void saveUsageRecords(List<UsageVO> usageRecords) {
-       Transaction txn = Transaction.currentTxn();
+       TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             String sql = INSERT_USGAE_RECORDS;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java
index 9af4a26..0014553 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageIPAddressDaoImpl.java
@@ -32,7 +32,7 @@ import com.cloud.usage.UsageIPAddressVO;
 import com.cloud.user.Account;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UsageIPAddressDao.class})
@@ -56,7 +56,7 @@ public class UsageIPAddressDaoImpl extends GenericDaoBase<UsageIPAddressVO, Long
 	public UsageIPAddressDaoImpl() {}
 
 	public void update(UsageIPAddressVO usage) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -92,7 +92,7 @@ public class UsageIPAddressDaoImpl extends GenericDaoBase<UsageIPAddressVO, Long
             sql = GET_ALL_USAGE_RECORDS;
         }
 
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java
index 783300f..5bedfb9 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageJobDaoImpl.java
@@ -30,7 +30,7 @@ import com.cloud.usage.UsageJobVO;
 import com.cloud.utils.db.Filter;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -42,7 +42,7 @@ public class UsageJobDaoImpl extends GenericDaoBase<UsageJobVO, Long> implements
 
     @Override
     public long getLastJobSuccessDateMillis() {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = GET_LAST_JOB_SUCCESS_DATE_MILLIS;
         try {
@@ -61,7 +61,7 @@ public class UsageJobDaoImpl extends GenericDaoBase<UsageJobVO, Long> implements
 
     @Override
     public void updateJobSuccess(Long jobId, long startMillis, long endMillis, long execTime, boolean success) {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         try {
             txn.start();
 
@@ -115,7 +115,7 @@ public class UsageJobDaoImpl extends GenericDaoBase<UsageJobVO, Long> implements
 
     @Override
     public UsageJobVO isOwner(String hostname, int pid) {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         try {
             if ((hostname == null) || (pid <= 0)) {
                 return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java
index fa63223..70b1764 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageLoadBalancerPolicyDaoImpl.java
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.usage.UsageLoadBalancerPolicyVO;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UsageLoadBalancerPolicyDao.class})
@@ -56,7 +56,7 @@ public class UsageLoadBalancerPolicyDaoImpl extends GenericDaoBase<UsageLoadBala
 	public UsageLoadBalancerPolicyDaoImpl() {}
 
 	public void removeBy(long accountId, long lbId) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -75,7 +75,7 @@ public class UsageLoadBalancerPolicyDaoImpl extends GenericDaoBase<UsageLoadBala
 	}
 
 	public void update(UsageLoadBalancerPolicyVO usage) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -119,7 +119,7 @@ public class UsageLoadBalancerPolicyDaoImpl extends GenericDaoBase<UsageLoadBala
             sql += " LIMIT " + startIndex + ",500";
         }
 
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
index af8083a..59ba1c4 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
@@ -29,7 +29,7 @@ import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageNetworkVO;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -50,7 +50,7 @@ public class UsageNetworkDaoImpl extends GenericDaoBase<UsageNetworkVO, Long> im
 
 	@Override
 	public Map<String, UsageNetworkVO> getRecentNetworkStats() {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         String sql = SELECT_LATEST_STATS;
         PreparedStatement pstmt = null;
         try {
@@ -85,7 +85,7 @@ public class UsageNetworkDaoImpl extends GenericDaoBase<UsageNetworkVO, Long> im
 
     @Override
 	public void deleteOldStats(long maxEventTime) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         String sql = DELETE_OLD_STATS;
         PreparedStatement pstmt = null;
         try {
@@ -102,7 +102,7 @@ public class UsageNetworkDaoImpl extends GenericDaoBase<UsageNetworkVO, Long> im
 
     @Override
     public void saveUsageNetworks (List<UsageNetworkVO> usageNetworks) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             String sql = INSERT_USAGE_NETWORK;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java
index 4ed7c27..6fb03e7 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.usage.UsageNetworkOfferingVO;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UsageNetworkOfferingDao.class})
@@ -55,7 +55,7 @@ public class UsageNetworkOfferingDaoImpl extends GenericDaoBase<UsageNetworkOffe
 	public UsageNetworkOfferingDaoImpl() {}
 
 	public void update(UsageNetworkOfferingVO usage) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -100,7 +100,7 @@ public class UsageNetworkOfferingDaoImpl extends GenericDaoBase<UsageNetworkOffe
             sql += " LIMIT " + startIndex + ",500";
         }
 
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java
index 2afc50a..0f2ac0d 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsagePortForwardingRuleDaoImpl.java
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.usage.UsagePortForwardingRuleVO;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UsagePortForwardingRuleDao.class})
@@ -56,7 +56,7 @@ public class UsagePortForwardingRuleDaoImpl extends GenericDaoBase<UsagePortForw
 	public UsagePortForwardingRuleDaoImpl() {}
 
 	public void removeBy(long accountId, long pfId) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -75,7 +75,7 @@ public class UsagePortForwardingRuleDaoImpl extends GenericDaoBase<UsagePortForw
 	}
 
 	public void update(UsagePortForwardingRuleVO usage) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -119,7 +119,7 @@ public class UsagePortForwardingRuleDaoImpl extends GenericDaoBase<UsagePortForw
             sql += " LIMIT " + startIndex + ",500";
         }
 
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java
index 7564bf0..78ee857 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageSecurityGroupDaoImpl.java
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.usage.UsageSecurityGroupVO;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UsageSecurityGroupDao.class})
@@ -55,7 +55,7 @@ public class UsageSecurityGroupDaoImpl extends GenericDaoBase<UsageSecurityGroup
 	public UsageSecurityGroupDaoImpl() {}
 
 	public void update(UsageSecurityGroupVO usage) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -100,7 +100,7 @@ public class UsageSecurityGroupDaoImpl extends GenericDaoBase<UsageSecurityGroup
             sql += " LIMIT " + startIndex + ",500";
         }
 
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java
index 8f18adc..f9ee2e6 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java
@@ -33,7 +33,7 @@ import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UsageStorageDao.class})
@@ -93,7 +93,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase<UsageStorageVO, Long> im
     }
 	
 	public void removeBy(long accountId, long volId, int storage_type) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -113,7 +113,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase<UsageStorageVO, Long> im
 	}
 
 	public void update(UsageStorageVO usage) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -158,7 +158,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase<UsageStorageVO, Long> im
             sql += " LIMIT " + startIndex + ",500";
         }
 
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java
index fc82754..ef31390 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.usage.UsageVMInstanceVO;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UsageVMInstanceDao.class})
@@ -51,7 +51,7 @@ public class UsageVMInstanceDaoImpl extends GenericDaoBase<UsageVMInstanceVO, Lo
 	public UsageVMInstanceDaoImpl() {}
 
     public void update(UsageVMInstanceVO instance) {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
         try {
             txn.start();
@@ -71,7 +71,7 @@ public class UsageVMInstanceDaoImpl extends GenericDaoBase<UsageVMInstanceVO, Lo
     }
 
     public void delete(UsageVMInstanceVO instance) {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
         try {
             txn.start();
@@ -91,7 +91,7 @@ public class UsageVMInstanceDaoImpl extends GenericDaoBase<UsageVMInstanceVO, Lo
     }
 
     public List<UsageVMInstanceVO> getUsageRecords(long accountId, Date startDate, Date endDate) {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
         List<UsageVMInstanceVO> usageInstances = new ArrayList<UsageVMInstanceVO>();
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java
index 9f98bbf..b9f5f8c 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVMSnapshotDaoImpl.java
@@ -20,7 +20,7 @@ package com.cloud.usage.dao;
 import com.cloud.usage.UsageVMSnapshotVO;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -51,7 +51,7 @@ public class UsageVMSnapshotDaoImpl extends GenericDaoBase<UsageVMSnapshotVO, Lo
             "ORDER BY created desc limit 1";
     
     public void update(UsageVMSnapshotVO usage) {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
         try {
             txn.start();
@@ -76,7 +76,7 @@ public class UsageVMSnapshotDaoImpl extends GenericDaoBase<UsageVMSnapshotVO, Lo
         List<UsageVMSnapshotVO> usageRecords = new ArrayList<UsageVMSnapshotVO>();
 
         String sql = GET_USAGE_RECORDS_BY_ACCOUNT;
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
 
         try {
@@ -130,7 +130,7 @@ public class UsageVMSnapshotDaoImpl extends GenericDaoBase<UsageVMSnapshotVO, Lo
         List<UsageVMSnapshotVO> usageRecords = new ArrayList<UsageVMSnapshotVO>();
 
         String sql = PREVIOUS_QUERY;
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
         try {
             int i = 1;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java
index d6bf13b..d8d1455 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVPNUserDaoImpl.java
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.usage.UsageVPNUserVO;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UsageVPNUserDao.class})
@@ -55,7 +55,7 @@ public class UsageVPNUserDaoImpl extends GenericDaoBase<UsageVPNUserVO, Long> im
 	public UsageVPNUserDaoImpl() {}
 
 	public void update(UsageVPNUserVO usage) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -99,7 +99,7 @@ public class UsageVPNUserDaoImpl extends GenericDaoBase<UsageVPNUserVO, Long> im
             sql += " LIMIT " + startIndex + ",500";
         }
 
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
index 8436c59..d2cb673 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
@@ -29,7 +29,7 @@ import org.springframework.stereotype.Component;
 
 import com.cloud.usage.UsageVmDiskVO;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -51,7 +51,7 @@ public class UsageVmDiskDaoImpl extends GenericDaoBase<UsageVmDiskVO, Long> impl
 
 	@Override
 	public Map<String, UsageVmDiskVO> getRecentVmDiskStats() {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         String sql = SELECT_LATEST_STATS;
         PreparedStatement pstmt = null;
         try {
@@ -89,7 +89,7 @@ public class UsageVmDiskDaoImpl extends GenericDaoBase<UsageVmDiskVO, Long> impl
 
     @Override
 	public void deleteOldStats(long maxEventTime) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         String sql = DELETE_OLD_STATS;
         PreparedStatement pstmt = null;
         try {
@@ -106,7 +106,7 @@ public class UsageVmDiskDaoImpl extends GenericDaoBase<UsageVmDiskVO, Long> impl
     
     @Override
     public void saveUsageVmDisks(List<UsageVmDiskVO> usageVmDisks) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             String sql = INSERT_USAGE_VM_DISK;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java
index 039d8f4..8bf95b6 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVolumeDaoImpl.java
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.usage.UsageVolumeVO;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UsageVolumeDao.class})
@@ -56,7 +56,7 @@ public class UsageVolumeDaoImpl extends GenericDaoBase<UsageVolumeVO, Long> impl
 	public UsageVolumeDaoImpl() {}
 
 	public void removeBy(long accountId, long volId) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -75,7 +75,7 @@ public class UsageVolumeDaoImpl extends GenericDaoBase<UsageVolumeVO, Long> impl
 	}
 
 	public void update(UsageVolumeVO usage) {
-	    Transaction txn = Transaction.open(Transaction.USAGE_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
 		PreparedStatement pstmt = null;
 		try {
 		    txn.start();
@@ -119,7 +119,7 @@ public class UsageVolumeDaoImpl extends GenericDaoBase<UsageVolumeVO, Long> impl
             sql += " LIMIT " + startIndex + ",500";
         }
 
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         PreparedStatement pstmt = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/user/AccountDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/AccountDetailsDaoImpl.java b/engine/schema/src/com/cloud/user/AccountDetailsDaoImpl.java
index 30bbe73..9bdaff6 100755
--- a/engine/schema/src/com/cloud/user/AccountDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/user/AccountDetailsDaoImpl.java
@@ -31,7 +31,7 @@ import com.cloud.utils.db.QueryBuilder;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Local(value = {AccountDetailsDao.class})
 public class AccountDetailsDaoImpl extends GenericDaoBase<AccountDetailVO, Long> implements AccountDetailsDao, ScopedConfigStorage {
@@ -57,7 +57,7 @@ public class AccountDetailsDaoImpl extends GenericDaoBase<AccountDetailVO, Long>
 
     @Override
     public void persist(long accountId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<AccountDetailVO> sc = accountSearch.create();
         sc.setParameters("accountId", accountId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java b/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
index 41f1f73..91226e7 100755
--- a/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
+++ b/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
@@ -39,7 +39,7 @@ import com.cloud.utils.db.GenericSearchBuilder;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={AccountDao.class})
@@ -124,7 +124,7 @@ public class AccountDaoImpl extends GenericDaoBase<AccountVO, Long> implements A
     
     @Override
     public Pair<User, Account> findUserAccountByApiKey(String apiKey) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         Pair<User, Account> userAcctPair = null;
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java b/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java
index 4a1a51c..ae21dfe 100644
--- a/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java
+++ b/engine/schema/src/com/cloud/user/dao/UserStatisticsDaoImpl.java
@@ -33,7 +33,7 @@ import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UserStatisticsDao.class})
@@ -100,7 +100,7 @@ public class UserStatisticsDaoImpl extends GenericDaoBase<UserStatisticsVO, Long
         List<UserStatisticsVO> userStats = new ArrayList<UserStatisticsVO>();
         if (minRemovedDate == null) return userStats;
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             String sql = ACTIVE_AND_RECENTLY_DELETED_SEARCH + " LIMIT " + startIndex + "," + limit;
             PreparedStatement pstmt = null;
@@ -120,7 +120,7 @@ public class UserStatisticsDaoImpl extends GenericDaoBase<UserStatisticsVO, Long
     public List<UserStatisticsVO> listUpdatedStats() {
         List<UserStatisticsVO> userStats = new ArrayList<UserStatisticsVO>();
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             PreparedStatement pstmt = null;
             pstmt = txn.prepareAutoCloseStatement(UPDATED_STATS_SEARCH);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/user/dao/VmDiskStatisticsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/dao/VmDiskStatisticsDaoImpl.java b/engine/schema/src/com/cloud/user/dao/VmDiskStatisticsDaoImpl.java
index 02f3406..2a3d132 100644
--- a/engine/schema/src/com/cloud/user/dao/VmDiskStatisticsDaoImpl.java
+++ b/engine/schema/src/com/cloud/user/dao/VmDiskStatisticsDaoImpl.java
@@ -33,7 +33,7 @@ import com.cloud.utils.DateUtil;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={VmDiskStatisticsDao.class})
@@ -97,7 +97,7 @@ public class VmDiskStatisticsDaoImpl extends GenericDaoBase<VmDiskStatisticsVO,
         List<VmDiskStatisticsVO> vmDiskStats = new ArrayList<VmDiskStatisticsVO>();
         if (minRemovedDate == null) return vmDiskStats;
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             String sql = ACTIVE_AND_RECENTLY_DELETED_SEARCH + " LIMIT " + startIndex + "," + limit;
             PreparedStatement pstmt = null;
@@ -117,7 +117,7 @@ public class VmDiskStatisticsDaoImpl extends GenericDaoBase<VmDiskStatisticsVO,
     public List<VmDiskStatisticsVO> listUpdatedStats() {
         List<VmDiskStatisticsVO> vmDiskStats = new ArrayList<VmDiskStatisticsVO>();
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             PreparedStatement pstmt = null;
             pstmt = txn.prepareAutoCloseStatement(UPDATED_VM_NETWORK_STATS_SEARCH);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/vm/dao/ConsoleProxyDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/ConsoleProxyDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/ConsoleProxyDaoImpl.java
index 9af371e..4238f6a 100644
--- a/engine/schema/src/com/cloud/vm/dao/ConsoleProxyDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/ConsoleProxyDaoImpl.java
@@ -34,7 +34,7 @@ import com.cloud.utils.db.Attribute;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.UpdateBuilder;
 import com.cloud.vm.ConsoleProxyVO;
 import com.cloud.vm.VirtualMachine.State;
@@ -162,7 +162,7 @@ public class ConsoleProxyDaoImpl extends GenericDaoBase<ConsoleProxyVO, Long> im
     
     @Override
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         ConsoleProxyVO proxy = createForUpdate();
         proxy.setPublicIpAddress(null);
@@ -227,7 +227,7 @@ public class ConsoleProxyDaoImpl extends GenericDaoBase<ConsoleProxyVO, Long> im
     public List<Pair<Long, Integer>> getProxyLoadMatrix() {
     	ArrayList<Pair<Long, Integer>> l = new ArrayList<Pair<Long, Integer>>();
     	
-        Transaction txn = Transaction.currentTxn();;
+        TransactionLegacy txn = TransactionLegacy.currentTxn();;
         PreparedStatement pstmt = null;
         try {
             pstmt = txn.prepareAutoCloseStatement(PROXY_ASSIGNMENT_MATRIX);
@@ -245,7 +245,7 @@ public class ConsoleProxyDaoImpl extends GenericDaoBase<ConsoleProxyVO, Long> im
     public List<Pair<Long, Integer>> getDatacenterStoragePoolHostInfo(long dcId, boolean countAllPoolTypes) {
     	ArrayList<Pair<Long, Integer>> l = new ArrayList<Pair<Long, Integer>>();
     	
-        Transaction txn = Transaction.currentTxn();;
+        TransactionLegacy txn = TransactionLegacy.currentTxn();;
         PreparedStatement pstmt = null;
         try {
         	if(countAllPoolTypes) {
@@ -267,7 +267,7 @@ public class ConsoleProxyDaoImpl extends GenericDaoBase<ConsoleProxyVO, Long> im
     
     @Override
     public int getProxyStaticLoad(long proxyVmId) {
-        Transaction txn = Transaction.currentTxn();;
+        TransactionLegacy txn = TransactionLegacy.currentTxn();;
         PreparedStatement pstmt = null;
         try {
             pstmt = txn.prepareAutoCloseStatement(GET_PROXY_LOAD);
@@ -285,7 +285,7 @@ public class ConsoleProxyDaoImpl extends GenericDaoBase<ConsoleProxyVO, Long> im
     
     @Override
     public int getProxyActiveLoad(long proxyVmId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         try {
             pstmt = txn.prepareAutoCloseStatement(GET_PROXY_ACTIVE_LOAD);
@@ -304,7 +304,7 @@ public class ConsoleProxyDaoImpl extends GenericDaoBase<ConsoleProxyVO, Long> im
     private List<ConsoleProxyLoadInfo> getDatacenterLoadMatrix(String sql) {
     	ArrayList<ConsoleProxyLoadInfo> l = new ArrayList<ConsoleProxyLoadInfo>();
     	
-        Transaction txn = Transaction.currentTxn();;
+        TransactionLegacy txn = TransactionLegacy.currentTxn();;
         PreparedStatement pstmt = null;
         try {
             pstmt = txn.prepareAutoCloseStatement(sql);
@@ -325,7 +325,7 @@ public class ConsoleProxyDaoImpl extends GenericDaoBase<ConsoleProxyVO, Long> im
     @Override
     public List<Long> getRunningProxyListByMsid(long msid) {
     	List<Long> l = new ArrayList<Long>();
-        Transaction txn = Transaction.currentTxn();;
+        TransactionLegacy txn = TransactionLegacy.currentTxn();;
         PreparedStatement pstmt = null;
         try {
             pstmt = txn.prepareAutoCloseStatement(

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
index 65b9d3b..7676e2d 100755
--- a/engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
@@ -47,7 +47,7 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.UpdateBuilder;
 import com.cloud.vm.DomainRouterVO;
 import com.cloud.vm.VirtualMachine;
@@ -143,7 +143,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
 
     @Override
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         DomainRouterVO router = createForUpdate();
         router.setPublicIpAddress(null);
@@ -307,7 +307,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
     @Override
     @DB
     public DomainRouterVO persist(DomainRouterVO router, List<Network> guestNetworks) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         // 1) create network
@@ -330,7 +330,7 @@ public class DomainRouterDaoImpl extends GenericDaoBase<DomainRouterVO, Long> im
         if (_routerNetworkDao.findByRouterAndNetwork(router.getId(), guestNetwork.getId()) == null) {
             NetworkOffering off = _offDao.findById(guestNetwork.getNetworkOfferingId());
             if (!(off.getName().equalsIgnoreCase(NetworkOffering.SystemPrivateGatewayNetworkOffering))) {
-                Transaction txn = Transaction.currentTxn();
+                TransactionLegacy txn = TransactionLegacy.currentTxn();
                 txn.start();
                 //1) add router to network
                 RouterNetworkVO routerNtwkMap = new RouterNetworkVO(router.getId(), guestNetwork.getId(), guestNetwork.getGuestType());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/vm/dao/NicDetailDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/NicDetailDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/NicDetailDaoImpl.java
index 67bc0b5..033acca 100644
--- a/engine/schema/src/com/cloud/vm/dao/NicDetailDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/NicDetailDaoImpl.java
@@ -19,7 +19,7 @@ package com.cloud.vm.dao;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.vm.NicDetailVO;
 import org.springframework.stereotype.Component;
 
@@ -75,7 +75,7 @@ public class NicDetailDaoImpl extends GenericDaoBase<NicDetailVO, Long> implemen
 
     @Override
     public void persist(long nicId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<NicDetailVO> sc = NicSearch.create();
         sc.setParameters("nicId", nicId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/vm/dao/SecondaryStorageVmDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/SecondaryStorageVmDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/SecondaryStorageVmDaoImpl.java
index f802a90..2fcc3e7 100644
--- a/engine/schema/src/com/cloud/vm/dao/SecondaryStorageVmDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/SecondaryStorageVmDaoImpl.java
@@ -31,7 +31,7 @@ import com.cloud.utils.db.Attribute;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.UpdateBuilder;
 import com.cloud.vm.SecondaryStorageVm;
 import com.cloud.vm.SecondaryStorageVmVO;
@@ -105,7 +105,7 @@ public class SecondaryStorageVmDaoImpl extends GenericDaoBase<SecondaryStorageVm
     
     @Override
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SecondaryStorageVmVO proxy = createForUpdate();
         proxy.setPublicIpAddress(null);
@@ -167,7 +167,7 @@ public class SecondaryStorageVmDaoImpl extends GenericDaoBase<SecondaryStorageVm
     @Override
     public List<Long> getRunningSecStorageVmListByMsid(SecondaryStorageVm.Role role, long msid) {
     	List<Long> l = new ArrayList<Long>();
-        Transaction txn = Transaction.currentTxn();;
+        TransactionLegacy txn = TransactionLegacy.currentTxn();;
         PreparedStatement pstmt = null;
         try {
         	String sql;
@@ -237,7 +237,7 @@ public class SecondaryStorageVmDaoImpl extends GenericDaoBase<SecondaryStorageVm
     public List<Long> listRunningSecStorageOrderByLoad(SecondaryStorageVm.Role role, long zoneId) {
     	
     	List<Long> l = new ArrayList<Long>();
-        Transaction txn = Transaction.currentTxn();;
+        TransactionLegacy txn = TransactionLegacy.currentTxn();;
         PreparedStatement pstmt = null;
         try {
         	String sql;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
index 8afce09..9cef0ae 100755
--- a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
@@ -46,7 +46,7 @@ import com.cloud.utils.db.JoinBuilder;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.vm.NicVO;
 import com.cloud.vm.UserVmVO;
@@ -350,7 +350,7 @@ public class UserVmDaoImpl extends GenericDaoBase<UserVmVO, Long> implements Use
 
     @Override
     public List<Long> listPodIdsHavingVmsforAccount(long zoneId, long accountId){
-	Transaction txn = Transaction.currentTxn();
+	TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
 
@@ -374,7 +374,7 @@ public class UserVmDaoImpl extends GenericDaoBase<UserVmVO, Long> implements Use
 
     @Override
     public Hashtable<Long, UserVmData> listVmDetails(Hashtable<Long, UserVmData> userVmDataHash){
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
 
         try {
@@ -575,7 +575,7 @@ public class UserVmDaoImpl extends GenericDaoBase<UserVmVO, Long> implements Use
 
     @Override
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         _tagsDao.removeByIdAndType(id, TaggedResourceType.UserVm);
         boolean result = super.remove(id);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/vm/dao/UserVmDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/UserVmDetailsDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/UserVmDetailsDaoImpl.java
index ce8dbd8..77f1418 100644
--- a/engine/schema/src/com/cloud/vm/dao/UserVmDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/UserVmDetailsDaoImpl.java
@@ -28,7 +28,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.vm.UserVmDetailVO;
 
 @Component
@@ -93,7 +93,7 @@ public class UserVmDetailsDaoImpl extends GenericDaoBase<UserVmDetailVO, Long> i
 
 	@Override
 	public void persist(long vmId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<UserVmDetailVO> sc = VmSearch.create();
         sc.setParameters("vmId", vmId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
index cf8e0a8..301944b 100644
--- a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
@@ -48,7 +48,7 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.UpdateBuilder;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.vm.NicVO;
@@ -484,7 +484,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
 
     @Override
     public Pair<List<Long>, Map<Long, Double>> listClusterIdsInZoneByVmCount(long zoneId, long accountId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
         Map<Long, Double> clusterVmCountMap = new HashMap<Long, Double>();
@@ -513,7 +513,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
 
     @Override
     public Pair<List<Long>, Map<Long, Double>> listClusterIdsInPodByVmCount(long podId, long accountId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
         Map<Long, Double> clusterVmCountMap = new HashMap<Long, Double>();
@@ -543,7 +543,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
 
     @Override
     public Pair<List<Long>, Map<Long, Double>> listPodIdsInZoneByVmCount(long dataCenterId, long accountId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
         Map<Long, Double> podVmCountMap = new HashMap<Long, Double>();
@@ -569,7 +569,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
 
     @Override
     public List<Long> listHostIdsByVmCount(long dcId, Long podId, Long clusterId, long accountId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
         try {
@@ -654,7 +654,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
     @Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         VMInstanceVO vm = findById(id);
         if (vm != null && vm.getType() == Type.User) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java b/engine/schema/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java
index ad8f4f0..c2d48d4 100644
--- a/engine/schema/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java
+++ b/engine/schema/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java
@@ -32,7 +32,7 @@ import com.cloud.utils.db.JoinBuilder.JoinType;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Local(value = { AffinityGroupVMMapDao.class })
 public class AffinityGroupVMMapDaoImpl extends GenericDaoBase<AffinityGroupVMMapVO, Long> implements
@@ -160,7 +160,7 @@ public class AffinityGroupVMMapDaoImpl extends GenericDaoBase<AffinityGroupVMMap
 
     @Override
     public void updateMap(Long vmId, List<Long> affinityGroupIds) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         SearchCriteria<AffinityGroupVMMapVO> sc = createSearchCriteria();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDaoImpl.java b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDaoImpl.java
index 6f70b35..54a557b 100644
--- a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDaoImpl.java
+++ b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDaoImpl.java
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value = { VMComputeTagDao.class })
@@ -52,7 +52,7 @@ public class VMComputeTagDaoImpl extends GenericDaoBase<VMComputeTagVO, Long> im
 
     @Override
     public void persist(long vmId, List<String> computeTags) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         txn.start();
         SearchCriteria<VMComputeTagVO> sc = VmIdSearch.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDaoImpl.java b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDaoImpl.java
index 3082d21..fa2ce81 100644
--- a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDaoImpl.java
+++ b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDaoImpl.java
@@ -37,7 +37,7 @@ import com.cloud.network.dao.NetworkVO;
 import com.cloud.utils.Pair;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.vm.NicProfile;
 
 
@@ -78,7 +78,7 @@ public class VMEntityDaoImpl extends GenericDaoBase<VMEntityVO, Long> implements
     @Override
     @DB
     public VMEntityVO persist(VMEntityVO vm) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         VMEntityVO dbVO = super.persist(vm);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDaoImpl.java b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDaoImpl.java
index 0f2c4cc..f86e788 100644
--- a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDaoImpl.java
+++ b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDaoImpl.java
@@ -28,7 +28,7 @@ import com.cloud.network.dao.NetworkDao;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value = { VMNetworkMapDao.class })
@@ -52,7 +52,7 @@ public class VMNetworkMapDaoImpl extends GenericDaoBase<VMNetworkMapVO, Long> im
 
     @Override
     public void persist(long vmId, List<Long> networks) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         txn.start();
         SearchCriteria<VMNetworkMapVO> sc = VmIdSearch.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDaoImpl.java b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDaoImpl.java
index 73b4dd2..31ed5b8 100644
--- a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDaoImpl.java
+++ b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDaoImpl.java
@@ -35,7 +35,7 @@ import com.cloud.utils.db.DB;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value = { VMReservationDao.class })
@@ -80,7 +80,7 @@ public class VMReservationDaoImpl extends GenericDaoBase<VMReservationVO, Long>
     @Override
     @DB
     public VMReservationVO persist(VMReservationVO reservation) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         VMReservationVO dbVO = super.persist(reservation);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDaoImpl.java b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDaoImpl.java
index be194bb..cd06b20 100644
--- a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDaoImpl.java
+++ b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDaoImpl.java
@@ -31,7 +31,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value = { VMRootDiskTagDao.class })
@@ -52,7 +52,7 @@ public class VMRootDiskTagDaoImpl extends GenericDaoBase<VMRootDiskTagVO, Long>
 
     @Override
     public void persist(long vmId, List<String> rootDiskTags) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         txn.start();
         SearchCriteria<VMRootDiskTagVO> sc = VmIdSearch.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java
index 9e2bb36..8ed84ef 100644
--- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java
+++ b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java
@@ -40,7 +40,7 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Local(value = { PrimaryDataStoreDao.class })
@@ -226,7 +226,7 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase<StoragePoolVO, Long>
     @Override
     @DB
     public StoragePoolVO persist(StoragePoolVO pool, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         pool = super.persist(pool);
         if (details != null) {
@@ -254,7 +254,7 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase<StoragePoolVO, Long>
         }
         sql.delete(sql.length() - 4, sql.length());
         sql.append(DetailsSqlSuffix);
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         try {
             pstmt = txn.prepareAutoCloseStatement(sql.toString());
@@ -331,7 +331,7 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase<StoragePoolVO, Long>
             }
             sql.delete(sql.length() - 4, sql.length());
             sql.append(ZoneWideDetailsSqlSuffix);
-            Transaction txn = Transaction.currentTxn();
+            TransactionLegacy txn = TransactionLegacy.currentTxn();
             PreparedStatement pstmt = null;
             try {
                 pstmt = txn.prepareAutoCloseStatement(sql.toString());
@@ -357,7 +357,7 @@ public class PrimaryDataStoreDaoImpl extends GenericDaoBase<StoragePoolVO, Long>
 
         StringBuilder sql = new StringBuilder(FindPoolTagDetails);
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         try {
             pstmt = txn.prepareAutoCloseStatement(sql.toString());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
index e7c6627..196b08b 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
@@ -47,6 +47,7 @@ import com.cloud.utils.db.DB;
 import com.cloud.utils.db.QueryBuilder;
 import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -110,7 +111,7 @@ public class DefaultEndPointSelector implements EndPointSelector {
         PreparedStatement pstmt = null;
         ResultSet rs = null;
         HostVO host = null;
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         try {
             pstmt = txn.prepareStatement(sql);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDetailsDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDetailsDaoImpl.java
index ad52042..3c766cf 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDetailsDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDetailsDaoImpl.java
@@ -29,7 +29,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value = ImageStoreDetailsDao.class)
@@ -46,7 +46,7 @@ public class ImageStoreDetailsDaoImpl extends GenericDaoBase<ImageStoreDetailVO,
 
     @Override
     public void update(long storeId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         SearchCriteria<ImageStoreDetailVO> sc = storeSearch.create();
         sc.setParameters("store", storeId);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
index d828085..48416a2 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
@@ -40,7 +40,7 @@ import com.cloud.storage.DataStoreRole;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.UpdateBuilder;
 
@@ -164,7 +164,7 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase<SnapshotDataStoreVO
         SearchCriteria<SnapshotDataStoreVO> sc = storeSearch.create();
         sc.setParameters("store_id", id);
         sc.setParameters("store_role", role);
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         remove(sc);
         txn.commit();
@@ -182,7 +182,7 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase<SnapshotDataStoreVO
     @Override
     @DB
     public SnapshotDataStoreVO findParent(DataStoreRole role, Long storeId, Long volumeId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         ResultSet rs = null;
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
index 5f47de8..4509e23 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
@@ -43,7 +43,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.UpdateBuilder;
 
 @Component
@@ -202,7 +202,7 @@ public class TemplateDataStoreDaoImpl extends GenericDaoBase<TemplateDataStoreVO
     public void deletePrimaryRecordsForStore(long id) {
         SearchCriteria<TemplateDataStoreVO> sc = storeSearch.create();
         sc.setParameters("store_id", id);
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         remove(sc);
         txn.commit();
@@ -212,7 +212,7 @@ public class TemplateDataStoreDaoImpl extends GenericDaoBase<TemplateDataStoreVO
     public void deletePrimaryRecordsForTemplate(long templateId) {
         SearchCriteria<TemplateDataStoreVO> sc = templateSearch.create();
         sc.setParameters("template_id", templateId);
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         expunge(sc);
         txn.commit();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
index 04f8b70..2bacd03 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
@@ -33,7 +33,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.UpdateBuilder;
 
@@ -143,7 +143,7 @@ public class VolumeDataStoreDaoImpl extends GenericDaoBase<VolumeDataStoreVO, Lo
     public void deletePrimaryRecordsForStore(long id) {
         SearchCriteria<VolumeDataStoreVO> sc = storeSearch.create();
         sc.setParameters("store_id", id);
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         remove(sc);
         txn.commit();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
index 4ea4cee..90ad17a 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
@@ -43,7 +43,7 @@ import com.cloud.storage.StorageManager;
 import com.cloud.storage.StoragePoolHostVO;
 import com.cloud.storage.StoragePoolStatus;
 import com.cloud.storage.dao.StoragePoolHostDao;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -181,7 +181,7 @@ public class PrimaryDataStoreHelper {
     public boolean deletePrimaryDataStore(DataStore store) {
         List<StoragePoolHostVO> hostPoolRecords = this.storagePoolHostDao.listByPoolId(store.getId());
         StoragePoolVO poolVO = this.dataStoreDao.findById(store.getId());
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         for (StoragePoolHostVO host : hostPoolRecords) {
             storagePoolHostDao.deleteStoragePoolHostDetails(host.getHostId(), host.getPoolId());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/storage/src/org/apache/cloudstack/storage/volume/db/PrimaryDataStoreDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/db/PrimaryDataStoreDetailsDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/volume/db/PrimaryDataStoreDetailsDaoImpl.java
index 9d17434..be741da 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/volume/db/PrimaryDataStoreDetailsDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/volume/db/PrimaryDataStoreDetailsDaoImpl.java
@@ -27,7 +27,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 public class PrimaryDataStoreDetailsDaoImpl extends GenericDaoBase<PrimaryDataStoreDetailVO, Long> implements
@@ -45,7 +45,7 @@ public class PrimaryDataStoreDetailsDaoImpl extends GenericDaoBase<PrimaryDataSt
 
     @Override
     public void update(long poolId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         SearchCriteria<PrimaryDataStoreDetailVO> sc = PoolSearch.create();
         sc.setParameters("pool", poolId);
 


Mime
View raw message