cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dar...@apache.org
Subject [17/20] New Transaction API
Date Wed, 16 Oct 2013 16:50:28 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java b/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
index 88a2b2b..301e54c 100755
--- a/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
+++ b/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
@@ -46,7 +46,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;
 
 @Component
@@ -186,7 +186,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
     @Override
     public  List<Long> listClustersCrossingThreshold(short capacityType, Long zoneId, String configName, long compute_requested){
 
-         Transaction txn = Transaction.currentTxn();
+         TransactionLegacy txn = TransactionLegacy.currentTxn();
          PreparedStatement pstmt = null;
          List<Long> result = new ArrayList<Long>();         
          StringBuilder sql = new StringBuilder(LIST_CLUSTERS_CROSSING_THRESHOLD);
@@ -241,7 +241,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
     @Override
     public  List<SummedCapacity> findCapacityBy(Integer capacityType, Long zoneId, Long podId, Long clusterId, String resource_state){
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<SummedCapacity> result = new ArrayList<SummedCapacity>();
 
@@ -291,7 +291,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
     public  List<SummedCapacity> listCapacitiesGroupedByLevelAndType(Integer capacityType, Long zoneId, Long podId, Long clusterId, int level, Long limit){
 
         StringBuilder finalQuery = new StringBuilder(); 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<SummedCapacity> result = new ArrayList<SummedCapacity>();
 
@@ -378,7 +378,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
     @Override
     public  List<SummedCapacity> findCapacityBy(Integer capacityType, Long zoneId, Long podId, Long clusterId){
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<SummedCapacity> result = new ArrayList<SummedCapacity>();
 
@@ -425,7 +425,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
     }
 
     public void updateAllocated(Long hostId, long allocatedAmount, short capacityType, boolean add) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         try {
             txn.start();
@@ -458,7 +458,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
 
     @Override
     public List<Long> listClustersInZoneOrPodByHostCapacities(long id, int requiredCpu, long requiredRam, short capacityTypeForOrdering, boolean isZone){
-    Transaction txn = Transaction.currentTxn();
+    TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
 
@@ -503,7 +503,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
 
     @Override
     public List<Long> listHostsWithEnoughCapacity(int requiredCpu, long requiredRam, Long clusterId, String hostType){
-    Transaction txn = Transaction.currentTxn();
+    TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
 
@@ -594,7 +594,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
     @Override
     public List<SummedCapacity> findByClusterPodZone(Long zoneId, Long podId, Long clusterId){
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<SummedCapacity> result = new ArrayList<SummedCapacity>();
 
@@ -706,7 +706,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
 
     @Override
     public Pair<List<Long>, Map<Long, Double>> orderClustersByAggregateCapacity(long id, short capacityTypeForOrdering, boolean isZone){
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
         Map<Long, Double> clusterCapacityMap = new HashMap<Long, Double>();
@@ -759,7 +759,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
 
     @Override
     public List<Long> listPodsByHostCapacities(long zoneId, int requiredCpu, long requiredRam, short capacityType) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
 
@@ -793,7 +793,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
 
     @Override
     public Pair<List<Long>, Map<Long, Double>> orderPodsByAggregateCapacity(long zoneId, short capacityTypeForOrdering) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<Long> result = new ArrayList<Long>();
         Map<Long, Double> podCapacityMap = new HashMap<Long, Double>();
@@ -835,7 +835,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
 
     @Override
     public void updateCapacityState(Long dcId, Long podId, Long clusterId, Long hostId, String capacityState) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         StringBuilder sql = new StringBuilder(UPDATE_CAPACITY_STATE);
         List<Long> resourceIdList = new ArrayList<Long>();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java b/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
index 9070ff9..0d99d30 100644
--- a/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
+++ b/engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java
@@ -40,7 +40,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={ResourceCountDao.class})
@@ -158,7 +158,7 @@ public class ResourceCountDaoImpl extends GenericDaoBase<ResourceCountVO, Long>
     @Override @DB
     public void createResourceCounts(long ownerId, ResourceLimit.ResourceOwnerType ownerType){
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         ResourceType[] resourceTypes = Resource.ResourceType.values();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/ClusterDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/ClusterDetailsDaoImpl.java b/engine/schema/src/com/cloud/dc/ClusterDetailsDaoImpl.java
index f7f0f11..72ac400 100755
--- a/engine/schema/src/com/cloud/dc/ClusterDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/ClusterDetailsDaoImpl.java
@@ -30,7 +30,7 @@ import com.cloud.utils.crypt.DBEncryptionUtil;
 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;
 
 @Local(value=ClusterDetailsDao.class)
 public class ClusterDetailsDaoImpl extends GenericDaoBase<ClusterDetailsVO, Long> implements ClusterDetailsDao, ScopedConfigStorage {
@@ -100,7 +100,7 @@ public class ClusterDetailsDaoImpl extends GenericDaoBase<ClusterDetailsVO, Long
 
     @Override
     public void persist(long clusterId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<ClusterDetailsVO> sc = ClusterSearch.create();
         sc.setParameters("clusterId", clusterId);
@@ -119,7 +119,7 @@ public class ClusterDetailsDaoImpl extends GenericDaoBase<ClusterDetailsVO, Long
 
     @Override
     public void persist(long clusterId, String name, String value) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<ClusterDetailsVO> sc = DetailSearch.create();
         sc.setParameters("clusterId", clusterId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java
index d115ce9..bd45ecd 100644
--- a/engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.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;
 
 @Component
@@ -156,7 +156,7 @@ public class ClusterDaoImpl extends GenericDaoBase<ClusterVO, Long> implements C
 
     @Override
     public Map<Long, List<Long>> getPodClusterIdMap(List<Long> clusterIds){
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         Map<Long, List<Long>> result = new HashMap<Long, List<Long>>();
 
@@ -243,7 +243,7 @@ public class ClusterDaoImpl extends GenericDaoBase<ClusterVO, Long> implements C
 
     @Override
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         ClusterVO cluster = createForUpdate();
         cluster.setName(null);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java
index c3d3f2a..a01af06 100644
--- a/engine/schema/src/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java
@@ -26,7 +26,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=ClusterVSMMapDao.class)
@@ -79,7 +79,7 @@ public class ClusterVSMMapDaoImpl extends GenericDaoBase<ClusterVSMMapVO, Long>
     }
     
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         ClusterVSMMapVO cluster = createForUpdate();
         //cluster.setClusterId(null);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
index 47b5522..e3b70a2 100755
--- a/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
@@ -44,7 +44,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SequenceFetcher;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.net.NetUtils;
 
 /**
@@ -343,7 +343,7 @@ public class DataCenterDaoImpl extends GenericDaoBase<DataCenterVO, Long> implem
 
     @Override @DB
     public boolean update(Long zoneId, DataCenterVO zone) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         boolean persisted = super.update(zoneId, zone);
         if (!persisted) {
@@ -408,7 +408,7 @@ public class DataCenterDaoImpl extends GenericDaoBase<DataCenterVO, Long> implem
 
     @Override
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         DataCenterVO zone = createForUpdate();
         zone.setName(null);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
index 0ec2bb5..c2ed551 100755
--- a/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
@@ -33,7 +33,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.Func;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.net.NetUtils;
 
@@ -52,7 +52,7 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
         sc.setParameters("pod", podId);
         sc.setParameters("taken", (Date)null);
         
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         DataCenterIpAddressVO  vo = lockOneRandomRow(sc, true);
         if (vo == null) {
@@ -73,7 +73,7 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
         sc.setParameters("dc", dcId);
         sc.setParameters("taken", (Date)null);
         
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         DataCenterIpAddressVO  vo = lockOneRandomRow(sc, true);
         if (vo == null) {
@@ -108,7 +108,7 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
     
     @DB
     public void addIpRange(long dcId, long podId, String start, String end) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         String insertSql = "INSERT INTO `cloud`.`op_dc_ip_address_alloc` (ip_address, data_center_id, pod_id, mac_address) VALUES (?, ?, ?, (select mac_address from `cloud`.`data_center` where id=?))";
         String updateSql = "UPDATE `cloud`.`data_center` set mac_address = mac_address+1 where id=?";
         PreparedStatement stmt = null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java
index 6baf04f..39d5753 100644
--- a/engine/schema/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.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.Func;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.net.NetUtils;
 
@@ -54,7 +54,7 @@ public class DataCenterLinkLocalIpAddressDaoImpl extends GenericDaoBase<DataCent
         sc.setParameters("pod", podId);
         sc.setParameters("taken", (Date)null);
         
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         
         DataCenterLinkLocalIpAddressVO  vo = lockOneRandomRow(sc, true);
@@ -84,7 +84,7 @@ public class DataCenterLinkLocalIpAddressDaoImpl extends GenericDaoBase<DataCent
         long startIP = NetUtils.ip2Long(start);
         long endIP = NetUtils.ip2Long(end);
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             stmt = txn.prepareAutoCloseStatement(insertSql);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDao.java b/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDao.java
index 28cd027..7f65b3a 100644
--- a/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDao.java
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDao.java
@@ -21,6 +21,7 @@ import java.util.List;
 import com.cloud.dc.DataCenterVnetVO;
 import com.cloud.utils.db.GenericDao;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 public interface DataCenterVnetDao extends GenericDao<DataCenterVnetVO, Long> {
     public List<DataCenterVnetVO> listAllocatedVnets(long physicalNetworkId);
@@ -33,7 +34,7 @@ public interface DataCenterVnetDao extends GenericDao<DataCenterVnetVO, Long> {
     
     public void delete(long physicalNetworkId);
 
-    public void deleteVnets(Transaction txn, long dcId, long physicalNetworkId, List<String> vnets);
+    public void deleteVnets(TransactionLegacy txn, long dcId, long physicalNetworkId, List<String> vnets);
 
     public void lockRange(long dcId, long physicalNetworkId, Integer start, Integer end);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java
index c052026..4e2aabf 100755
--- a/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java
@@ -38,7 +38,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;
 
 /**
@@ -121,7 +121,7 @@ public class DataCenterVnetDaoImpl extends GenericDaoBase<DataCenterVnetVO, Long
     public void add(long dcId, long physicalNetworkId, List<String> vnets) {
         String insertVnet = "INSERT INTO `cloud`.`op_dc_vnet_alloc` (vnet, data_center_id, physical_network_id) VALUES ( ?, ?, ?)";
         
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertVnet);
@@ -139,7 +139,7 @@ public class DataCenterVnetDaoImpl extends GenericDaoBase<DataCenterVnetVO, Long
     }
 
     //In the List<string> argument each string is a vlan. not a vlanRange.
-    public void deleteVnets(Transaction txn, long dcId, long physicalNetworkId, List<String> vnets) {
+    public void deleteVnets(TransactionLegacy txn, long dcId, long physicalNetworkId, List<String> vnets) {
         String deleteVnet = "DELETE FROM `cloud`.`op_dc_vnet_alloc` WHERE data_center_id=? AND physical_network_id=? AND taken IS NULL AND vnet=?";
         try {
             PreparedStatement stmt = txn.prepareAutoCloseStatement(deleteVnet);
@@ -171,7 +171,7 @@ public class DataCenterVnetDaoImpl extends GenericDaoBase<DataCenterVnetVO, Long
         }
         sc.setParameters("physicalNetworkId", physicalNetworkId);
         Date now = new Date();
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         DataCenterVnetVO vo = lockOneRandomRow(sc, true);
         if (vo == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DcDetailsDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
index 88c326b..5f2b0b9 100644
--- a/engine/schema/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
@@ -31,7 +31,7 @@ import com.cloud.dc.DcDetailVO;
 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;
 
 @Local(value=DcDetailsDao.class)
 public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implements DcDetailsDao, ScopedConfigStorage {
@@ -106,7 +106,7 @@ public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implement
 
     @Override
     public void persist(long dcId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<DcDetailVO> sc = DcSearch.create();
         sc.setParameters("dcId", dcId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/HostPodDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/HostPodDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/HostPodDaoImpl.java
index f77deda..384fa00 100644
--- a/engine/schema/src/com/cloud/dc/dao/HostPodDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/HostPodDaoImpl.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;
 
 @Component
 @Local(value={HostPodDao.class})
@@ -85,7 +85,7 @@ public class HostPodDaoImpl extends GenericDaoBase<HostPodVO, Long> implements H
         HashMap<Long, List<Object>> currentPodCidrSubnets = new HashMap<Long, List<Object>>();
 
         String selectSql = "SELECT id, cidr_address, cidr_size FROM host_pod_ref WHERE data_center_id=" + zoneId +" and removed IS NULL";
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             PreparedStatement stmt = txn.prepareAutoCloseStatement(selectSql);
             ResultSet rs = stmt.executeQuery();
@@ -111,7 +111,7 @@ public class HostPodDaoImpl extends GenericDaoBase<HostPodVO, Long> implements H
 
     @Override
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         HostPodVO pod = createForUpdate();
         pod.setName(null);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/PodVlanDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/PodVlanDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/PodVlanDaoImpl.java
index 413f9ed..9e9a0e7 100755
--- a/engine/schema/src/com/cloud/dc/dao/PodVlanDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/PodVlanDaoImpl.java
@@ -28,7 +28,7 @@ import com.cloud.utils.db.GenericDao;
 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.exception.CloudRuntimeException;
 
 /**
@@ -49,7 +49,7 @@ public class PodVlanDaoImpl extends GenericDaoBase<PodVlanVO, Long> implements P
     public void add(long podId, int start, int end) {
         String insertVnet = "INSERT INTO `cloud`.`op_pod_vlan_alloc` (vlan, pod_id) VALUES ( ?, ?)";
         
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertVnet);
@@ -68,7 +68,7 @@ public class PodVlanDaoImpl extends GenericDaoBase<PodVlanVO, Long> implements P
     public void delete(long podId) {
     	String deleteVnet = "DELETE FROM `cloud`.`op_pod_vlan_alloc` WHERE pod_id = ?";
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             PreparedStatement stmt = txn.prepareAutoCloseStatement(deleteVnet);
             stmt.setLong(1, podId);
@@ -82,7 +82,7 @@ public class PodVlanDaoImpl extends GenericDaoBase<PodVlanVO, Long> implements P
         SearchCriteria<PodVlanVO> sc = FreeVlanSearch.create();
         sc.setParameters("podId", podId);
         Date now = new Date();
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             txn.start();
             PodVlanVO vo = lockOneRandomRow(sc, true);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/StorageNetworkIpAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/StorageNetworkIpAddressDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/StorageNetworkIpAddressDaoImpl.java
index a7bb9c1..d6a3879 100755
--- a/engine/schema/src/com/cloud/dc/dao/StorageNetworkIpAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/StorageNetworkIpAddressDaoImpl.java
@@ -30,10 +30,10 @@ import com.cloud.utils.db.GenericSearchBuilder;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.GenericQueryBuilder;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 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;
 
 @Component
 @Local(value={StorageNetworkIpAddressDao.class})
@@ -87,7 +87,7 @@ public class StorageNetworkIpAddressDaoImpl extends GenericDaoBase<StorageNetwor
     public StorageNetworkIpAddressVO takeIpAddress(long rangeId) {
 		SearchCriteria<StorageNetworkIpAddressVO> sc = untakenIp.create();
 		sc.setParameters("rangeId", rangeId);
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         StorageNetworkIpAddressVO ip = lockOneRandomRow(sc, true);
         if (ip == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/dc/dao/VlanDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/VlanDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/VlanDaoImpl.java
index 6f5a01f..6ec819d 100755
--- a/engine/schema/src/com/cloud/dc/dao/VlanDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/VlanDaoImpl.java
@@ -28,7 +28,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.JoinBuilder;
 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.exception.CloudRuntimeException;
 import org.springframework.stereotype.Component;
 
@@ -301,7 +301,7 @@ public class VlanDaoImpl extends GenericDaoBase<VlanVO, Long> implements VlanDao
 
         StringBuilder sql = new StringBuilder(FindZoneWideVlans);
 
-        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/schema/src/com/cloud/domain/dao/DomainDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java b/engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java
index 3d0588e..1b73591 100644
--- a/engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java
+++ b/engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java
@@ -35,7 +35,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.GenericSearchBuilder;
 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={DomainDao.class})
@@ -117,7 +117,7 @@ public class DomainDaoImpl extends GenericDaoBase<DomainVO, Long> implements Dom
     		return null;
     	}
     	
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
     	try {
     		txn.start();
 
@@ -168,7 +168,7 @@ public class DomainDaoImpl extends GenericDaoBase<DomainVO, Long> implements Dom
         String sql1 = "SELECT * from domain where parent = " + id + " and removed is null";
 
         boolean success = false;
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
         	txn.start();
             DomainVO parentDomain = super.lockRow(domain.getParent(), true);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/event/dao/EventDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/event/dao/EventDaoImpl.java b/engine/schema/src/com/cloud/event/dao/EventDaoImpl.java
index e5615db..f3a11c6 100644
--- a/engine/schema/src/com/cloud/event/dao/EventDaoImpl.java
+++ b/engine/schema/src/com/cloud/event/dao/EventDaoImpl.java
@@ -30,7 +30,7 @@ import com.cloud.utils.db.Filter;
 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;
 
 @Component
@@ -104,7 +104,7 @@ public class EventDaoImpl extends GenericDaoBase<EventVO, Long> implements Event
     @Override
     public void archiveEvents(List<EventVO> events) {
         if (events != null && !events.isEmpty()) {
-            Transaction txn = Transaction.currentTxn();
+            TransactionLegacy txn = TransactionLegacy.currentTxn();
             txn.start();
             for (EventVO event : events) {
                 event = lockRow(event.getId(), true);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java b/engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java
index 4f05bbe..4333903 100644
--- a/engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java
+++ b/engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java
@@ -36,7 +36,7 @@ import com.cloud.utils.db.Filter;
 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.exception.CloudRuntimeException;
 
 @Component
@@ -90,7 +90,7 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
     public synchronized List<UsageEventVO> getRecentEvents(Date endDate) {
         long recentEventId = getMostRecentEventId();
         long maxEventId = getMaxEventId(endDate);
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         String sql = COPY_EVENTS;
         if (recentEventId == 0) {
             if (s_logger.isDebugEnabled()) {
@@ -120,7 +120,7 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
 
     @DB
     private long getMostRecentEventId() {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         try {
             List<UsageEventVO> latestEvents = getLatestEvent();
 
@@ -140,7 +140,7 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
     }
 
     private List<UsageEventVO> findRecentEvents(Date endDate) {
-        Transaction txn = Transaction.open(Transaction.USAGE_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
         try {
             return listLatestEvents(endDate);
         } catch (Exception ex) {
@@ -152,7 +152,7 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
     }
 
     private long getMaxEventId(Date endDate) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         try {
             String sql = MAX_EVENT;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java b/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
index caf7c01..c51e2c7 100755
--- a/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
+++ b/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
@@ -59,7 +59,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;
 
@@ -490,7 +490,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
     @Override
     @DB
     public List<HostVO> findAndUpdateDirectAgentToLoad(long lastPingSecondsAfter, Long limit, long managementServerId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         txn.start();
         if (s_logger.isDebugEnabled()) {
@@ -589,7 +589,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
     @Override
     @DB
     public List<HostVO> findAndUpdateApplianceToLoad(long lastPingSecondsAfter, long managementServerId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         txn.start();
         SearchCriteria<HostVO> sc = UnmanagedApplianceSearch.create();
@@ -728,7 +728,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
     @DB
     @Override
     public List<HostVO> findLostHosts(long timeout) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<HostVO> result = new ArrayList<HostVO>();
         ResultSet rs = null;
@@ -779,7 +779,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
     public HostVO persist(HostVO host) {
         final String InsertSequenceSql = "INSERT INTO op_host(id) VALUES(?)";
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         HostVO dbHost = super.persist(host);
@@ -805,7 +805,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
     @Override
     @DB
     public boolean update(Long hostId, HostVO host) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         boolean persisted = super.update(hostId, host);
@@ -831,7 +831,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
 
         ArrayList<RunningHostCountInfo> l = new ArrayList<RunningHostCountInfo>();
 
-        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/host/dao/HostDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/host/dao/HostDetailsDaoImpl.java b/engine/schema/src/com/cloud/host/dao/HostDetailsDaoImpl.java
index 47cdeb3..7b7267c 100644
--- a/engine/schema/src/com/cloud/host/dao/HostDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/host/dao/HostDetailsDaoImpl.java
@@ -31,7 +31,7 @@ import com.cloud.utils.crypt.DBEncryptionUtil;
 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.exception.CloudRuntimeException;
 
 @Component
@@ -96,7 +96,7 @@ public class HostDetailsDaoImpl extends GenericDaoBase<DetailVO, Long> implement
     public void persist(long hostId, Map<String, String> details) {
         final String InsertOrUpdateSql = "INSERT INTO `cloud`.`host_details` (host_id, name, value) VALUES (?,?,?) ON DUPLICATE KEY UPDATE value=?";
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         for (Map.Entry<String, String> detail : details.entrySet()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/host/dao/HostTagsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/host/dao/HostTagsDaoImpl.java b/engine/schema/src/com/cloud/host/dao/HostTagsDaoImpl.java
index 0e93275..b12fd7e 100644
--- a/engine/schema/src/com/cloud/host/dao/HostTagsDaoImpl.java
+++ b/engine/schema/src/com/cloud/host/dao/HostTagsDaoImpl.java
@@ -27,7 +27,7 @@ import com.cloud.host.HostTagVO;
 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=HostTagsDao.class)
@@ -56,7 +56,7 @@ public class HostTagsDaoImpl extends GenericDaoBase<HostTagVO, Long> implements
     
     @Override
     public void persist(long hostId, List<String> hostTags) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         txn.start();
         SearchCriteria<HostTagVO> sc = HostSearch.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java b/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java
index f53f228..370f874 100644
--- a/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java
+++ b/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java
@@ -30,7 +30,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.exception.CloudRuntimeException;
 
 @Component
@@ -74,7 +74,7 @@ public class KeystoreDaoImpl extends GenericDaoBase<KeystoreVO, Long> implements
 	@Override
 	@DB
 	public void save(String name, String certificate, String key, String domainSuffix) {
-		Transaction txn = Transaction.currentTxn();
+		TransactionLegacy txn = TransactionLegacy.currentTxn();
 		try {
 			txn.start();
 			

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java b/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java
index b007e19..26f399d 100644
--- a/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java
@@ -28,7 +28,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=FirewallRulesCidrsDao.class)
@@ -58,7 +58,7 @@ public class FirewallRulesCidrsDaoImpl extends GenericDaoBase<FirewallRulesCidrs
     
     @Override @DB
     public void persist(long firewallRuleId, List<String> sourceCidrs) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         txn.start();
         for (String tag : sourceCidrs) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/dao/FirewallRulesDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/FirewallRulesDaoImpl.java b/engine/schema/src/com/cloud/network/dao/FirewallRulesDaoImpl.java
index cd7878f..6aa8910 100644
--- a/engine/schema/src/com/cloud/network/dao/FirewallRulesDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/FirewallRulesDaoImpl.java
@@ -39,7 +39,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;
 
 @Component
 @Local(value = FirewallRulesDao.class)
@@ -220,7 +220,7 @@ public class FirewallRulesDaoImpl extends GenericDaoBase<FirewallRuleVO, Long> i
     @Override
     @DB
     public FirewallRuleVO persist(FirewallRuleVO firewallRule) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         FirewallRuleVO dbfirewallRule = super.persist(firewallRule);
@@ -309,7 +309,7 @@ public class FirewallRulesDaoImpl extends GenericDaoBase<FirewallRuleVO, Long> i
     @Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         FirewallRuleVO entry = findById(id);
         if (entry != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java b/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
index 9f5f403..46a34c5 100755
--- a/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
@@ -31,7 +31,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.net.Ip;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
@@ -285,7 +285,7 @@ public class IPAddressDaoImpl extends GenericDaoBase<IPAddressVO, Long> implemen
     @Override
     @DB
     public int countIPs(long dcId, Long accountId, String vlanId, String vlanGateway, String vlanNetmask) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         int ipCount = 0;
         try {
             String sql = "SELECT count(*) FROM user_ip_address u INNER JOIN vlan v on (u.vlan_db_id = v.id AND v.data_center_id = ? AND v.vlan_id = ? AND v.vlan_gateway = ? AND v.vlan_netmask = ? AND u.account_id = ?)";
@@ -390,7 +390,7 @@ public class IPAddressDaoImpl extends GenericDaoBase<IPAddressVO, Long> implemen
     @Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         IPAddressVO entry = findById(id);
         if (entry != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java b/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java
index 72b357d..6599d6b 100644
--- a/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java
@@ -289,7 +289,7 @@ public class NetworkDaoImpl extends GenericDaoBase<NetworkVO, Long> implements N
     @Override
     @DB
     public NetworkVO persist(NetworkVO network, boolean gc, Map<String, String> serviceProviderMap) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         // 1) create network
@@ -309,7 +309,7 @@ public class NetworkDaoImpl extends GenericDaoBase<NetworkVO, Long> implements N
     @Override
     @DB
     public boolean update(Long networkId, NetworkVO network, Map<String, String> serviceProviderMap) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
 
         super.update(networkId, network);
@@ -325,7 +325,7 @@ public class NetworkDaoImpl extends GenericDaoBase<NetworkVO, Long> implements N
     @Override
     @DB
     public void persistNetworkServiceProviders(long networkId, Map<String, String> serviceProviderMap) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         for (String service : serviceProviderMap.keySet()) {
             NetworkServiceMapVO serviceMap = new NetworkServiceMapVO(networkId, Service.getService(service), Provider.getProvider(serviceProviderMap.get(service)));
@@ -576,7 +576,7 @@ public class NetworkDaoImpl extends GenericDaoBase<NetworkVO, Long> implements N
     @Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         NetworkVO entry = findById(id);
         if (entry != null) {
@@ -599,7 +599,7 @@ public class NetworkDaoImpl extends GenericDaoBase<NetworkVO, Long> implements N
     @Override
     public boolean updateState(State currentState, Event event, State nextState, Network vo, Object data) {
        // TODO: ensure this update is correct
-       Transaction txn = Transaction.currentTxn();
+       TransactionLegacy txn = TransactionLegacy.currentTxn();
        txn.start();
 
        NetworkVO networkVo = (NetworkVO) vo;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/dao/PortProfileDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/PortProfileDaoImpl.java b/engine/schema/src/com/cloud/network/dao/PortProfileDaoImpl.java
index 2325c4a..64a846c 100644
--- a/engine/schema/src/com/cloud/network/dao/PortProfileDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/PortProfileDaoImpl.java
@@ -29,7 +29,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;
 import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.exception.CloudRuntimeException;
 
@@ -66,7 +66,7 @@ public class PortProfileDaoImpl extends GenericDaoBase<PortProfileVO, Long> impl
     	String condition = "(trunk_low_vlan_id BETWEEN " + lowVlanId + " AND " + highVlanId + ")" + " OR (trunk_high_vlan_id BETWEEN " + lowVlanId + " AND " + highVlanId + ")";
     	String selectSql = "SELECT * FROM `" + dbName + "`.`" + tableName + "` WHERE " + condition;
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             PreparedStatement stmt = txn.prepareAutoCloseStatement(selectSql);
             ResultSet rs = stmt.executeQuery();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java b/engine/schema/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java
index d82cc4a..ee8c160 100644
--- a/engine/schema/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java
@@ -32,7 +32,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={SecurityGroupDao.class})
@@ -109,7 +109,7 @@ public class SecurityGroupDaoImpl extends GenericDaoBase<SecurityGroupVO, Long>
 	@Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SecurityGroupVO entry = findById(id);
         if (entry != null) {
@@ -123,7 +123,7 @@ public class SecurityGroupDaoImpl extends GenericDaoBase<SecurityGroupVO, Long>
 	@Override
     @DB
     public boolean expunge(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SecurityGroupVO entry = findById(id);
         if (entry != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/security/dao/SecurityGroupWorkDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/security/dao/SecurityGroupWorkDaoImpl.java b/engine/schema/src/com/cloud/network/security/dao/SecurityGroupWorkDaoImpl.java
index 3154ffe..98cc0d3 100644
--- a/engine/schema/src/com/cloud/network/security/dao/SecurityGroupWorkDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/security/dao/SecurityGroupWorkDaoImpl.java
@@ -33,7 +33,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.exception.CloudRuntimeException;
 
 @Component
@@ -100,7 +100,7 @@ public class SecurityGroupWorkDaoImpl extends GenericDaoBase<SecurityGroupWorkVO
 	@Override
 	@DB
 	public SecurityGroupWorkVO take(long serverId) {
-		final Transaction txn = Transaction.currentTxn();
+		final TransactionLegacy txn = TransactionLegacy.currentTxn();
         try {
             final SearchCriteria<SecurityGroupWorkVO> sc = UntakenWorkSearch.create();
             sc.setParameters("step", Step.Scheduled);
@@ -149,7 +149,7 @@ public class SecurityGroupWorkDaoImpl extends GenericDaoBase<SecurityGroupWorkVO
 	@Override
 	@DB
 	public void updateStep(Long vmId, Long logSequenceNumber, Step step) {
-		final Transaction txn = Transaction.currentTxn();
+		final TransactionLegacy txn = TransactionLegacy.currentTxn();
 		txn.start();
         SearchCriteria<SecurityGroupWorkVO> sc = VmIdSeqNumSearch.create();
         sc.setParameters("vmId", vmId);
@@ -180,7 +180,7 @@ public class SecurityGroupWorkDaoImpl extends GenericDaoBase<SecurityGroupWorkVO
 	@Override
 	@DB
 	public void updateStep(Long workId, Step step) {
-		final Transaction txn = Transaction.currentTxn();
+		final TransactionLegacy txn = TransactionLegacy.currentTxn();
 		txn.start();
 
         SecurityGroupWorkVO work = lockRow(workId, true);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java b/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java
index 746b66f..f957439 100644
--- a/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java
@@ -34,7 +34,7 @@ import com.cloud.network.security.VmRulesetLogVO;
 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={VmRulesetLogDao.class})
@@ -85,7 +85,7 @@ public class VmRulesetLogDaoImpl extends GenericDaoBase<VmRulesetLogVO, Long> im
         return createOrUpdateUsingMultiInsert(workItems);
     }
     
-    private int executeWithRetryOnDeadlock(Transaction txn, String pstmt,  List<Long> vmIds) throws SQLException {
+    private int executeWithRetryOnDeadlock(TransactionLegacy txn, String pstmt,  List<Long> vmIds) throws SQLException {
 
         int numUpdated = 0;
         final int maxTries = 3;
@@ -120,7 +120,7 @@ public class VmRulesetLogDaoImpl extends GenericDaoBase<VmRulesetLogVO, Long> im
     }
     
     protected int createOrUpdateUsingMultiInsert(Set<Long> workItems) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         int size = workItems.size();
         int count = 0;
@@ -156,7 +156,7 @@ public class VmRulesetLogDaoImpl extends GenericDaoBase<VmRulesetLogVO, Long> im
     }
     
     protected int createOrUpdateUsingBatch(Set<Long> workItems) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement stmtInsert = null;
         int [] queryResult = null;
         int count=0;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/vpc/dao/PrivateIpDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/dao/PrivateIpDaoImpl.java b/engine/schema/src/com/cloud/network/vpc/dao/PrivateIpDaoImpl.java
index 5ed7fb2..7511657 100644
--- a/engine/schema/src/com/cloud/network/vpc/dao/PrivateIpDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/vpc/dao/PrivateIpDaoImpl.java
@@ -32,7 +32,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;
 
 @Component
 @Local(value = PrivateIpDao.class)
@@ -78,7 +78,7 @@ public class PrivateIpDaoImpl extends GenericDaoBase<PrivateIpVO, Long> implemen
             sc.setParameters("ipAddress", requestedIp);
         }
         
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         PrivateIpVO  vo = lockOneRandomRow(sc, true);
         if (vo == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/vpc/dao/StaticRouteDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/dao/StaticRouteDaoImpl.java b/engine/schema/src/com/cloud/network/vpc/dao/StaticRouteDaoImpl.java
index e7e006e..f5a9ed5 100644
--- a/engine/schema/src/com/cloud/network/vpc/dao/StaticRouteDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/vpc/dao/StaticRouteDaoImpl.java
@@ -36,7 +36,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;
 
 @Component
 @Local(value = StaticRouteDao.class)
@@ -106,7 +106,7 @@ public class StaticRouteDaoImpl extends GenericDaoBase<StaticRouteVO, Long> impl
     @Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         StaticRouteVO entry = findById(id);
         if (entry != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/vpc/dao/VpcDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/dao/VpcDaoImpl.java b/engine/schema/src/com/cloud/network/vpc/dao/VpcDaoImpl.java
index 289b896..c34b551 100644
--- a/engine/schema/src/com/cloud/network/vpc/dao/VpcDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/vpc/dao/VpcDaoImpl.java
@@ -38,7 +38,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;
 
 @Component
 @Local(value = VpcDao.class)
@@ -107,7 +107,7 @@ public class VpcDaoImpl extends GenericDaoBase<VpcVO, Long> implements VpcDao{
     @Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         VpcVO entry = findById(id);
         if (entry != null) {
@@ -129,7 +129,7 @@ public class VpcDaoImpl extends GenericDaoBase<VpcVO, Long> implements VpcDao{
     @Override
     @DB
     public VpcVO persist(VpcVO vpc, Map<String, List<String>> serviceProviderMap) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         VpcVO newVpc = super.persist(vpc);
         persistVpcServiceProviders(vpc.getId(), serviceProviderMap);
@@ -140,7 +140,7 @@ public class VpcDaoImpl extends GenericDaoBase<VpcVO, Long> implements VpcDao{
     @Override
     @DB
     public void persistVpcServiceProviders(long vpcId, Map<String, List<String>> serviceProviderMap) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         for (String service : serviceProviderMap.keySet()) {
             for (String provider : serviceProviderMap.get(service)) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/network/vpc/dao/VpcOfferingDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/dao/VpcOfferingDaoImpl.java b/engine/schema/src/com/cloud/network/vpc/dao/VpcOfferingDaoImpl.java
index b5a7e4d..3453da0 100644
--- a/engine/schema/src/com/cloud/network/vpc/dao/VpcOfferingDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/vpc/dao/VpcOfferingDaoImpl.java
@@ -26,7 +26,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;
 
 @Component
 @Local(value = VpcOfferingDao.class)
@@ -51,7 +51,7 @@ public class VpcOfferingDaoImpl extends GenericDaoBase<VpcOfferingVO, Long> impl
     @Override
     @DB
     public boolean remove(Long vpcOffId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         VpcOfferingVO offering = findById(vpcOffId);
         offering.setUniqueName(null);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java b/engine/schema/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java
index 1c0a1d7..19290a6 100644
--- a/engine/schema/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java
+++ b/engine/schema/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java
@@ -38,7 +38,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 = NetworkOfferingDao.class)
@@ -129,7 +129,7 @@ public class NetworkOfferingDaoImpl extends GenericDaoBase<NetworkOfferingVO, Lo
     @Override
     @DB
     public boolean remove(Long networkOfferingId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         NetworkOfferingVO offering = findById(networkOfferingId);
         offering.setUniqueName(null);
@@ -174,7 +174,7 @@ public class NetworkOfferingDaoImpl extends GenericDaoBase<NetworkOfferingVO, Lo
     @Override
     @DB
     public NetworkOfferingVO persist(NetworkOfferingVO off, Map<Detail, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         //1) persist the offering
         NetworkOfferingVO vo = super.persist(off);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java b/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java
index ecf40da..fd6c802 100644
--- a/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java
+++ b/engine/schema/src/com/cloud/projects/dao/ProjectDaoImpl.java
@@ -36,7 +36,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.Func;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value = { ProjectDao.class })
@@ -75,7 +75,7 @@ public class ProjectDaoImpl extends GenericDaoBase<ProjectVO, Long> implements P
     @DB
     public boolean remove(Long projectId) {
         boolean result = false;
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         ProjectVO projectToRemove = findById(projectId);
         projectToRemove.setName(null);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java
index 91d736a..70fd570 100644
--- a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java
@@ -28,7 +28,7 @@ import com.cloud.service.ServiceOfferingDetailsVO;
 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=ServiceOfferingDetailsDao.class)
@@ -82,7 +82,7 @@ public class ServiceOfferingDetailsDaoImpl extends GenericDaoBase<ServiceOfferin
 
     @Override
     public void persist(long serviceOfferingId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<ServiceOfferingDetailsVO> sc = ServiceOfferingSearch.create();
         sc.setParameters("serviceOfferingId", serviceOfferingId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java
index 3e32f1a..60c87af 100644
--- a/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/LaunchPermissionDaoImpl.java
@@ -35,7 +35,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;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -69,7 +69,7 @@ public class LaunchPermissionDaoImpl extends GenericDaoBase<LaunchPermissionVO,
 
     @Override
     public void removePermissions(long templateId, List<Long> accountIds) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         try {
             txn.start();
@@ -106,7 +106,7 @@ public class LaunchPermissionDaoImpl extends GenericDaoBase<LaunchPermissionVO,
 
     @Override
     public List<VMTemplateVO> listPermittedTemplates(long accountId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         List<VMTemplateVO> permittedTemplates = new ArrayList<VMTemplateVO>();
         PreparedStatement pstmt = null;
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java
index f5319ea..94b3871 100644
--- a/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/SnapshotDaoImpl.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.vm.VMInstanceVO;
 import com.cloud.vm.dao.VMInstanceDao;
 
@@ -204,7 +204,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
     @Override
     public Long getSecHostId(long volumeId) {
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = GET_SECHOST_ID;
         try {
@@ -221,7 +221,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
 
     @Override
     public long getLastSnapshot(long volumeId, DataStoreRole role) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = GET_LAST_SNAPSHOT;
         try {
@@ -240,7 +240,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
 
     @Override
     public long updateSnapshotVersion(long volumeId, String from, String to) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = UPDATE_SNAPSHOT_VERSION;
         try {
@@ -258,7 +258,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
 
     @Override
     public long updateSnapshotSecHost(long dcId, long secHostId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         String sql = UPDATE_SECHOST_ID;
         try {
@@ -304,7 +304,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
     @Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SnapshotVO entry = findById(id);
         if (entry != null) {
@@ -324,7 +324,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
 
     @Override
     public boolean updateState(State currentState, Event event, State nextState, SnapshotVO snapshot, Object data) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SnapshotVO snapshotVO = (SnapshotVO) snapshot;
         snapshotVO.setState(nextState);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/StoragePoolDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/StoragePoolDetailsDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/StoragePoolDetailsDaoImpl.java
index f60ea17..7859ca7 100644
--- a/engine/schema/src/com/cloud/storage/dao/StoragePoolDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/StoragePoolDetailsDaoImpl.java
@@ -31,7 +31,7 @@ import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
 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;
 
 @Local(value = StoragePoolDetailsDao.class)
 public class StoragePoolDetailsDaoImpl extends GenericDaoBase<StoragePoolDetailVO, Long> implements StoragePoolDetailsDao, ScopedConfigStorage {
@@ -48,7 +48,7 @@ public class StoragePoolDetailsDaoImpl extends GenericDaoBase<StoragePoolDetailV
 
     @Override
     public void update(long poolId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         SearchCriteria<StoragePoolDetailVO> sc = PoolSearch.create();
         sc.setParameters("pool", poolId);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java
index 730216b..ba0c48d 100644
--- a/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/StoragePoolHostDaoImpl.java
@@ -33,7 +33,7 @@ import com.cloud.utils.Pair;
 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 = { StoragePoolHostDao.class })
@@ -104,7 +104,7 @@ public class StoragePoolHostDaoImpl extends GenericDaoBase<StoragePoolHostVO, Lo
 
     @Override
     public List<StoragePoolHostVO> listByHostStatus(long poolId, Status hostStatus) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<StoragePoolHostVO> result = new ArrayList<StoragePoolHostVO>();
         ResultSet rs = null;
@@ -142,7 +142,7 @@ public class StoragePoolHostDaoImpl extends GenericDaoBase<StoragePoolHostVO, Lo
     public List<Pair<Long, Integer>> getDatacenterStoragePoolHostInfo(long dcId, boolean sharedOnly) {
         ArrayList<Pair<Long, Integer>> l = new ArrayList<Pair<Long, Integer>>();
         String sql = sharedOnly ? SHARED_STORAGE_POOL_HOST_INFO : STORAGE_POOL_HOST_INFO;
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         ;
         PreparedStatement pstmt = null;
         try {
@@ -169,7 +169,7 @@ public class StoragePoolHostDaoImpl extends GenericDaoBase<StoragePoolHostVO, Lo
     public void deletePrimaryRecordsForHost(long hostId) {
         SearchCriteria<StoragePoolHostVO> sc = HostSearch.create();
         sc.setParameters("host_id", hostId);
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         remove(sc);
         txn.commit();
@@ -180,7 +180,7 @@ public class StoragePoolHostDaoImpl extends GenericDaoBase<StoragePoolHostVO, Lo
         SearchCriteria<StoragePoolHostVO> sc = PoolHostSearch.create();
         sc.setParameters("host_id", hostId);
         sc.setParameters("pool_id", poolId);
-        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/schema/src/com/cloud/storage/dao/StoragePoolWorkDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/StoragePoolWorkDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/StoragePoolWorkDaoImpl.java
index aa3e0df..df0b6f2 100644
--- a/engine/schema/src/com/cloud/storage/dao/StoragePoolWorkDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/StoragePoolWorkDaoImpl.java
@@ -31,7 +31,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;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
@@ -125,7 +125,7 @@ public class StoragePoolWorkDaoImpl extends GenericDaoBase<StoragePoolWorkVO, Lo
 
         StringBuilder sql = new StringBuilder(FindPoolIds);
 
-        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/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
index a96524c..9af4ae8 100755
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
@@ -57,7 +57,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;
 
 @Component
@@ -220,7 +220,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
 
         List<Long> l = new ArrayList<Long>();
 
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
 
         PreparedStatement pstmt = null;
         try {
@@ -421,7 +421,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
      * permittedAccountsStr = permittedAccountsStr.substring(0,
      * permittedAccountsStr.length() - 1); }
      *
-     * Transaction txn = Transaction.currentTxn(); txn.start();
+     * TransactionLegacy txn = TransactionLegacy.currentTxn(); txn.start();
      *
      * Set<Pair<Long, Long>> templateZonePairList = new HashSet<Pair<Long,
      * Long>>(); PreparedStatement pstmt = null; ResultSet rs = null; String sql
@@ -505,7 +505,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
      * permittedAccountsStr = permittedAccountsStr.substring(0,
      * permittedAccountsStr.length()-1); }
      *
-     * Transaction txn = Transaction.currentTxn(); txn.start();
+     * TransactionLegacy txn = TransactionLegacy.currentTxn(); txn.start();
      *
      * // Use LinkedHashSet here to guarantee iteration order Set<Pair<Long,
      * Long>> templateZonePairList = new LinkedHashSet<Pair<Long, Long>>();
@@ -720,7 +720,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
     @Override
     @DB
     public long addTemplateToZone(VMTemplateVO tmplt, long zoneId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         VMTemplateVO tmplt2 = findById(tmplt.getId());
         if (tmplt2 == null) {
@@ -855,7 +855,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
     @Override
     @DB
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         VMTemplateVO template = createForUpdate();
         template.setRemoved(new Date());
@@ -890,7 +890,7 @@ public class VMTemplateDaoImpl extends GenericDaoBase<VMTemplateVO, Long> implem
      *
      * final String permittedAccountsStr = join(",", permittedAccounts);
      *
-     * final Transaction txn = Transaction.currentTxn(); txn.start();
+     * final TransactionLegacy txn = TransactionLegacy.currentTxn(); txn.start();
      *
      * Set<Pair<Long, Long>> templateZonePairList = new HashSet<Pair<Long,
      * Long>>(); PreparedStatement pstmt = null; ResultSet rs = null; try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/VMTemplateDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateDetailsDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateDetailsDaoImpl.java
index 33b96c4..00aafba 100644
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplateDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateDetailsDaoImpl.java
@@ -28,7 +28,7 @@ import com.cloud.storage.VMTemplateDetailVO;
 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 = VMTemplateDetailsDao.class)
@@ -84,7 +84,7 @@ public class VMTemplateDetailsDaoImpl extends GenericDaoBase<VMTemplateDetailVO,
 
     @Override
     public void persist(long templateId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<VMTemplateDetailVO> sc = TemplateSearch.create();
         sc.setParameters("templateId", templateId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java
index 85d8348..d6283b6 100755
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.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.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.UpdateBuilder;
 
 @Component
@@ -163,7 +163,7 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase<VMTemplateHostVO, Long
 
     @Override
     public void update(VMTemplateHostVO instance) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         try {
             Date now = new Date();
@@ -235,7 +235,7 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase<VMTemplateHostVO, Long
     @Override
     public List<VMTemplateHostVO> listByTemplateStatus(long templateId, long datacenterId,
             VMTemplateHostVO.Status downloadState) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<VMTemplateHostVO> result = new ArrayList<VMTemplateHostVO>();
         try {
@@ -267,7 +267,7 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase<VMTemplateHostVO, Long
     @Override
     public List<VMTemplateHostVO> listByTemplateStatus(long templateId, long datacenterId, long podId,
             VMTemplateHostVO.Status downloadState) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<VMTemplateHostVO> result = new ArrayList<VMTemplateHostVO>();
         ResultSet rs = null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java
index ba8135b..b121297 100644
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java
@@ -38,7 +38,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
@@ -150,7 +150,7 @@ public class VMTemplatePoolDaoImpl extends GenericDaoBase<VMTemplateStoragePoolV
     @Override
     public List<VMTemplateStoragePoolVO> listByTemplateStatus(long templateId, long datacenterId,
             VMTemplateStoragePoolVO.Status downloadState) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<VMTemplateStoragePoolVO> result = new ArrayList<VMTemplateStoragePoolVO>();
         try {
@@ -173,7 +173,7 @@ public class VMTemplatePoolDaoImpl extends GenericDaoBase<VMTemplateStoragePoolV
     @Override
     public List<VMTemplateStoragePoolVO> listByTemplateStatus(long templateId, long datacenterId, long podId,
             VMTemplateStoragePoolVO.Status downloadState) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<VMTemplateStoragePoolVO> result = new ArrayList<VMTemplateStoragePoolVO>();
         ResultSet rs = null;
@@ -210,7 +210,7 @@ public class VMTemplatePoolDaoImpl extends GenericDaoBase<VMTemplateStoragePoolV
     }
 
     public List<VMTemplateStoragePoolVO> listByHostTemplate(long hostId, long templateId) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         List<VMTemplateStoragePoolVO> result = new ArrayList<VMTemplateStoragePoolVO>();
         ResultSet rs = null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java
index c4a4dc7..a56959d 100644
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateZoneDaoImpl.java
@@ -27,7 +27,7 @@ import com.cloud.storage.VMTemplateZoneVO;
 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 = { VMTemplateZoneDao.class })
@@ -89,7 +89,7 @@ public class VMTemplateZoneDaoImpl extends GenericDaoBase<VMTemplateZoneVO, Long
     public void deletePrimaryRecordsForTemplate(long templateId) {
         SearchCriteria<VMTemplateZoneVO> sc = TemplateSearch.create();
         sc.setParameters("template_id", templateId);
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         remove(sc);
         txn.commit();


Mime
View raw message